feat(renderer): AppHeader with sidebar/preview toggles + theme toggle

This commit is contained in:
2026-06-05 11:40:54 +05:30
parent c715bb354c
commit 7fbbd60525
3 changed files with 91 additions and 0 deletions
+17
View File
@@ -10,3 +10,20 @@ declare global {
if (typeof window !== 'undefined' && !window.electronAPI) {
window.electronAPI = {};
}
// Mock matchMedia for next-themes (jsdom doesn't have it)
if (typeof window !== 'undefined') {
Object.defineProperty(window, 'matchMedia', {
writable: true,
value: (query: string) => ({
matches: false,
media: query,
onchange: null,
addListener: () => {},
removeListener: () => {},
addEventListener: () => {},
removeEventListener: () => {},
dispatchEvent: () => true,
}),
});
}