From 06e89da048384a1d3d07ecf8629e80929cd7c36f Mon Sep 17 00:00:00 2001 From: Yaros Date: Wed, 24 Dec 2025 19:17:02 +0100 Subject: [PATCH] fix(web): show relevant navbar options for partner --- .../asset-viewer/asset-viewer-nav-bar.svelte | 180 +++++++++--------- 1 file changed, 90 insertions(+), 90 deletions(-) diff --git a/web/src/lib/components/asset-viewer/asset-viewer-nav-bar.svelte b/web/src/lib/components/asset-viewer/asset-viewer-nav-bar.svelte index 0dad2793bf..64ac269764 100644 --- a/web/src/lib/components/asset-viewer/asset-viewer-nav-bar.svelte +++ b/web/src/lib/components/asset-viewer/asset-viewer-nav-bar.svelte @@ -183,107 +183,107 @@ {#if isOwner} + {/if} - - {#if showSlideshow && !isLocked} - + + {#if showSlideshow && !isLocked} + + {/if} + {#if isOwner && showDownloadButton} + + {/if} + + {#if !isLocked} + {#if asset.isTrashed} + + {:else} + + {/if} - {#if showDownloadButton} - + {/if} + + {#if isOwner} + + {#if stack} + + + {#if stack?.primaryAssetId !== asset.id} + + {#if stack?.assets?.length > 2} + + {/if} + {/if} + {/if} + {#if album} + + {/if} + {#if person} + + {/if} + {#if asset.type === AssetTypeEnum.Image && !isLocked} + {/if} {#if !isLocked} - {#if asset.isTrashed} - - {:else} - - - {/if} - {/if} - - {#if isOwner} - - {#if stack} - - - {#if stack?.primaryAssetId !== asset.id} - - {#if stack?.assets?.length > 2} - - {/if} - {/if} - {/if} - {#if album} - - {/if} - {#if person} - - {/if} - {#if asset.type === AssetTypeEnum.Image && !isLocked} - - {/if} - - {#if !isLocked} - + + handleReplaceAsset(asset.id)} + text={$t('replace_with_upload')} + /> + {#if !asset.isArchived && !asset.isTrashed} handleReplaceAsset(asset.id)} - text={$t('replace_with_upload')} - /> - {#if !asset.isArchived && !asset.isTrashed} - goto(resolve(`${AppRoute.PHOTOS}?at=${stack?.primaryAssetId ?? asset.id}`))} - text={$t('view_in_timeline')} - /> - {/if} - {#if !asset.isArchived && !asset.isTrashed && smartSearchEnabled} - - goto(resolve(`${AppRoute.SEARCH}?query={"queryAssetId":"${stack?.primaryAssetId ?? asset.id}"}`))} - text={$t('view_similar_photos')} - /> - {/if} - {/if} - - {#if !asset.isTrashed} - - {/if} - - {#if asset.type === AssetTypeEnum.Video} - setPlayOriginalVideo(!playOriginalVideo)} - text={playOriginalVideo ? $t('play_transcoded_video') : $t('play_original_video')} + icon={mdiImageSearch} + onClick={() => goto(resolve(`${AppRoute.PHOTOS}?at=${stack?.primaryAssetId ?? asset.id}`))} + text={$t('view_in_timeline')} /> {/if} - -
- onRunJob(AssetJobName.RefreshFaces)} - text={$getAssetJobName(AssetJobName.RefreshFaces)} - /> - onRunJob(AssetJobName.RefreshMetadata)} - text={$getAssetJobName(AssetJobName.RefreshMetadata)} - /> - onRunJob(AssetJobName.RegenerateThumbnail)} - text={$getAssetJobName(AssetJobName.RegenerateThumbnail)} - /> - {#if asset.type === AssetTypeEnum.Video} + {#if !asset.isArchived && !asset.isTrashed && smartSearchEnabled} onRunJob(AssetJobName.TranscodeVideo)} - text={$getAssetJobName(AssetJobName.TranscodeVideo)} + icon={mdiCompare} + onClick={() => + goto(resolve(`${AppRoute.SEARCH}?query={"queryAssetId":"${stack?.primaryAssetId ?? asset.id}"}`))} + text={$t('view_similar_photos')} /> {/if} {/if} -
- {/if} + + {#if !asset.isTrashed} + + {/if} + + {#if asset.type === AssetTypeEnum.Video} + setPlayOriginalVideo(!playOriginalVideo)} + text={playOriginalVideo ? $t('play_transcoded_video') : $t('play_original_video')} + /> + {/if} + +
+ onRunJob(AssetJobName.RefreshFaces)} + text={$getAssetJobName(AssetJobName.RefreshFaces)} + /> + onRunJob(AssetJobName.RefreshMetadata)} + text={$getAssetJobName(AssetJobName.RefreshMetadata)} + /> + onRunJob(AssetJobName.RegenerateThumbnail)} + text={$getAssetJobName(AssetJobName.RegenerateThumbnail)} + /> + {#if asset.type === AssetTypeEnum.Video} + onRunJob(AssetJobName.TranscodeVideo)} + text={$getAssetJobName(AssetJobName.TranscodeVideo)} + /> + {/if} + {/if} +