mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-11 23:53:03 -04:00
Make Settings & Settings Page
This commit is contained in:
parent
cb288e204d
commit
98cb301df5
18 changed files with 330 additions and 43 deletions
|
@ -1,4 +1,5 @@
|
|||
import Plugins from "plugins";
|
||||
import { Settings } from "../api/settings";
|
||||
import Logger from "../utils/logger";
|
||||
import { Patch } from "../utils/types";
|
||||
|
||||
|
@ -7,7 +8,7 @@ const logger = new Logger("PluginManager", "#a6d189");
|
|||
export const plugins = Plugins;
|
||||
export const patches = [] as Patch[];
|
||||
|
||||
for (const plugin of Plugins) if (plugin.patches) {
|
||||
for (const plugin of Plugins) if (plugin.patches && Settings.plugins[plugin.name].enabled) {
|
||||
for (const patch of plugin.patches) {
|
||||
patch.plugin = plugin.name;
|
||||
if (!Array.isArray(patch.replacement)) patch.replacement = [patch.replacement];
|
||||
|
@ -16,7 +17,7 @@ for (const plugin of Plugins) if (plugin.patches) {
|
|||
}
|
||||
|
||||
export function startAll() {
|
||||
for (const plugin of plugins) if (plugin.start) {
|
||||
for (const plugin of plugins) if (plugin.start && Settings.plugins[plugin.name].enabled) {
|
||||
try {
|
||||
logger.info("Starting plugin", plugin.name);
|
||||
plugin.start();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue