From 661b700092b87127f22640f316df1471616b3c2c Mon Sep 17 00:00:00 2001 From: padreug Date: Tue, 21 Oct 2025 22:53:08 +0200 Subject: [PATCH] Adds support for completable task events Enables marking scheduled events as complete based on a new "event-type" tag. This change introduces the concept of "completable" events, specifically for events of type "task". It modifies the ScheduledEventCard component to: - Display completion information only for completable events - Show the "Mark Complete" button only for completable events that are not yet completed - Adjust the opacity and strikethrough styling based on the event's completable and completed status. The ScheduledEventService is updated to extract the event type from the "event-type" tag. --- .../nostr-feed/components/ScheduledEventCard.vue | 15 +++++++++------ .../nostr-feed/services/ScheduledEventService.ts | 3 +++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/modules/nostr-feed/components/ScheduledEventCard.vue b/src/modules/nostr-feed/components/ScheduledEventCard.vue index 49ae6c4..058425f 100644 --- a/src/modules/nostr-feed/components/ScheduledEventCard.vue +++ b/src/modules/nostr-feed/components/ScheduledEventCard.vue @@ -42,6 +42,9 @@ const isAdminEvent = computed(() => props.adminPubkeys.includes(props.event.pubk // Check if event is completed - call function directly const isCompleted = computed(() => props.getCompletion(eventAddress.value)?.completed || false) +// Check if event is completable (task type) +const isCompletable = computed(() => props.event.eventType === 'task') + // Format the date/time const formattedDate = computed(() => { try { @@ -114,13 +117,13 @@ function cancelMarkComplete() {