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 = [
@@ -247,11 +228,7 @@ const AImodelsOptions = [
-
+
@@ -270,7 +247,6 @@ const AImodelsOptions = [
@@ -347,7 +323,6 @@ const AImodelsOptions = [
@@ -357,11 +332,7 @@ const AImodelsOptions = [
-
+
@@ -380,11 +351,7 @@ const AImodelsOptions = [
-
+
diff --git a/packages/ui/src/styles/variable.scss b/packages/ui/src/styles/variable.scss
index 6013baa0f..dc3e4b3b4 100644
--- a/packages/ui/src/styles/variable.scss
+++ b/packages/ui/src/styles/variable.scss
@@ -1,9 +1,12 @@
-@forward './themes/light.scss';
-@forward './themes/dark.scss';
-@forward './themes/night.scss';
+@use 'element-plus/theme-chalk/dark/css-vars.css' as *;
+@use './themes/light.scss' as *;
+@use './themes/dark.scss' as *;
+@use './themes/night.scss' as *;
/* Element UI CSS Vars Colors */
-:root {
+html.light,
+html.dark,
+html.night {
--el-color-primary: var(--color-main-green);
--el-color-primary-light-3: #34c387e0;
--el-color-primary-light-5: #34c387b6;
@@ -16,10 +19,10 @@
--el-color-danger: var(--color-minor-red);
--el-color-error: var(--color-minor-red);
}
-/* Uncomment and add this code to change Element UI color for different themes. */
-// html.dark {
-// --el-color-primary: black;
-// }
+
+html.night {
+ color-scheme: night;
+}
/* Common Scss Vars */
$font-family: