From 6147e96cc95eaf91e6188fbafbbe2401c1b0d0be Mon Sep 17 00:00:00 2001 From: SethBurkart123 Date: Sat, 29 Mar 2025 22:33:06 +1100 Subject: [PATCH] feat: remove theme toggle --- src/plugins/built-in/themes/index.ts | 47 +++------------------------- 1 file changed, 5 insertions(+), 42 deletions(-) diff --git a/src/plugins/built-in/themes/index.ts b/src/plugins/built-in/themes/index.ts index 9373582a..9230e4ce 100644 --- a/src/plugins/built-in/themes/index.ts +++ b/src/plugins/built-in/themes/index.ts @@ -1,53 +1,16 @@ import type { Plugin } from '../../core/types'; -import { BasePlugin, BooleanSetting } from '../../core/settings'; import { ThemeManager } from './theme-manager'; -// Define only the typed settings - no need for redundant interface -class ThemePluginClass extends BasePlugin { - @BooleanSetting({ - default: true, - title: "Themes", - description: "Adds a theme selector to the settings page" - }) - enabled!: boolean; -} - -// Create an instance to extract settings -const settingsInstance = new ThemePluginClass(); - -const themesPlugin: Plugin = { +const themesPlugin: Plugin = { id: 'themes', name: 'Themes', description: 'Adds a theme selector to the settings page', version: '1.0.0', - settings: settingsInstance.settings, - run: async (api) => { - console.debug('[ThemesPlugin] Starting plugin'); - const themeManager = ThemeManager.getInstance(); + settings: {}, - if (api.settings.enabled) { - console.debug('[ThemesPlugin] Plugin enabled, initializing theme manager'); - await themeManager.initialize(); - } - - const enabledCallback = (value: string | number | boolean) => { - console.debug('[ThemesPlugin] Enabled setting changed:', value); - if (value === true) { - console.debug('[ThemesPlugin] Plugin enabled, initializing theme manager'); - void themeManager.initialize(); - } else if (value === false) { - console.debug('[ThemesPlugin] Plugin disabled, cleaning up theme manager'); - void themeManager.cleanup(); - } - } - - api.settings.onChange('enabled', enabledCallback); - - return () => { - console.debug('[ThemesPlugin] Plugin cleanup'); - api.settings.offChange('enabled', enabledCallback); - void themeManager.cleanup(); - } + run: async (_) => { + const themeManager = ThemeManager.getInstance(); + await themeManager.initialize(); } };