mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-13 06:32:03 +00:00
fix(dashboard): welcome a new account instead of welcoming it back
The header always said "welcome back", including to an account the
setup flow had created a few minutes earlier.
/api/auth/me now publishes the account's createdAt, and the greeting
welcomes an account in its first day ("Welcome, name.") and welcomes
back every other one, including an account whose older server does not
send the field. Until the account is known, during the SSR pass and the
hydration render, the line is the time-of-day greeting alone, so
nothing claims "back" before the client knows it is true.
This commit is contained in:
1 parent
107db1bb55
commit
65fe5c34e3
15 files changed
+165
-22
No files matched your search
@@ -86362,6 +86362,12 @@ components:
|
||||
type: string
|
||||
username:
|
||||
type: string
|
||||
createdAt:
|
||||
type: string
|
||||
format: date-time
|
||||
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
|
||||
description: When the signed-in account was created. The web greets an account in its first day as new rather than
|
||||
welcoming it back.
|
||||
timezone:
|
||||
type: string
|
||||
description: "The IANA zone the server cuts this account's days in: the stored zone, or the instance default when the
|
||||
@@ -86437,6 +86443,7 @@ components:
|
||||
required:
|
||||
- id
|
||||
- username
|
||||
- createdAt
|
||||
- timezone
|
||||
- glucoseUnit
|
||||
- features
|
||||
|
||||
Reference in new issue
Block a user