Skip to content
This repository was archived by the owner on Aug 18, 2024. It is now read-only.

Commit

Permalink
make vencord switching functional
Browse files Browse the repository at this point in the history
  • Loading branch information
smartfrigde committed Jul 15, 2024
1 parent 03b4065 commit 82d429f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions plugins/armcordSettings/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ function restartRequired(payload) {
export function onLoad() {
refreshSettings()
store.i18n = window.armcord.translations
// make this better
if (window.armcord.settings.config.mods = "vencord") {
store.vencord = true;
} else {
store.vencord = false;
}
log("ArmCord Settings")
settingsPages
dispatcher.subscribe("TRACK", restartRequired)
Expand Down
2 changes: 1 addition & 1 deletion plugins/armcordSettings/pages/SettingsPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function SettingsPage() {
>
ArmCord CSP
</SwitchItem>
<SwitchItem note={store.i18n["settings-mod-vencord"]} value={store.settings.autoScroll}>
<SwitchItem note={store.i18n["settings-mod-vencord"]} value={store.vencord} onChange={(e) => set("vencord", e)}>
Vencord
</SwitchItem>
<SwitchItem
Expand Down
7 changes: 7 additions & 0 deletions plugins/armcordSettings/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ export function refreshSettings() {
console.log(store.settings)
}
export function set(key, value) {
if (key == "vencord" && value == true) {
store.vencord = true;
armcord.settings.setConfig("mods", "vencord")
} else {
store.vencord = false;
armcord.settings.setConfig("mods", "none")
}
store.settings[key] = value;
console.log(key + ": " + store.settings[key])
armcord.settings.setConfig(key, value)
Expand Down

0 comments on commit 82d429f

Please sign in to comment.