mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
feat(web): improve individual share ux (#17430)
This commit is contained in:
parent
7f116d8e98
commit
6ae24fbbd4
3 changed files with 69 additions and 36 deletions
|
|
@ -54,6 +54,7 @@
|
|||
album?: AlbumResponseDto | null;
|
||||
person?: PersonResponseDto | null;
|
||||
stack?: StackResponseDto | null;
|
||||
showCloseButton?: boolean;
|
||||
showDetailButton: boolean;
|
||||
showSlideshow?: boolean;
|
||||
onZoomImage: () => void;
|
||||
|
|
@ -73,6 +74,7 @@
|
|||
album = null,
|
||||
person = null,
|
||||
stack = null,
|
||||
showCloseButton = true,
|
||||
showDetailButton,
|
||||
showSlideshow = false,
|
||||
onZoomImage,
|
||||
|
|
@ -89,6 +91,7 @@
|
|||
const sharedLink = getSharedLink();
|
||||
let isOwner = $derived($user && asset.ownerId === $user?.id);
|
||||
let showDownloadButton = $derived(sharedLink ? sharedLink.allowDownload : !asset.isOffline);
|
||||
|
||||
// $: showEditorButton =
|
||||
// isOwner &&
|
||||
// asset.type === AssetTypeEnum.Image &&
|
||||
|
|
@ -104,7 +107,9 @@
|
|||
class="z-[1001] flex h-16 place-items-center justify-between bg-gradient-to-b from-black/40 px-3 transition-transform duration-200"
|
||||
>
|
||||
<div class="text-white">
|
||||
<CloseAction {onClose} />
|
||||
{#if showCloseButton}
|
||||
<CloseAction {onClose} />
|
||||
{/if}
|
||||
</div>
|
||||
<div class="flex gap-2 overflow-x-auto text-white" data-testid="asset-viewer-navbar-actions">
|
||||
{#if !asset.isTrashed && $user}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue