From 9aa8c28bef0669d79843f035059c9dc85a971cb9 Mon Sep 17 00:00:00 2001 From: padreug Date: Tue, 21 Oct 2025 23:14:56 +0200 Subject: [PATCH] Replaces custom expand/collapse with Collapsible Migrates ScheduledEventCard to use the Collapsible component from the UI library. This simplifies the component's structure and improves accessibility by leveraging the built-in features of the Collapsible component. Removes custom logic for managing the expanded/collapsed state. --- .../components/ScheduledEventCard.vue | 158 ++++++++---------- 1 file changed, 68 insertions(+), 90 deletions(-) diff --git a/src/modules/nostr-feed/components/ScheduledEventCard.vue b/src/modules/nostr-feed/components/ScheduledEventCard.vue index 5acfa51..b28fdef 100644 --- a/src/modules/nostr-feed/components/ScheduledEventCard.vue +++ b/src/modules/nostr-feed/components/ScheduledEventCard.vue @@ -10,6 +10,11 @@ import { DialogHeader, DialogTitle, } from '@/components/ui/dialog' +import { + Collapsible, + CollapsibleContent, + CollapsibleTrigger, +} from '@/components/ui/collapsible' import { Calendar, MapPin, Clock, CheckCircle } from 'lucide-vue-next' import type { ScheduledEvent, EventCompletion } from '../services/ScheduledEventService' @@ -33,9 +38,6 @@ const emit = defineEmits() // Confirmation dialog state const showConfirmDialog = ref(false) -// Collapsed state (collapsed by default) -const isExpanded = ref(false) - // Event address for tracking completion const eventAddress = computed(() => `31922:${props.event.pubkey}:${props.event.dTag}`) @@ -116,81 +118,56 @@ function confirmMarkComplete() { function cancelMarkComplete() { showConfirmDialog.value = false } - -// Toggle expanded/collapsed state -function toggleExpanded() { - isExpanded.value = !isExpanded.value -}