Skip to content

Commit e13e038

Browse files
authored
feat: sync monaco theme with ui switcher (#21)
1 parent 2d6ee1c commit e13e038

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

apps/desktop/src/features/sidebar/components/bottom-toolbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export function BottomToolbar({ onAction, onCopySchema, themeProps }: Props) {
169169
side="right"
170170
align="end"
171171
sideOffset={16}
172-
className="w-[340px] p-0 mb-2 ml-2"
172+
className="w-[400px] p-0 mb-2 ml-2"
173173
>
174174
<AppearancePanel />
175175
</PopoverContent>

apps/desktop/src/features/sql-console/components/sql-editor.tsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,20 @@ export function SqlEditor({ value, onChange, onExecute, isExecuting }: Props) {
2323

2424
function getThemeFromDocument(): MonacoTheme {
2525
if (typeof document !== "undefined") {
26-
return document.documentElement.classList.contains("light") ? "vs" : "vs-dark";
26+
const classList = document.documentElement.classList;
27+
28+
// Map custom app themes to included Monaco themes
29+
if (classList.contains("midnight")) return "dracula";
30+
if (classList.contains("forest")) return "nord";
31+
if (classList.contains("monokai")) return "monokai";
32+
if (classList.contains("github-dark")) return "github-dark";
33+
34+
// Handle variants
35+
if (classList.contains("claude-dark")) return "vs-dark";
36+
if (classList.contains("claude")) return "vs"; // Light mode
37+
38+
// Fallback to standard light/dark check
39+
return classList.contains("light") ? "vs" : "vs-dark";
2740
}
2841
return "vs-dark";
2942
}

vercel.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"framework": "vite",
3+
"buildCommand": "cd apps/desktop && bun run build",
4+
"outputDirectory": "apps/desktop/dist",
5+
"rewrites": [
6+
{
7+
"source": "/(.*)",
8+
"destination": "/index.html"
9+
}
10+
]
11+
}

0 commit comments

Comments
 (0)