From 786dec41e4b5466c3c415f584654bd8a6096b856 Mon Sep 17 00:00:00 2001 From: Julian Freeman Date: Sun, 22 Feb 2026 18:13:05 -0400 Subject: [PATCH] add dark theme --- src/App.vue | 152 ++++++++++++++++++++++------------------- src/stores/settings.ts | 2 + src/style.css | 24 +++++++ 3 files changed, 106 insertions(+), 72 deletions(-) diff --git a/src/App.vue b/src/App.vue index 9cc1407..c24ad4a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,5 +1,5 @@ - diff --git a/src/stores/settings.ts b/src/stores/settings.ts index 1c0c44c..485f1db 100644 --- a/src/stores/settings.ts +++ b/src/stores/settings.ts @@ -32,6 +32,7 @@ Produce only the {TARGET_LANG} translation, without any additional explanations {TEXT}`; export const useSettingsStore = defineStore('settings', () => { + const isDark = useLocalStorage('is-dark', false); const ollamaApiAddress = useLocalStorage('ollama-api-address', 'http://localhost:11434'); const modelName = useLocalStorage('model-name', 'translategemma:12b'); const enableStreaming = useLocalStorage('enable-streaming', true); @@ -56,6 +57,7 @@ export const useSettingsStore = defineStore('settings', () => { }; return { + isDark, ollamaApiAddress, modelName, enableStreaming, diff --git a/src/style.css b/src/style.css index f1d8c73..916ec74 100644 --- a/src/style.css +++ b/src/style.css @@ -1 +1,25 @@ @import "tailwindcss"; + +@variant dark (&:where(.dark, .dark *)); + +/* Custom Scrollbar */ +::-webkit-scrollbar { + width: 8px; +} +::-webkit-scrollbar-track { + background: transparent; +} +::-webkit-scrollbar-thumb { + background: #e2e8f0; + border-radius: 4px; +} +::-webkit-scrollbar-thumb:hover { + background: #cbd5e1; +} + +.dark ::-webkit-scrollbar-thumb { + background: #334155; +} +.dark ::-webkit-scrollbar-thumb:hover { + background: #475569; +}