1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-05-10 06:19:36 -04:00

feat(SystemUpdate): Implement system update IPC commands

This commit is contained in:
purian23
2026-05-08 21:00:23 -04:00
parent d8835f2bc6
commit 6167f22837
6 changed files with 104 additions and 32 deletions

View File

@@ -1160,6 +1160,39 @@ Item {
target: "plugins"
}
IpcHandler {
function toggle(): string {
if (PopoutService.systemUpdatePopout?.shouldBeVisible) {
PopoutService.systemUpdatePopout.close();
return "SYSTEMUPDATER_TOGGLE_SUCCESS";
}
const bar = root.getPreferredBar("systemUpdateButtonRef");
if (bar) {
bar.triggerSystemUpdate();
return "SYSTEMUPDATER_TOGGLE_SUCCESS";
}
return "SYSTEMUPDATER_TOGGLE_FAILED";
}
function open(): string {
if (PopoutService.systemUpdatePopout?.shouldBeVisible)
return "SYSTEMUPDATER_ALREADY_OPEN";
const bar = root.getPreferredBar("systemUpdateButtonRef");
if (bar) {
bar.triggerSystemUpdate();
return "SYSTEMUPDATER_OPEN_SUCCESS";
}
return "SYSTEMUPDATER_OPEN_FAILED";
}
function close(): string {
PopoutService.closeSystemUpdate();
return "SYSTEMUPDATER_CLOSE_SUCCESS";
}
target: "systemupdater"
}
IpcHandler {
function open(): string {
if (!PopoutService.clipboardHistoryModal) {