@@ -22,18 +22,18 @@ export function toggleTheme(): void {
22
22
23
23
if ( currentMode === 'manual' ) {
24
24
if ( currentTheme === 'dark' ) {
25
- // Dark -> Light
25
+ // If we're in dark mode, switch to light mode
26
26
newTheme = 'light' ;
27
27
newMode = 'manual' ;
28
28
} else {
29
- // Light -> Auto
29
+ // If we're in light mode, switch to auto mode
30
30
newMode = 'auto' ;
31
31
// When switching to auto mode, try to detect theme immediately
32
32
tryDetectThemeInPopup ( ) ;
33
33
return ; // Exit early as tryDetectThemeInPopup will handle the rest
34
34
}
35
35
} else {
36
- // Auto -> Dark
36
+ // If we're in auto mode, switch to dark mode
37
37
newTheme = 'dark' ;
38
38
newMode = 'manual' ;
39
39
}
@@ -120,13 +120,16 @@ function updateThemeUI(theme: string, mode: string = 'manual') {
120
120
if ( ! themeIcon || ! themeText ) return ;
121
121
122
122
if ( mode === 'auto' ) {
123
+ // Show that auto theme is enabled
123
124
themeIcon . textContent = '🔄' ;
124
- themeText . textContent = 'Auto Theme ' ;
125
+ themeText . textContent = 'Auto' ;
125
126
} else if ( theme === 'dark' ) {
126
- themeIcon . textContent = '☀️' ;
127
- themeText . textContent = 'Light Mode' ;
128
- } else {
127
+ // Show that dark theme is enabled
129
128
themeIcon . textContent = '🌙' ;
130
- themeText . textContent = 'Dark Mode' ;
129
+ themeText . textContent = 'Dark' ;
130
+ } else {
131
+ // Show that light theme is enabled
132
+ themeIcon . textContent = '☀️' ;
133
+ themeText . textContent = 'Light' ;
131
134
}
132
135
}
0 commit comments