Skip to content

Commit d8d6fe5

Browse files
Set dark as default
Make theme toggle compact and place beside MCP in admin panel; use icon variant and default to dark, with LanguageSwitcher retained X-Lovable-Edit-ID: edt-c20858c1-2b87-4dcb-a88a-33bbd6206822
2 parents 6db629f + c372ad0 commit d8d6fe5

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

src/components/AdminLayout.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -776,11 +776,11 @@ export default function AdminLayout({ children }: AdminLayoutProps) {
776776
)}
777777
{/* MCP Status, Theme & Language - Inline */}
778778
<div className={cn("flex items-center gap-2", collapsed ? "justify-center flex-col" : "justify-between px-1")}>
779-
<McpServerStatus />
780779
<div className="flex items-center gap-1">
781-
<ThemeToggle variant="dropdown" />
782-
<LanguageSwitcher />
780+
<McpServerStatus />
781+
<ThemeToggle variant="icon" />
783782
</div>
783+
<LanguageSwitcher />
784784
</div>
785785
<Button
786786
variant="outline"

src/components/ui/theme-toggle.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ export function ThemeToggle({
5959
size="icon"
6060
onClick={toggleTheme}
6161
className={cn(
62-
'h-9 w-9 rounded-lg transition-colors',
62+
'h-7 w-7 rounded-md transition-colors',
6363
'hover:bg-muted',
6464
className
6565
)}
6666
aria-label={`Current theme: ${mode}. Click to change.`}
6767
>
68-
<CurrentIcon className="h-4 w-4" />
68+
<CurrentIcon className="h-3.5 w-3.5" />
6969
</Button>
7070
</TooltipTrigger>
7171
<TooltipContent side="right">
@@ -113,13 +113,13 @@ export function ThemeToggle({
113113
variant="ghost"
114114
size="icon"
115115
className={cn(
116-
'h-9 w-9 rounded-lg transition-colors',
116+
'h-7 w-7 rounded-md transition-colors',
117117
'hover:bg-muted',
118118
className
119119
)}
120120
aria-label="Toggle theme"
121121
>
122-
<CurrentIcon className="h-4 w-4" />
122+
<CurrentIcon className="h-3.5 w-3.5" />
123123
</Button>
124124
</DropdownMenuTrigger>
125125
<DropdownMenuContent align="end" className="min-w-[140px]">

src/theme/ThemeProvider.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ const getStoredTheme = (): ThemeMode => {
5151
if (stored === 'dark' || stored === 'light' || stored === 'auto') {
5252
return stored;
5353
}
54+
// Default to 'auto' which follows browser settings
5455
return 'auto';
5556
};
5657

0 commit comments

Comments
 (0)