diff --git a/src/modules/nostr-feed/components/ScheduledEventCard.vue b/src/modules/nostr-feed/components/ScheduledEventCard.vue index 3abb133..25d312a 100644 --- a/src/modules/nostr-feed/components/ScheduledEventCard.vue +++ b/src/modules/nostr-feed/components/ScheduledEventCard.vue @@ -2,6 +2,7 @@ import { computed, ref } from 'vue' import { Badge } from '@/components/ui/badge' import { Button } from '@/components/ui/button' +import { Checkbox } from '@/components/ui/checkbox' import { Dialog, DialogContent, @@ -46,6 +47,7 @@ const authService = injectService(SERVICE_TOKENS.AUTH_SERVICE) // Confirmation dialog state const showConfirmDialog = ref(false) +const hasConfirmedCommunication = ref(false) // Event address for tracking completion const eventAddress = computed(() => `31922:${props.event.pubkey}:${props.event.dTag}`) @@ -178,6 +180,11 @@ function handleUnclaimTask() { function confirmAction() { if (!pendingAction.value) return + // For unclaim action, require checkbox confirmation + if (pendingAction.value === 'unclaim' && !hasConfirmedCommunication.value) { + return + } + switch (pendingAction.value) { case 'claim': emit('claim-task', props.event, occurrence.value) @@ -195,12 +202,14 @@ function confirmAction() { showConfirmDialog.value = false pendingAction.value = null + hasConfirmedCommunication.value = false } // Cancel action function cancelAction() { showConfirmDialog.value = false pendingAction.value = null + hasConfirmedCommunication.value = false } // Get dialog content based on pending action @@ -227,7 +236,7 @@ const dialogContent = computed(() => { case 'unclaim': return { title: 'Unclaim Task?', - description: `This will remove your claim on "${props.event.title}" and make it available for others.`, + description: `This will remove your claim on "${props.event.title}" and make it available for others.\n\nHave you communicated to others that you are unclaiming this task?`, confirmText: 'Unclaim Task' } default: @@ -466,9 +475,30 @@ const dialogContent = computed(() => { {{ dialogContent.description }} + + +
+ + +
+ - +