From e722876aae4fc9ad32f8b8bc2ff8177a33eec05f Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Sat, 24 May 2025 20:01:23 +0200 Subject: [PATCH] Use a pinia store to manage account state Refactor the existing scattered code dealing with the account state into a pinia store. --- components/EventCard.vue | 37 ++++++------------- components/EventsTable.vue | 9 +++-- components/Header.vue | 13 +++---- components/ScheduleTable.vue | 18 ++++------ components/ShiftScheduleTable.vue | 18 ++++------ components/Timetable.vue | 10 +++--- middleware/authenticated.ts | 6 ++-- pages/account/settings.vue | 11 +++--- pages/edit.vue | 10 +++--- pages/index.vue | 8 ++--- pages/schedule.vue | 24 ++++++------- stores/account.ts | 60 +++++++++++++++++++++++++++++++ 12 files changed, 126 insertions(+), 98 deletions(-) create mode 100644 stores/account.ts diff --git a/components/EventCard.vue b/components/EventCard.vue index d3eaaef..6f0b33f 100644 --- a/components/EventCard.vue +++ b/components/EventCard.vue @@ -5,13 +5,13 @@

{{ event.interested }} interested

-

+

@@ -20,13 +20,13 @@
  • {{ formatTime(slot.start) }} - {{ formatTime(slot.end) }}