diff options
author | Vendicated <vendicated@riseup.net> | 2022-08-31 23:04:18 +0200 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2022-08-31 23:04:18 +0200 |
commit | 7ce37f858c0a1e09e1f6497fbd32b172cc9b3c6c (patch) | |
tree | 2a9add59fcced15e1760f752bb10040e229f84fd /src/components/Settings.tsx | |
parent | b2f762fda8ec93feab123891e7c01efda00388c8 (diff) | |
download | Vencord-7ce37f858c0a1e09e1f6497fbd32b172cc9b3c6c.tar.gz Vencord-7ce37f858c0a1e09e1f6497fbd32b172cc9b3c6c.tar.bz2 Vencord-7ce37f858c0a1e09e1f6497fbd32b172cc9b3c6c.zip |
Unindent, plugins is now an object instead of []
Diffstat (limited to 'src/components/Settings.tsx')
-rw-r--r-- | src/components/Settings.tsx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/components/Settings.tsx b/src/components/Settings.tsx index ee293bb..c274366 100644 --- a/src/components/Settings.tsx +++ b/src/components/Settings.tsx @@ -45,7 +45,7 @@ export default ErrorBoundary.wrap(function Settings(props) { </Switch> <Forms.FormDivider /> <Forms.FormTitle tag="h5">Plugins</Forms.FormTitle> - {Plugins.map(p => ( + {Object.values(Plugins).map(p => ( <Switch disabled={p.required === true} key={p.name} @@ -54,8 +54,11 @@ export default ErrorBoundary.wrap(function Settings(props) { settings.plugins[p.name].enabled = v; if (v) { p.dependencies?.forEach(d => { - // TODO: start every dependency settings.plugins[d].enabled = true; + if (!Plugins[d].started && !stopPlugin) { + // TODO show notification + settings.plugins[p.name].enabled = false; + } }); if (!p.started && !startPlugin(p)) { // TODO show notification |