feat: sql database for notifications

This commit is contained in:
2026-11-01 12:43:21 +01:00
parent 8271e5d013
commit f8101b2807
11 changed files with 1667 additions and 281 deletions
+3 -2
View File
@@ -4,16 +4,17 @@ import QtQuick
import QtQuick.Layouts
import Quickshell
import ZShell.Config
import ZShell.Components
import ZShell.Services
import qs.Components
import qs.Services
import qs.Daemons
CustomRect {
id: root
readonly property CustomText body: (expandedContent.item as ExpandedBody)?.body ?? null
required property bool expanded
required property NotifServer.Notif modelData
required property NotificationRow modelData
readonly property real nonAnimHeight: expanded ? summary.implicitHeight + expandedContent.implicitHeight + expandedContent.anchors.topMargin + Tokens.padding.medium * 2 : summaryHeightMetrics.height
required property ScreenState screenState
+4 -4
View File
@@ -5,15 +5,15 @@ import QtQuick.Layouts
import Quickshell
import Quickshell.Widgets
import ZShell.Config
import ZShell.Services
import qs.Components
import qs.Effects
import qs.Services
import qs.Daemons
Item {
id: root
required property NotifServer.Notif notif
required property NotificationRow notif
Layout.fillWidth: true
implicitHeight: flickable.contentHeight
@@ -36,7 +36,7 @@ Item {
{
isClose: true
},
...(root.notif?.actions ?? []),
...Array.from(root.notif?.actions ?? []),
{
isCopy: true
}
@@ -84,7 +84,7 @@ Item {
Quickshell.clipboardText = root.notif.body;
actionInner.item.text = "inventory";
copyTimer.start();
} else if (action.modelData.invoke) {
} else if (action.modelData.invokable) {
action.modelData.invoke();
} else if (!root.notif.resident) {
root.notif.close();
+1 -2
View File
@@ -81,9 +81,8 @@ Item {
Behavior on opacity {
Anim {}
}
sourceComponent: SnapLayout {
sourceComponent: ColumnLayout {
spacing: 20
orientation: Qt.Vertical
CustomText {
Layout.alignment: Qt.AlignHCenter
+2 -2
View File
@@ -3,8 +3,8 @@ pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import ZShell.Components
import ZShell.Services
import ZShell.Config
import qs.Daemons
import qs.Components
import qs.Services
@@ -37,7 +37,7 @@ LazyListView {
id: notif
required property int index
required property NotifServer.Notif modelData
required property NotificationRow modelData
property int startY
LazyListView.preferredHeight: modelData?.closed || LazyListView.removing ? 0 : notifInner.nonAnimHeight