mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
This commit is contained in:
parent
c14392a5ae
commit
06c098f411
5 changed files with 48 additions and 52 deletions
|
|
@ -349,12 +349,6 @@ const boot = () => {
|
|||
}
|
||||
event.preventDefault()
|
||||
})
|
||||
nativeTheme.on('updated', () => {
|
||||
mainWindow.webContents.send('siyuan-update-theme', {
|
||||
theme: nativeTheme.shouldUseDarkColors ? 'dark' : 'light',
|
||||
init: false,
|
||||
})
|
||||
})
|
||||
// 监听主题切换
|
||||
ipcMain.on('siyuan-config-theme', (event, theme) => {
|
||||
nativeTheme.themeSource = theme
|
||||
|
|
@ -400,10 +394,6 @@ const boot = () => {
|
|||
writeLog('exited ui')
|
||||
})
|
||||
ipcMain.on('siyuan-init', async () => {
|
||||
mainWindow.webContents.send('siyuan-update-theme', {
|
||||
theme: nativeTheme.shouldUseDarkColors ? 'dark' : 'light',
|
||||
init: true,
|
||||
})
|
||||
await fetch(getServer() + '/api/system/uiproc?pid=' + process.pid,
|
||||
{method: 'POST'})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue