From 204f916b2a1a29198331c1d862998710b7681412 Mon Sep 17 00:00:00 2001 From: sadan4 <117494111+sadan4@users.noreply.github.com> Date: Thu, 14 Aug 2025 15:42:58 -0400 Subject: [PATCH 1/2] fix Settings UI and various plugins (#3608) Co-authored-by: Vendicated --- packages/discord-types/src/components.d.ts | 7 +----- src/plugins/betterSettings/index.tsx | 4 +-- src/plugins/consoleJanitor/index.tsx | 2 +- src/plugins/decor/settings.tsx | 2 +- .../decor/ui/modals/ChangeDecorationModal.tsx | 2 +- .../decor/ui/modals/CreateDecorationModal.tsx | 4 +-- src/plugins/fakeNitro/index.tsx | 2 +- src/plugins/ignoreActivities/index.tsx | 4 +-- src/plugins/showHiddenChannels/index.tsx | 2 +- src/webpack/common/FormText.tsx | 25 +++++++++++++++++++ src/webpack/common/components.ts | 2 +- src/webpack/common/utils.ts | 2 +- 12 files changed, 39 insertions(+), 19 deletions(-) create mode 100644 src/webpack/common/FormText.tsx diff --git a/packages/discord-types/src/components.d.ts b/packages/discord-types/src/components.d.ts index 1df037359..f9e778d8d 100644 --- a/packages/discord-types/src/components.d.ts +++ b/packages/discord-types/src/components.d.ts @@ -43,12 +43,7 @@ export type FormDivider = ComponentType<{ }>; -export type FormText = ComponentType & TextProps> & { Types: FormTextTypes; }; +export type FormText = ComponentType; export type Tooltip = ComponentType<{ text: ReactNode | ComponentType; diff --git a/src/plugins/betterSettings/index.tsx b/src/plugins/betterSettings/index.tsx index cbf94c2bc..8fecb2623 100644 --- a/src/plugins/betterSettings/index.tsx +++ b/src/plugins/betterSettings/index.tsx @@ -123,8 +123,8 @@ export default definePlugin({ find: "#{intl::USER_SETTINGS_ACTIONS_MENU_LABEL}", replacement: [ { - match: /(EXPERIMENTS:.+?)(\(0,\i.\i\)\(\))(?=\.filter\(\i=>\{let\{section:\i\}=)/, - replace: "$1$self.wrapMenu($2)" + match: /(\(0,\i.\i\)\(\))(?=\.filter\(\i=>\{let\{section:\i\}=)/, + replace: "$self.wrapMenu($1)" }, { match: /case \i\.\i\.DEVELOPER_OPTIONS:return \i;/, diff --git a/src/plugins/consoleJanitor/index.tsx b/src/plugins/consoleJanitor/index.tsx index 8a11cf01f..4981ac2ca 100644 --- a/src/plugins/consoleJanitor/index.tsx +++ b/src/plugins/consoleJanitor/index.tsx @@ -60,7 +60,7 @@ const AllowLevelSettings = ErrorBoundary.wrap(() => { return ( Filter List - Always allow loggers of these types + Always allow loggers of these types {Object.keys(settings.store.allowLevel).map(key => ( diff --git a/src/plugins/decor/settings.tsx b/src/plugins/decor/settings.tsx index 8e82bbae2..361ecf898 100644 --- a/src/plugins/decor/settings.tsx +++ b/src/plugins/decor/settings.tsx @@ -24,7 +24,7 @@ export const settings = definePluginSettings({ return
- + You can also access Decor decorations from the { diff --git a/src/plugins/decor/ui/modals/ChangeDecorationModal.tsx b/src/plugins/decor/ui/modals/ChangeDecorationModal.tsx index d9cfd50c2..ed81eaf06 100644 --- a/src/plugins/decor/ui/modals/ChangeDecorationModal.tsx +++ b/src/plugins/decor/ui/modals/ChangeDecorationModal.tsx @@ -83,7 +83,7 @@ function SectionHeader({ section }: SectionHeaderProps) { />} {hasSubtitle && - + {section.subtitle} } diff --git a/src/plugins/decor/ui/modals/CreateDecorationModal.tsx b/src/plugins/decor/ui/modals/CreateDecorationModal.tsx index 4afb74643..d772ac4a4 100644 --- a/src/plugins/decor/ui/modals/CreateDecorationModal.tsx +++ b/src/plugins/decor/ui/modals/CreateDecorationModal.tsx @@ -97,7 +97,7 @@ function CreateDecorationModal(props: ModalProps) { filters={[{ name: "Decoration file", extensions: ["png", "apng"] }]} onFileSelect={setFile} /> - + File should be APNG or PNG. @@ -107,7 +107,7 @@ function CreateDecorationModal(props: ModalProps) { value={name} onChange={setName} /> - + This name will be used when referring to this decoration. diff --git a/src/plugins/fakeNitro/index.tsx b/src/plugins/fakeNitro/index.tsx index 981a7da89..8dcb2300e 100644 --- a/src/plugins/fakeNitro/index.tsx +++ b/src/plugins/fakeNitro/index.tsx @@ -800,7 +800,7 @@ export default definePlugin({ however you do not have permissions to embed links in the current channel. Are you sure you want to send this message? Your FakeNitro items will appear as a link only. - + You can disable this notice in the plugin settings.
, diff --git a/src/plugins/ignoreActivities/index.tsx b/src/plugins/ignoreActivities/index.tsx index 94334f5af..88906c385 100644 --- a/src/plugins/ignoreActivities/index.tsx +++ b/src/plugins/ignoreActivities/index.tsx @@ -82,7 +82,7 @@ function recalculateActivities() { function ImportCustomRPCComponent() { return ( - Import the application id of the CustomRPC plugin to the filter list + Import the application id of the CustomRPC plugin to the filter list