From 3aa63bd6372fa3d2aa88048be340005753bd1cc8 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 20 Jul 2025 18:19:55 +0200 Subject: [PATCH] Improve theme toggle UI with better icon and tooltips (#438) --- web/src/client/components/theme-toggle-icon.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/web/src/client/components/theme-toggle-icon.ts b/web/src/client/components/theme-toggle-icon.ts index c75161cf..ebf2b71a 100644 --- a/web/src/client/components/theme-toggle-icon.ts +++ b/web/src/client/components/theme-toggle-icon.ts @@ -103,15 +103,18 @@ export class ThemeToggleIcon extends LitElement { case 'system': return html` - + `; } } private getTooltip() { - const current = this.theme.charAt(0).toUpperCase() + this.theme.slice(1); - const next = this.theme === 'light' ? 'Dark' : this.theme === 'dark' ? 'System' : 'Light'; + const current = + this.theme === 'system' + ? 'Auto (System)' + : this.theme.charAt(0).toUpperCase() + this.theme.slice(1); + const next = this.theme === 'light' ? 'Dark' : this.theme === 'dark' ? 'Auto' : 'Light'; return `Theme: ${current} (click for ${next})`; }