mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-23 01:26:42 +02:00
Merge branch 'dev-1' into dev
This commit is contained in:
commit
d41d060bb3
1770 changed files with 168028 additions and 31031 deletions
|
|
@ -69,7 +69,22 @@
|
|||
// Load user settings when authenticated
|
||||
$effect(() => {
|
||||
if (authStore.initialized && authStore.user) {
|
||||
userSettings.load();
|
||||
userSettings.load().then(() => {
|
||||
// Redirect to start page if on /app and a custom start page is set
|
||||
const currentPath = window.location.pathname;
|
||||
if (
|
||||
currentPath === '/app' &&
|
||||
userSettings.startPage &&
|
||||
userSettings.startPage !== '/' &&
|
||||
userSettings.startPage !== '/app'
|
||||
) {
|
||||
// Prepend /app if the start page doesn't include it
|
||||
const targetPath = userSettings.startPage.startsWith('/app')
|
||||
? userSettings.startPage
|
||||
: `/app${userSettings.startPage}`;
|
||||
goto(targetPath, { replaceState: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue