mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 13:32:50 -05:00
@@ -343,16 +343,6 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
LazyLoader {
|
||||
id: powerConfirmModalLoader
|
||||
|
||||
active: false
|
||||
|
||||
ConfirmModal {
|
||||
id: powerConfirmModal
|
||||
}
|
||||
}
|
||||
|
||||
LazyLoader {
|
||||
id: processListPopoutLoader
|
||||
|
||||
@@ -489,22 +479,6 @@ Item {
|
||||
id: powerMenuModal
|
||||
|
||||
onPowerActionRequested: (action, title, message) => {
|
||||
if (SettingsData.powerActionConfirm) {
|
||||
powerConfirmModalLoader.active = true;
|
||||
if (powerConfirmModalLoader.item) {
|
||||
powerConfirmModalLoader.item.confirmButtonColor = action === "poweroff" ? Theme.error : action === "reboot" ? Theme.warning : Theme.primary;
|
||||
powerConfirmModalLoader.item.show(title, message, () => actionApply(action), function () {});
|
||||
}
|
||||
} else {
|
||||
actionApply(action);
|
||||
}
|
||||
}
|
||||
|
||||
onLockRequested: {
|
||||
lock.activate();
|
||||
}
|
||||
|
||||
function actionApply(action) {
|
||||
switch (action) {
|
||||
case "logout":
|
||||
SessionService.logout();
|
||||
@@ -524,6 +498,10 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
onLockRequested: {
|
||||
lock.activate();
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
PopoutService.powerMenuModal = powerMenuModal;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user