Add event list feature (009-list-events)
All checks were successful
CI / backend-test (push) Successful in 57s
CI / frontend-test (push) Successful in 22s
CI / frontend-e2e (push) Successful in 1m4s
CI / build-and-publish (push) Has been skipped

Enable users to see all their saved events on the home screen, sorted
by date with upcoming events first. Key capabilities:

- EventCard with title, relative time display, and organizer/attendee
  role badge
- Sortable EventList with past-event visual distinction (faded style)
- Empty state when no events are stored
- Swipe-to-delete gesture with confirmation dialog
- Floating action button for quick event creation
- Rename router param :token → :eventToken across all views
- useRelativeTime composable (Intl.RelativeTimeFormat)
- useEventStorage: add validation, removeEvent(), reactive versioning
- Full E2E and unit test coverage for all new components

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-08 15:53:55 +01:00
parent 1b3eafa8d1
commit e56998b17c
28 changed files with 1989 additions and 27 deletions

View File

@@ -1,13 +1,26 @@
<template>
<main class="home">
<h1 class="home__title">fete</h1>
<p class="home__subtitle">No events yet.<br />Create your first one!</p>
<RouterLink to="/create" class="btn-primary home__cta">+ Create Event</RouterLink>
<template v-if="events.length > 0">
<EventList />
<CreateEventFab />
</template>
<template v-else>
<EmptyState />
</template>
</main>
</template>
<script setup lang="ts">
import { RouterLink } from 'vue-router'
import { computed } from 'vue'
import { useEventStorage, isValidStoredEvent } from '../composables/useEventStorage'
import EventList from '../components/EventList.vue'
import EmptyState from '../components/EmptyState.vue'
import CreateEventFab from '../components/CreateEventFab.vue'
const { getStoredEvents } = useEventStorage()
const events = computed(() => getStoredEvents().filter(isValidStoredEvent))
</script>
<style scoped>
@@ -15,27 +28,15 @@ import { RouterLink } from 'vue-router'
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: var(--spacing-lg);
text-align: center;
padding-top: var(--spacing-lg);
}
.home__title {
font-size: 2rem;
font-weight: 800;
color: var(--color-text-on-gradient);
text-align: center;
}
.home__subtitle {
font-size: 1rem;
font-weight: 400;
color: var(--color-text-on-gradient);
opacity: 0.9;
}
.home__cta {
margin-top: var(--spacing-md);
max-width: 280px;
}
</style>