mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix(web): show icons for empty album (#2604)
This commit is contained in:
parent
e7122d7a72
commit
3d505e425d
4 changed files with 41 additions and 34 deletions
|
|
@ -4,7 +4,6 @@
|
|||
import { albumAssetSelectionStore } from '$lib/stores/album-asset-selection.store';
|
||||
import { downloadAssets } from '$lib/stores/download';
|
||||
import { locale } from '$lib/stores/preferences.store';
|
||||
import { clickOutside } from '$lib/utils/click-outside';
|
||||
import { openFileUploadDialog } from '$lib/utils/file-uploader';
|
||||
import {
|
||||
AlbumResponseDto,
|
||||
|
|
@ -376,16 +375,14 @@
|
|||
</svelte:fragment>
|
||||
|
||||
<svelte:fragment slot="trailing">
|
||||
{#if album.assetCount > 0}
|
||||
{#if !isCreatingSharedAlbum}
|
||||
{#if !sharedLink}
|
||||
<CircleIconButton
|
||||
title="Add Photos"
|
||||
on:click={() => (isShowAssetSelection = true)}
|
||||
logo={FileImagePlusOutline}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
{#if sharedLink?.allowUpload}
|
||||
{:else if sharedLink?.allowUpload}
|
||||
<CircleIconButton
|
||||
title="Add Photos"
|
||||
on:click={() => openFileUploadDialog(album.id, sharedLink?.key)}
|
||||
|
|
@ -393,7 +390,6 @@
|
|||
/>
|
||||
{/if}
|
||||
|
||||
<!-- Share and remove album -->
|
||||
{#if isOwned}
|
||||
<CircleIconButton
|
||||
title="Share"
|
||||
|
|
@ -402,7 +398,9 @@
|
|||
/>
|
||||
<CircleIconButton title="Remove album" on:click={removeAlbum} logo={DeleteOutline} />
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{#if album.assetCount > 0 && !isCreatingSharedAlbum}
|
||||
{#if !isPublicShared || (isPublicShared && sharedLink?.allowDownload)}
|
||||
<CircleIconButton
|
||||
title="Download"
|
||||
|
|
@ -412,29 +410,31 @@
|
|||
{/if}
|
||||
|
||||
{#if !isPublicShared && isOwned}
|
||||
<div use:clickOutside on:outclick={() => (isShowAlbumOptions = false)}>
|
||||
<CircleIconButton
|
||||
title="Album options"
|
||||
on:click={showAlbumOptionsMenu}
|
||||
logo={DotsVertical}
|
||||
>{#if isShowAlbumOptions}
|
||||
<ContextMenu {...contextMenuPosition}>
|
||||
<MenuOption
|
||||
on:click={() => {
|
||||
isShowThumbnailSelection = true;
|
||||
isShowAlbumOptions = false;
|
||||
}}
|
||||
text="Set album cover"
|
||||
/>
|
||||
</ContextMenu>
|
||||
{/if}
|
||||
</CircleIconButton>
|
||||
</div>
|
||||
<CircleIconButton
|
||||
title="Album options"
|
||||
on:click={showAlbumOptionsMenu}
|
||||
logo={DotsVertical}
|
||||
>
|
||||
{#if isShowAlbumOptions}
|
||||
<ContextMenu
|
||||
{...contextMenuPosition}
|
||||
on:outclick={() => (isShowAlbumOptions = false)}
|
||||
>
|
||||
<MenuOption
|
||||
on:click={() => {
|
||||
isShowThumbnailSelection = true;
|
||||
isShowAlbumOptions = false;
|
||||
}}
|
||||
text="Set album cover"
|
||||
/>
|
||||
</ContextMenu>
|
||||
{/if}
|
||||
</CircleIconButton>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{#if isPublicShared}
|
||||
<ThemeButton />
|
||||
{/if}
|
||||
{#if isPublicShared}
|
||||
<ThemeButton />
|
||||
{/if}
|
||||
|
||||
{#if isCreatingSharedAlbum && album.sharedUsers.length == 0}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue