Notification: add DND option to widget and notification panel as requested in #212
This commit is contained in:
parent
60950fb461
commit
c8a056f332
4 changed files with 28 additions and 5 deletions
|
|
@ -43,6 +43,19 @@ NPanel {
|
|||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
NIconButton {
|
||||
icon: Settings.data.notifications.doNotDisturb ? "notifications_off" : "notifications_active"
|
||||
tooltipText: Settings.data.notifications.doNotDisturb ? "Do Not Disturb (ON)" : "Do Not Disturb (OFF)"
|
||||
sizeRatio: 0.8
|
||||
onClicked: {
|
||||
Settings.data.notifications.doNotDisturb = !Settings.data.notifications.doNotDisturb
|
||||
ToastService.showNotice(
|
||||
Settings.data.notifications.doNotDisturb ? "Do Not Disturb enabled" : "Do Not Disturb disabled",
|
||||
Settings.data.notifications.doNotDisturb ? "Notifications will be hidden but saved to history" : "Notifications will be shown normally",
|
||||
"notice", false, 2000)
|
||||
}
|
||||
}
|
||||
|
||||
NIconButton {
|
||||
icon: "delete"
|
||||
tooltipText: "Clear history"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue