diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-09-19 22:43:50 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-19 22:43:50 +1000 |
| commit | 9dfb195913a0062a7d493d0128ebd50d86b5e493 (patch) | |
| tree | 7508ff58826b60c2855a4cd6b8f21dde71a37db3 /services | |
| parent | sidebar/notifs: add mouse actions (diff) | |
| download | caelestia-shell-9dfb195913a0062a7d493d0128ebd50d86b5e493.tar.gz caelestia-shell-9dfb195913a0062a7d493d0128ebd50d86b5e493.tar.bz2 caelestia-shell-9dfb195913a0062a7d493d0128ebd50d86b5e493.zip | |
sidebar/notifs: add actions (#648)
* add actions (not done, transfer between machines)
* notifs: fix persistence
* notifs: persist actions (appearance only)
* sidebar/notifs: add actions
* sidebar/notifs: add copy action
Also actions fill width
* sidebar/notifs: better actions
Fade at edges when scrollable
* sidebar/notifs: fix urgency colours & icon
* sidebar/notifs: remove unnecessary clipping
* sidebar/notifs: fix artifacts with actions
Diffstat (limited to 'services')
| -rw-r--r-- | services/Notifs.qml | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/services/Notifs.qml b/services/Notifs.qml index b651442..c5f0700 100644 --- a/services/Notifs.qml +++ b/services/Notifs.qml @@ -30,7 +30,10 @@ Singleton { appName: n.appName, image: n.image, expireTimeout: n.expireTimeout, - urgency: n.urgency + urgency: n.urgency, + resident: n.resident, + hasActionIcons: n.hasActionIcons, + actions: n.actions })))); } @@ -73,6 +76,12 @@ Singleton { root.list.push(notifComp.createObject(root, notif)); root.loaded = true; } + onLoadFailed: err => { + if (err === FileViewError.FileNotFound) { + root.loaded = true; + setText("[]"); + } + } } CustomShortcut { @@ -138,7 +147,13 @@ Singleton { property string image: notification?.image ?? "" property real expireTimeout: notification?.expireTimeout ?? Config.notifs.defaultExpireTimeout property int urgency: notification?.urgency ?? NotificationUrgency.Normal - readonly property list<NotificationAction> actions: notification?.actions ?? [] + property bool resident: notification?.resident ?? false + property bool hasActionIcons: notification?.hasActionIcons ?? false + property list<var> actions: notification?.actions.map(a => ({ + identifier: a.identifier, + text: a.text, + invoke: () => a.invoke() + })) ?? [] readonly property Timer timer: Timer { running: true |