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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user