From d4f13c3e2f09427c516908cb4abf5691f7f1be1b Mon Sep 17 00:00:00 2001 From: Suffocate <70031311+lolsuffocate@users.noreply.github.com> Date: Mon, 10 Feb 2025 09:58:02 +0000 Subject: [PATCH] Add display names where symbols or capitals are necessary --- src/plugins/customRPC/index.tsx | 15 ++++++++++----- src/plugins/ircColors/index.ts | 1 + src/plugins/lastfm/index.tsx | 4 +++- src/plugins/mentionAvatars/index.tsx | 1 + src/plugins/messageLinkEmbeds/index.tsx | 1 + src/plugins/openInApp/index.ts | 3 +++ src/plugins/pinDms/index.tsx | 2 ++ src/plugins/replaceGoogleSearch/index.tsx | 1 + src/plugins/shikiCodeblocks.desktop/settings.ts | 1 + src/plugins/translate/settings.ts | 1 + src/plugins/viewIcons/index.tsx | 1 + src/plugins/xsOverlay/index.tsx | 3 +++ 12 files changed, 28 insertions(+), 6 deletions(-) diff --git a/src/plugins/customRPC/index.tsx b/src/plugins/customRPC/index.tsx index 6f7719332..c16056ce6 100644 --- a/src/plugins/customRPC/index.tsx +++ b/src/plugins/customRPC/index.tsx @@ -83,7 +83,8 @@ const enum TimestampMode { const settings = definePluginSettings({ appID: { type: OptionType.STRING, - description: "Application ID (required)", + displayName: "Application ID (required)", + description: "Application ID from the Discord Developer Portal", onChange: onChange, isValid: (value: string) => { if (!value) return "Application ID is required."; @@ -230,7 +231,8 @@ const settings = definePluginSettings({ }, buttonOneText: { type: OptionType.STRING, - description: "Button 1 text", + displayName: "Button 1 Text", + description: "The text to display on button 1", onChange: onChange, isValid: (value: string) => { if (value && value.length > 31) return "Button 1 text must be not longer than 31 characters."; @@ -239,12 +241,14 @@ const settings = definePluginSettings({ }, buttonOneURL: { type: OptionType.STRING, - description: "Button 1 URL", + displayName: "Button 1 URL", + description: "The URL to open when clicking button 1", onChange: onChange }, buttonTwoText: { type: OptionType.STRING, - description: "Button 2 text", + displayName: "Button 2 Text", + description: "The text to display on button 2", onChange: onChange, isValid: (value: string) => { if (value && value.length > 31) return "Button 2 text must be not longer than 31 characters."; @@ -253,7 +257,8 @@ const settings = definePluginSettings({ }, buttonTwoURL: { type: OptionType.STRING, - description: "Button 2 URL", + displayName: "Button 2 URL", + description: "The URL to open when clicking button 2", onChange: onChange } }); diff --git a/src/plugins/ircColors/index.ts b/src/plugins/ircColors/index.ts index af926043d..b7b6f1d3e 100644 --- a/src/plugins/ircColors/index.ts +++ b/src/plugins/ircColors/index.ts @@ -49,6 +49,7 @@ const settings = definePluginSettings({ default: false }, applyColorOnlyInDms: { + displayName: "Apply Color Only In DMs", description: "Apply colors only in direct messages; do not apply colors in servers.", restartNeeded: false, type: OptionType.BOOLEAN, diff --git a/src/plugins/lastfm/index.tsx b/src/plugins/lastfm/index.tsx index 77fa27841..a5c29e6ed 100644 --- a/src/plugins/lastfm/index.tsx +++ b/src/plugins/lastfm/index.tsx @@ -106,6 +106,7 @@ const settings = definePluginSettings({ type: OptionType.STRING, }, apiKey: { + displayName: "API Key", description: "last.fm api key", type: OptionType.STRING, }, @@ -186,7 +187,8 @@ const settings = definePluginSettings({ ], }, showLastFmLogo: { - description: "show the Last.fm logo by the album cover", + displayName: "Show Last.fm Logo", + description: "Show the Last.fm logo by the album cover", type: OptionType.BOOLEAN, default: true, } diff --git a/src/plugins/mentionAvatars/index.tsx b/src/plugins/mentionAvatars/index.tsx index c4a3adce1..6401ef1f4 100644 --- a/src/plugins/mentionAvatars/index.tsx +++ b/src/plugins/mentionAvatars/index.tsx @@ -16,6 +16,7 @@ import { User } from "discord-types/general"; const settings = definePluginSettings({ showAtSymbol: { type: OptionType.BOOLEAN, + displayName: "Show @ Symbol", description: "Whether the the @ symbol should be displayed on user mentions", default: true } diff --git a/src/plugins/messageLinkEmbeds/index.tsx b/src/plugins/messageLinkEmbeds/index.tsx index c248167f6..f3911a4b3 100644 --- a/src/plugins/messageLinkEmbeds/index.tsx +++ b/src/plugins/messageLinkEmbeds/index.tsx @@ -114,6 +114,7 @@ const settings = definePluginSettings({ ] }, idList: { + displayName: "ID List", description: "Guild/channel/user IDs to blacklist or whitelist (separate with comma)", type: OptionType.STRING, default: "" diff --git a/src/plugins/openInApp/index.ts b/src/plugins/openInApp/index.ts index 1c90b5290..c27e43e06 100644 --- a/src/plugins/openInApp/index.ts +++ b/src/plugins/openInApp/index.ts @@ -25,6 +25,7 @@ import type { MouseEvent } from "react"; interface URLReplacementRule { match: RegExp; replace: (...matches: string[]) => string; + displayName?: string; description: string; shortlinkMatch?: RegExp; accountViewReplace?: (userId: string) => string; @@ -59,6 +60,7 @@ const UrlReplacementRules: Record = { itunes: { match: /^https:\/\/(?:geo\.)?music\.apple\.com\/([a-z]{2}\/)?(album|artist|playlist|song|curator)\/([^/?#]+)\/?([^/?#]+)?(?:\?.*)?(?:#.*)?$/, replace: (_, lang, type, name, id) => id ? `itunes://music.apple.com/us/${type}/${name}/${id}` : `itunes://music.apple.com/us/${type}/${name}`, + displayName: "iTunes", description: "Open Apple Music links in the iTunes app" }, }; @@ -67,6 +69,7 @@ const pluginSettings = definePluginSettings( Object.entries(UrlReplacementRules).reduce((acc, [key, rule]) => { acc[key] = { type: OptionType.BOOLEAN, + displayName: rule.displayName, description: rule.description, default: true, }; diff --git a/src/plugins/pinDms/index.tsx b/src/plugins/pinDms/index.tsx index 59fee9c0f..8054a224b 100644 --- a/src/plugins/pinDms/index.tsx +++ b/src/plugins/pinDms/index.tsx @@ -48,11 +48,13 @@ export const settings = definePluginSettings({ }, canCollapseDmSection: { type: OptionType.BOOLEAN, + displayName: "Can Collapse DM Section", description: "Allow uncategorised DMs section to be collapsable", default: false }, dmSectionCollapsed: { type: OptionType.BOOLEAN, + displayName: "DM Section Collapsed", description: "Collapse DM section", default: false, hidden: true diff --git a/src/plugins/replaceGoogleSearch/index.tsx b/src/plugins/replaceGoogleSearch/index.tsx index 593c98632..343b1b530 100644 --- a/src/plugins/replaceGoogleSearch/index.tsx +++ b/src/plugins/replaceGoogleSearch/index.tsx @@ -29,6 +29,7 @@ const settings = definePluginSettings({ placeholder: "Google" }, customEngineURL: { + displayName: "Custom Engine URL", description: "The URL of your Engine", type: OptionType.STRING, placeholder: "https://google.com/search?q=" diff --git a/src/plugins/shikiCodeblocks.desktop/settings.ts b/src/plugins/shikiCodeblocks.desktop/settings.ts index f9fd3cc0f..26229bb36 100644 --- a/src/plugins/shikiCodeblocks.desktop/settings.ts +++ b/src/plugins/shikiCodeblocks.desktop/settings.ts @@ -51,6 +51,7 @@ export const settings = definePluginSettings({ }, tryHljs: { type: OptionType.SELECT, + displayName: "Try Highlight.js", description: "Use the more lightweight default Discord highlighter and theme.", options: [ { diff --git a/src/plugins/translate/settings.ts b/src/plugins/translate/settings.ts index 916c70bd2..e363fe3a7 100644 --- a/src/plugins/translate/settings.ts +++ b/src/plugins/translate/settings.ts @@ -63,6 +63,7 @@ export const settings = definePluginSettings({ }, deeplApiKey: { type: OptionType.STRING, + displayName: "DeepL API Key", description: "DeepL API key", default: "", placeholder: "Get your API key from https://deepl.com/your-account", diff --git a/src/plugins/viewIcons/index.tsx b/src/plugins/viewIcons/index.tsx index 12ee18e14..99e488050 100644 --- a/src/plugins/viewIcons/index.tsx +++ b/src/plugins/viewIcons/index.tsx @@ -62,6 +62,7 @@ const settings = definePluginSettings({ }, imgSize: { type: OptionType.SELECT, + displayName: "Image Size", description: "The image size to use", options: ["128", "256", "512", "1024", "2048", "4096"].map(n => ({ label: n, value: n, default: n === "1024" })) } diff --git a/src/plugins/xsOverlay/index.tsx b/src/plugins/xsOverlay/index.tsx index 4c5b7a80e..d4324d733 100644 --- a/src/plugins/xsOverlay/index.tsx +++ b/src/plugins/xsOverlay/index.tsx @@ -104,6 +104,7 @@ const settings = definePluginSettings({ }, preferUDP: { type: OptionType.BOOLEAN, + displayName: "Prefer UDP", description: "Enable if you use an older build of XSOverlay unable to connect through websockets. This setting is ignored on web.", default: false, disabled: () => IS_WEB @@ -120,11 +121,13 @@ const settings = definePluginSettings({ }, dmNotifications: { type: OptionType.BOOLEAN, + displayName: "DM Notifications", description: "Allow Direct Message notifications", default: true }, groupDmNotifications: { type: OptionType.BOOLEAN, + displayName: "Group DM Notifications", description: "Allow Group DM notifications", default: true },