update ui design for all pages
This commit is contained in:
@@ -55,6 +55,24 @@ const auth = {
|
||||
return { ...currentUser };
|
||||
},
|
||||
|
||||
/**
|
||||
* Preferences, read synchronously.
|
||||
*
|
||||
* `me()` is async because the real client fetches, but the panel provider has
|
||||
* to decide whether Owliver starts open during its first render — one tick
|
||||
* later is a visible flash of the wrong workspace. The session user is already
|
||||
* hydrated from localStorage at module load, so this is a plain read of the
|
||||
* same record `me()` returns, not a second copy of the state.
|
||||
*/
|
||||
preferences() {
|
||||
return { ...DEMO_USER.preferences, ...(currentUser.preferences || {}) };
|
||||
},
|
||||
|
||||
/** Merges into the stored preferences and persists with the rest of the user. */
|
||||
async updatePreferences(patch) {
|
||||
return auth.updateMe({ preferences: { ...auth.preferences(), ...patch } });
|
||||
},
|
||||
|
||||
isAuthenticated() {
|
||||
return true;
|
||||
},
|
||||
|
||||
@@ -1399,6 +1399,13 @@ export const DEMO_USER = {
|
||||
role: 'admin',
|
||||
account_type: 'employer',
|
||||
created_date: iso('2026-06-01'),
|
||||
/* Product preferences travel with the account rather than in a store of their
|
||||
own, so there is one record to persist and one thing to read. */
|
||||
preferences: {
|
||||
owliverDefault: true,
|
||||
compactDensity: false,
|
||||
emailDigest: true,
|
||||
},
|
||||
};
|
||||
|
||||
export const seedData = {
|
||||
|
||||
Reference in New Issue
Block a user