feat: add dark and light theme

This commit is contained in:
kangfenmao
2024-07-29 17:14:49 +08:00
parent c64e529cb0
commit 16977cbace
40 changed files with 611 additions and 159 deletions
+1
View File
@@ -12,6 +12,7 @@ declare global {
openWebsite: (url: string) => void
setProxy: (proxy: string | undefined) => void
saveFile: (path: string, content: string) => void
setTheme: (theme: 'light' | 'dark') => void
}
}
}
+2 -1
View File
@@ -7,7 +7,8 @@ const api = {
checkForUpdate: () => ipcRenderer.invoke('check-for-update'),
openWebsite: (url: string) => ipcRenderer.invoke('open-website', url),
setProxy: (proxy: string) => ipcRenderer.invoke('set-proxy', proxy),
saveFile: (path: string, content: string) => ipcRenderer.invoke('save-file', path, content)
saveFile: (path: string, content: string) => ipcRenderer.invoke('save-file', path, content),
setTheme: (theme: 'light' | 'dark') => ipcRenderer.invoke('set-theme', theme)
}
// Use `contextBridge` APIs to expose Electron APIs to