mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-06-02 10:19:39 +08:00
✨ Feature: add two new config items to control mini window and main window
This commit is contained in:
@@ -214,6 +214,12 @@ export default {
|
||||
|
||||
ipcMain.on('openSettingWindow', () => {
|
||||
windowManager.get(IWindowList.SETTING_WINDOW)!.show()
|
||||
const autoCloseMiniWindow = db.get('settings.autoCloseMiniWindow') || false
|
||||
if (autoCloseMiniWindow) {
|
||||
if (windowManager.has(IWindowList.MINI_WINDOW)) {
|
||||
windowManager.get(IWindowList.MINI_WINDOW)!.hide()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
ipcMain.on('openMiniWindow', () => {
|
||||
|
||||
@@ -30,6 +30,12 @@ const buildMiniPageMenu = () => {
|
||||
label: T('OPEN_MAIN_WINDOW'),
|
||||
click () {
|
||||
windowManager.get(IWindowList.SETTING_WINDOW)!.show()
|
||||
const autoCloseMiniWindow = db.get('settings.autoCloseMiniWindow') || false
|
||||
if (autoCloseMiniWindow) {
|
||||
if (windowManager.has(IWindowList.MINI_WINDOW)) {
|
||||
windowManager.get(IWindowList.MINI_WINDOW)!.hide()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user