|
@@ -11,20 +11,20 @@ function createWindow () {
|
|
|
})
|
|
|
|
|
|
win.loadFile('index.html')
|
|
|
+}
|
|
|
|
|
|
- ipcMain.handle('dark-mode:toggle', () => {
|
|
|
- if (nativeTheme.shouldUseDarkColors) {
|
|
|
- nativeTheme.themeSource = 'light'
|
|
|
- } else {
|
|
|
- nativeTheme.themeSource = 'dark'
|
|
|
- }
|
|
|
- return nativeTheme.shouldUseDarkColors
|
|
|
- })
|
|
|
+ipcMain.handle('dark-mode:toggle', () => {
|
|
|
+ if (nativeTheme.shouldUseDarkColors) {
|
|
|
+ nativeTheme.themeSource = 'light'
|
|
|
+ } else {
|
|
|
+ nativeTheme.themeSource = 'dark'
|
|
|
+ }
|
|
|
+ return nativeTheme.shouldUseDarkColors
|
|
|
+})
|
|
|
|
|
|
- ipcMain.handle('dark-mode:system', () => {
|
|
|
- nativeTheme.themeSource = 'system'
|
|
|
- })
|
|
|
-}
|
|
|
+ipcMain.handle('dark-mode:system', () => {
|
|
|
+ nativeTheme.themeSource = 'system'
|
|
|
+})
|
|
|
|
|
|
app.whenReady().then(() => {
|
|
|
createWindow()
|