mirror of
https://github.com/HugoAura/Seewo-HugoAura.git
synced 2026-06-23 09:14:28 +08:00
[✨ Feat] {#21} Add AppBar window oper icons
1. [+] {#21} 增加了应用栏 (顶栏) 上的窗口操作按钮
2. [-] 删掉了几个调试时留下的 console.debug
This commit is contained in:
@@ -6,6 +6,22 @@ global.__HUGO_AURA_UI_REACTIVES__.config = {
|
||||
};
|
||||
|
||||
global.__HUGO_AURA_UI_FUNCTIONS__.config = {
|
||||
closeWindow: async () => {
|
||||
if (global.__HUGO_AURA_UI_REACTIVES__.config.isConfigPendingWrite) {
|
||||
await global.__HUGO_AURA_UI_FUNCTIONS__.config.handleSaveConfig();
|
||||
}
|
||||
|
||||
global.ipcRenderer.send("$aura.base.closeWindow", {
|
||||
targetWindowKey: "assistant",
|
||||
});
|
||||
},
|
||||
|
||||
minimizeWindow: () => {
|
||||
global.ipcRenderer.send("$aura.base.minimizeWindow", {
|
||||
targetWindowKey: "assistant",
|
||||
});
|
||||
},
|
||||
|
||||
handleNavBack: () => {
|
||||
if (global.__HUGO_AURA_UI_REACTIVES__.config.isInSubPage) {
|
||||
const acsDialogAreaEl = document.getElementsByClassName(
|
||||
@@ -30,6 +46,19 @@ global.__HUGO_AURA_UI_FUNCTIONS__.config = {
|
||||
}
|
||||
},
|
||||
|
||||
handleNavHome: async () => {
|
||||
if (global.__HUGO_AURA_UI_REACTIVES__.config.isConfigPendingWrite) {
|
||||
global.__HUGO_AURA_UI_FUNCTIONS__.config.handleSaveConfig();
|
||||
}
|
||||
|
||||
global.__HUGO_AURA_UI_FUNCTIONS__.config.hideConfigPage();
|
||||
|
||||
setTimeout(() => {
|
||||
const onLeaveEvent = new CustomEvent("onCurConfigPageLeave");
|
||||
document.dispatchEvent(onLeaveEvent);
|
||||
}, 500);
|
||||
},
|
||||
|
||||
hideConfigPage: async () => {
|
||||
const defaultHeader = document.getElementsByClassName(
|
||||
"index__header__16DmR2a5"
|
||||
|
||||
Reference in New Issue
Block a user