feat: add NotificationOverview and NotificationOverviewLoader for notification history overview {alpha}

This commit is contained in:
Hannes
2026-08-31 17:52:13 +02:00
parent f2b69382c7
commit 14da95aa3f
5 changed files with 891 additions and 6 deletions
+47 -6
View File
@@ -13,22 +13,63 @@ MouseArea {
cursorShape: Qt.PointingHandCursor
onClicked: {
NotificationS.soundEnabled = !NotificationS.soundEnabled
NotificationS.toggleOverview()
}
Rectangle {
anchors.fill: parent
color: "transparent"
color: notificationButton.containsMouse || NotificationS.overviewVisible ? Colors.tertiary : "transparent"
radius: Config.radius_fun(notificationButton.height)
border.width: Config.border_width
border.color: notificationButton.containsMouse || NotificationS.overviewVisible ? Colors.tertiary_fg : "transparent"
Text {
id: notificationText
anchors.centerIn: parent
// text: Quickshell.iconPath("discord")
text: NotificationS.soundEnabled ? "󰂚" : "󰂛"
text: "󰂚"
font.pixelSize: Config.bigIconSize(bar.height)
font.family: Config.font
color: Colors.secondaryContainer_fg
color: NotificationS.overviewVisible ? Colors.tertiary_fg : Colors.secondaryContainer_fg
}
// count badge
Rectangle {
id: badge
visible: NotificationS.trackedNotifications.values.length > 0
width: badgeText.implicitWidth + 6
height: badgeText.implicitHeight + 4
radius: height / 2
color: Colors.errorContainer
border.width: 1
border.color: Colors.error
anchors.top: parent.top
anchors.right: parent.right
anchors.topMargin: 2
anchors.rightMargin: 2
Text {
id: badgeText
anchors.centerIn: parent
text: NotificationS.trackedNotifications.values.length > 99 ? "99+" : NotificationS.trackedNotifications.values.length
font.family: Config.font
font.pixelSize: Config.labelSize(bar.height) * 0.6
font.bold: true
color: Colors.error_fg
}
}
// muted indicator dot
Rectangle {
visible: !NotificationS.soundEnabled
width: 8
height: 8
radius: 4
color: Colors.error
border.width: 1
border.color: Colors.error_fg
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.bottomMargin: 3
anchors.rightMargin: 3
}
// Image{