Skip to content

Commit

Permalink
chore: changing session data, when new data is written to database - …
Browse files Browse the repository at this point in the history
…but does not survive a refresh of the page
  • Loading branch information
arnoldknott committed Feb 26, 2025
1 parent 26313c4 commit 2717662
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend_svelte/src/routes/(layout)/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@
let theme = $derived(theming.applyTheme(themeConfiguration, mode));
page.data.session.userProfile.user_profile.theme_color = themeConfiguration.sourceColor;
page.data.session.userProfile.user_profile.theme_variant = themeConfiguration.variant;
page.data.session.userProfile.user_profile.contrast = themeConfiguration.contrast;
// page.data.session.userProfile.user_profile.theme_color = themeConfiguration.sourceColor;
// page.data.session.userProfile.user_profile.theme_variant = themeConfiguration.variant;
// page.data.session.userProfile.user_profile.contrast = themeConfiguration.contrast;
// console.log('=== layout - applyTheming - page.data.session.userProfile.user_profile ===');
// console.log(page.data.session.userProfile.user_profile);
Expand Down
5 changes: 5 additions & 0 deletions frontend_svelte/src/routes/(layout)/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ export const actions: Actions = {
}
// console.log('=== layout - layout.server - putProfile - locals.sessionData.userProfile ===');
// console.log(locals.sessionData.userProfile);
locals.sessionData.userProfile.user_profile.theme_color = payload.user_profile.theme_color;
locals.sessionData.userProfile.user_profile.theme_variant = payload.user_profile.theme_variant;
locals.sessionData.userProfile.user_profile.contrast = payload.user_profile.contrast;
console.log('=== layout - layout.server - putProfile - locals.sessionData.userProfile ===');
console.log(locals.sessionData.userProfile);
}
}
};

0 comments on commit 2717662

Please sign in to comment.