High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
fix(web): cannot open detail panel in public shared link (#5946)
Alexaaa7a613b250
diff --git a/web/src/lib/components/asset-viewer/detail-panel.svelte b/web/src/lib/components/asset-viewer/detail-panel.svelteindex c70b3c02f5..0ceafa37c0 100644--- a/web/src/lib/components/asset-viewer/detail-panel.svelte+++ b/web/src/lib/components/asset-viewer/detail-panel.svelte@@ -52,7 +52,7 @@}}- $: isOwner = $user.id === asset.ownerId;+ $: isOwner = $user?.id === asset.ownerId;$: {// Get latest description from server@@ -356,7 +356,7 @@</button>{/if}</div>- {:else if !asset.exifInfo?.dateTimeOriginal && !asset.isReadOnly && $user && asset.ownerId === $user.id}+ {:else if !asset.exifInfo?.dateTimeOriginal && !asset.isReadOnly && isOwner}<div class="flex justify-between place-items-start gap-4 py-4"><div class="flex gap-4"><div>@@ -519,7 +519,7 @@</div>{/if}</div>- {:else if !asset.exifInfo?.city && !asset.isReadOnly && $user && asset.ownerId === $user.id}+ {:else if !asset.exifInfo?.city && !asset.isReadOnly && isOwner}<divclass="flex justify-between place-items-start gap-4 py-4 rounded-lg hover:dark:text-immich-dark-primary hover:text-immich-primary"on:click={() => (isShowChangeLocation = true)}diff --git a/web/src/lib/stores/websocket.ts b/web/src/lib/stores/websocket.tsindex 3bfa199cfd..fce8422ae3 100644--- a/web/src/lib/stores/websocket.ts+++ b/web/src/lib/stores/websocket.ts@@ -2,6 +2,7 @@ import type { AssetResponseDto, ServerVersionResponseDto } from '@api';import { Socket, io } from 'socket.io-client';import { writable } from 'svelte/store';import { loadConfig } from './server-config.store';+import { getAuthUser } from '$lib/utils/auth';export interface ReleaseEvent {isAvailable: boolean;@@ -23,12 +24,17 @@ export const websocketStore = {let websocket: Socket | null = null;-export const openWebsocketConnection = () => {+export const openWebsocketConnection = async () => {try {if (websocket) {return;}+ const user = await getAuthUser();+ if (!user) {+ return;+ }+websocket = io('', {path: '/api/socket.io',reconnection: true,