Commit graph

20 commits

Author SHA1 Message Date
16191a8dd2 Add debug route to delete the database
All checks were successful
/ build (push) Successful in 1m15s
/ deploy (push) Successful in 16s
To simplify development add a debug route to delete the database content
so that it'll be re-generated to the demo schedule.
2025-05-31 23:10:25 +02:00
04b9707272 Move /api/account to /api/auth/account
All checks were successful
/ build (push) Successful in 1m16s
/ deploy (push) Successful in 16s
An account refers to the user the active session is logged in as. As
such it doesn't make sense outside of the /auth API paths that deals
with the current authenticated user.  Move /api/account to
/api/auth/account to reflect this.
2025-05-31 21:44:19 +02:00
e7dc00db54 Remove old editing interface
All checks were successful
/ build (push) Successful in 1m13s
/ deploy (push) Successful in 15s
Remove broken placeholder event editing interface that did not take
account to access permissions or events having multiple solts.
2025-05-27 17:38:23 +02:00
ed67982ec0 Explicitly set locale to avoid hydration mismatch
Some functions in luxon default to the system's locale while other
functions default to "en-US".  Explicitly set the locale everywhere
the luxon objects are created to avoid possible mismatches and
unexpected behaviour should the system's locale be different.
2025-05-25 23:38:06 +02:00
c986d939ec Read vapid details from runtime config
Use the useRuntimeConfig interface to read vapid details on the server
side.  This is a more portale way to deal with loading data from the
environment in Nuxt.js.
2025-05-20 00:22:28 +02:00
cef6b13dd1 Add assigment of crew to events and shifts 2025-03-15 18:18:08 +01:00
29b34deef0 Make session cookie permament
Set a max age for the session cookie to prevent it from expiring when
the browser is closed.  To prevent the age limit from being being
reached the session cookie is refreshed every time the session is
loaded.  This should fix login being lost when the browser is stopped.
2025-03-11 16:30:51 +01:00
5255ed698e Implement access controlled edit schedule endpoint
Add PATCH /api/schedule endpoint for editing the schedule in a manner
that's access controlled.
2025-03-11 14:11:05 +01:00
4806343250 Filter crew events to only be visible for crew 2025-03-10 16:26:52 +01:00
40c25f8990 Fix logic inversion braking interested 2025-03-09 23:56:39 +01:00
c4a6f6b3f9 Add per account overridable timezone setting
To make it possible to render the timetable in the user's local time we
need to know the timezone to render it in on the server.  Otherwise
there will be hydration errors and paint flashing as the client renders
a different timezone.

Add a server global default timezone that can be overriden on a
per-account bases to prepare for timezone handling the timetable.
2025-03-09 15:53:51 +01:00
8ef4636635 Add create account functionality 2025-03-07 23:53:57 +01:00
598b9fd7d6 Add delete account function 2025-03-07 22:28:55 +01:00
db9a12250e Track which account is interested in which events
Store a list of ids of events and slots that accounts have marked as
being interested in, and show aggeregate counts in the schedule.
2025-03-07 20:15:41 +01:00
52dfde95d1 Tie push subscriptions to current session
If a user logs out from a device the expectation should be that device
no longer having any association with the user's account.  Any existing
push notifications should thefore be removed on server.  For this reason
tie push notifications to a session, and remove them when the session is
deleted.
2025-03-07 15:47:48 +01:00
150cb82f5c Basic account and session system
Provide a basic account system with login and server side session store
identified by a cookie.  Upon successful login a signed session cookie
is set by the server with the session stored on the server identifying
which account it is logged in as.  The client uses a shared useFetch on
the session endpoint to identify if it's logged in and which account it
is logged in as, and refreshes this when loggin in or out.
2025-03-07 12:41:57 +01:00
abdcc83eb9 Refactor subscription format
Place the actual push subscription data into a push property on the
subscription so that other properties can be added to it.
2025-03-07 12:37:47 +01:00
6ea3567c94 Refactor code saving data
Move the code dealing with saving and loading data to server/database to
gather it all up into one place.
2025-03-05 18:41:47 +01:00
d8a31db44d Handle event streams being cancelled
h3 doesn't correctly handle unexpected stream closures, bypass h3 and
operate directly on the Node.js ServerResponse object to handle them.
2025-03-05 16:02:26 +01:00
250ca9a1ac Port application from Next.js to Nuxt
Nuxt is based on Vue.js and I find their building blocks to be much
neater compared to the React based Next.js.
2025-03-05 15:36:50 +01:00