diff options
Diffstat (limited to 'src/plugins/settings.ts')
-rw-r--r-- | src/plugins/settings.ts | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/plugins/settings.ts b/src/plugins/settings.ts index afd3fd3..d26688a 100644 --- a/src/plugins/settings.ts +++ b/src/plugins/settings.ts @@ -28,12 +28,15 @@ export default definePlugin({ find: "Messages.ACTIVITY_SETTINGS", replacement: { match: /\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.ACTIVITY_SETTINGS\}/, - replace: (m, mod) => - `{section:${mod}.ID.HEADER,label:"Vencord"},` + - '{section:"VencordSetting",label:"Vencord",element:Vencord.Components.Settings},' + - '{section:"VencordUpdater",label:"Updater",element:Vencord.Components.Updater,predicate:()=>!IS_WEB},' + - `{section:${mod}.ID.DIVIDER},${m}` - + replace: (m, mod) => { + const updater = !IS_WEB ? '{section:"VencordUpdater",label:"Updater",element:Vencord.Components.Updater},' : ""; + return ( + `{section:${mod}.ID.HEADER,label:"Vencord"},` + + '{section:"VencordSetting",label:"Vencord",element:Vencord.Components.Settings},' + + updater + + `{section:${mod}.ID.DIVIDER},${m}` + ); + } } }] }); |