From 5dc13a4698f5bc3402ffa1d4939d74abb5cfa29a Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Tue, 10 Oct 2023 00:15:15 +0900 Subject: [PATCH] feat(discord): add `Hide GitHub link Button` (#1293) --- config/defaults.ts | 1 + plugins/discord/menu.ts | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/config/defaults.ts b/config/defaults.ts index 3fdc0d3c..e8a3a704 100644 --- a/config/defaults.ts +++ b/config/defaults.ts @@ -106,6 +106,7 @@ const defaultConfig = { activityTimoutEnabled: true, // If enabled, the discord rich presence gets cleared when music paused after the time specified below activityTimoutTime: 10 * 60 * 1000, // 10 minutes listenAlong: true, // Add a "listen along" button to rich presence + hideGitHubButton: false, // Disable the "View App On GitHub" button hideDurationLeft: false, // Hides the start and end time of the song to rich presence }, 'downloader': { diff --git a/plugins/discord/menu.ts b/plugins/discord/menu.ts index 10664607..998e9e31 100644 --- a/plugins/discord/menu.ts +++ b/plugins/discord/menu.ts @@ -55,6 +55,15 @@ export default (win: Electron.BrowserWindow, options: DiscordOptions, refreshMen setMenuOptions('discord', options); }, }, + { + label: 'Hide GitHub link Button', + type: 'checkbox', + checked: options.hideGitHubButton, + click(item: Electron.MenuItem) { + options.hideGitHubButton = item.checked; + setMenuOptions('discord', options); + }, + }, { label: 'Hide duration left', type: 'checkbox',