From d2b202c25f93a5cbb8f96c949d062c9c5d3f2197 Mon Sep 17 00:00:00 2001 From: Ly-sec Date: Mon, 25 Aug 2025 10:33:48 +0200 Subject: [PATCH] Fully comment ArchUpdaterService --- Modules/Notification/Notification.qml | 33 +++++++++++++++++++++++++++ Services/ArchUpdaterService.qml | 3 ++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/Modules/Notification/Notification.qml b/Modules/Notification/Notification.qml index 30d59f5..a6d554a 100644 --- a/Modules/Notification/Notification.qml +++ b/Modules/Notification/Notification.qml @@ -202,6 +202,39 @@ Variants { maximumLineCount: 5 elide: Text.ElideRight } + + // Notification actions + RowLayout { + visible: model.actions && model.actions.length > 0 + spacing: Style.marginXS * scaling + Layout.fillWidth: true + Layout.topMargin: Style.marginS * scaling + + Repeater { + model: model.actions || [] + delegate: NPill { + text: modelData.text || modelData.identifier || "Action" + icon: modelData.identifier || "" + tooltipText: modelData.text || modelData.identifier || "Action" + sizeMultiplier: 0.7 + Layout.fillWidth: true + forceOpen: true + + // Style action buttons differently + pillColor: Color.mPrimary + textColor: Color.mOnPrimary + iconCircleColor: Color.mPrimary + iconTextColor: Color.mOnPrimary + + onClicked: { + // Invoke the notification action + modelData.invoke() + // Animate out the notification after action + animateOut() + } + } + } + } } NIconButton { diff --git a/Services/ArchUpdaterService.qml b/Services/ArchUpdaterService.qml index 611ce59..c5f250a 100644 --- a/Services/ArchUpdaterService.qml +++ b/Services/ArchUpdaterService.qml @@ -1,4 +1,4 @@ -pragma Singleton +/*pragma Singleton import Quickshell import QtQuick @@ -154,3 +154,4 @@ Singleton { // Initial check Component.onCompleted: doPoll() } +*/ \ No newline at end of file