mirror of
https://github.com/immich-app/immich.git
synced 2025-12-18 09:13:15 +03:00
feat(web)!: SPA (#5069)
* feat(web): SPA * chore: remove unnecessary prune * feat(web): merge with immich-server * Correct method name * fix: bugs, docs, workflows, etc. * chore: keep dockerignore for dev * chore: remove license * fix: expose 2283 --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
@@ -24,7 +24,10 @@
|
||||
export let data: LayoutData;
|
||||
let albumId: string | undefined;
|
||||
|
||||
if ($page.route.id?.startsWith('/(user)/share/[key]')) {
|
||||
const isSharedLinkRoute = (route: string | null) => route?.startsWith('/(user)/share/[key]');
|
||||
const isAuthRoute = (route?: string) => route?.startsWith('/auth');
|
||||
|
||||
if (isSharedLinkRoute($page.route?.id)) {
|
||||
api.setKey($page.params.key);
|
||||
}
|
||||
|
||||
@@ -32,11 +35,11 @@
|
||||
const fromRoute = from?.route?.id || '';
|
||||
const toRoute = to?.route?.id || '';
|
||||
|
||||
if (fromRoute.startsWith('/auth') && !toRoute.startsWith('/auth')) {
|
||||
if (isAuthRoute(fromRoute) && !isAuthRoute(toRoute)) {
|
||||
openWebsocketConnection();
|
||||
}
|
||||
|
||||
if (!fromRoute.startsWith('/auth') && toRoute.startsWith('/auth')) {
|
||||
if (!isAuthRoute(fromRoute) && isAuthRoute(toRoute)) {
|
||||
closeWebsocketConnection();
|
||||
}
|
||||
|
||||
@@ -80,7 +83,6 @@
|
||||
<svelte:head>
|
||||
<title>{$page.data.meta?.title || 'Web'} - Immich</title>
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
<link rel="stylesheet" href="/custom.css" />
|
||||
<meta name="theme-color" content="currentColor" />
|
||||
<FaviconHeader />
|
||||
<AppleHeader />
|
||||
|
||||
Reference in New Issue
Block a user