diff --git a/apps/desktop/electron.vite.config.ts b/apps/desktop/electron.vite.config.ts index 6a9bc75fa..360a55bd9 100644 --- a/apps/desktop/electron.vite.config.ts +++ b/apps/desktop/electron.vite.config.ts @@ -78,6 +78,16 @@ export default defineConfig({ custom: FileSystemIconLoader('../../packages/ui/src/assets/icons'), }, }), + { + name: 'element-plus-night-theme', + transform(code, id) { + if (id.endsWith('packages/ui/src/styles/index.scss')) { + const nightThemeCode = code.replace(/html\.dark/g, 'html.night') + return `${code}\n${nightThemeCode}` + } + return code + }, + }, ], css: { preprocessorOptions: { diff --git a/apps/web/components.d.ts b/apps/web/components.d.ts index 1cb8d54af..4e094ce5e 100644 --- a/apps/web/components.d.ts +++ b/apps/web/components.d.ts @@ -21,7 +21,6 @@ declare module 'vue' { ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] ElContainer: typeof import('element-plus/es')['ElContainer'] ElDivider: typeof import('element-plus/es')['ElDivider'] - ElIcon: typeof import('element-plus/es')['ElIcon'] ElIconDelete: typeof import('@element-plus/icons-vue')['Delete'] ElIconPrinter: typeof import('@element-plus/icons-vue')['Printer'] ElIconUpload: typeof import('@element-plus/icons-vue')['Upload'] @@ -34,7 +33,6 @@ declare module 'vue' { ElSelect: typeof import('element-plus/es')['ElSelect'] ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] - Help: typeof import('./../../packages/ui/src/components/Help.vue')['default'] HelpView: typeof import('./../../packages/ui/src/components/HelpView.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts index ae2fb2550..32a46442c 100644 --- a/apps/web/vite.config.ts +++ b/apps/web/vite.config.ts @@ -64,6 +64,16 @@ export default defineConfig({ custom: FileSystemIconLoader('../../packages/ui/src/assets/icons'), }, }), + { + name: 'element-plus-night-theme', + transform(code, id) { + if (id.endsWith('packages/ui/src/styles/index.scss')) { + const nightThemeCode = code.replace(/html\.dark/g, 'html.night') + return `${code}\n${nightThemeCode}` + } + return code + }, + }, ], resolve: { alias: { diff --git a/packages/ui/src/components/SettingsView.vue b/packages/ui/src/components/SettingsView.vue index b6348354d..dbf713799 100644 --- a/packages/ui/src/components/SettingsView.vue +++ b/packages/ui/src/components/SettingsView.vue @@ -102,11 +102,7 @@ const AImodelsOptions = [ - + @@ -117,7 +113,6 @@ const AImodelsOptions = [ @@ -127,11 +122,7 @@ const AImodelsOptions = [ - + @@ -142,7 +133,7 @@ const AImodelsOptions = [ @@ -152,11 +143,7 @@ const AImodelsOptions = [ - + @@ -189,7 +176,6 @@ const AImodelsOptions = [ @@ -199,11 +185,7 @@ const AImodelsOptions = [ - + @@ -235,7 +217,6 @@ const AImodelsOptions = [