Commit graph

9 commits

Author SHA1 Message Date
f69ca520c0 Refetch schedule and stream if session is updated 2025-03-10 16:43:21 +01:00
13f344472e Move schedule fetching into useSchedule composable 2025-03-10 15:41:32 +01:00
8c8f340553 Type false session as null
Make the typing for the session work again by telling TypeScript the
false value is actually null.
2025-03-09 15:50:18 +01:00
2897542823 Cache session data
The session is always explicitly updated when it changes, cache it on
the client if it has already been loaded.
2025-03-08 00:34:46 +01:00
ed74f4bb0e Use false instead of null for empty session
The caching layer of Nuxt assumes no entry exists if it's nullish.  This
causes null to be treated as if the resource needs to be fetched.  Use
false instead.
2025-03-08 00:33:35 +01:00
d4cbbcbc2d Fix session being double requested
If the returned value of the fetched endpoint is blank that gets
converted to undefined, which confuses the request sharing between the
client and server causing the session to be requested on both sides.

Transform value to null if it's blank so that the session fetch is
de-duplicated.
2025-03-07 16:45:40 +01:00
b2a5b67096 Refactor push subscription logic into a composable 2025-03-07 16:08:45 +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
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