mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-17 15:37:34 +08:00
✨ Feature(custom): add ipc event handlers for mini window icon and set on top
This commit is contained in:
@@ -325,6 +325,16 @@ export default {
|
||||
settingWindow.hide()
|
||||
})
|
||||
|
||||
ipcMain.on('updateMiniIcon', (_: IpcMainEvent, iconPath: string) => {
|
||||
const miniWindow = windowManager.get(IWindowList.MINI_WINDOW)!
|
||||
miniWindow.webContents.send('updateMiniIcon', iconPath)
|
||||
})
|
||||
|
||||
ipcMain.on('miniWindowOntop', (_: IpcMainEvent, val: boolean) => {
|
||||
const miniWindow = windowManager.get(IWindowList.MINI_WINDOW)!
|
||||
miniWindow.setAlwaysOnTop(val)
|
||||
})
|
||||
|
||||
ipcMain.on('refreshSettingWindow', () => {
|
||||
const settingWindow = windowManager.get(IWindowList.SETTING_WINDOW)!
|
||||
settingWindow.webContents.reloadIgnoringCache()
|
||||
|
||||
Reference in New Issue
Block a user