mirror of
https://github.com/immich-app/immich.git
synced 2026-03-10 11:53:43 -04:00
fix(web): shared album avatars opening modal
This commit is contained in:
parent
c259fee309
commit
95c1acbf20
@ -367,6 +367,12 @@
|
||||
|
||||
<!-- ALBUM SHARING -->
|
||||
{#if album.albumUsers.length > 0 || (album.hasSharedLink && isOwned)}
|
||||
<!-- owner & users with write access (collaborators) -->
|
||||
{@const sortedAlbumUsers = [
|
||||
album.owner,
|
||||
...album.albumUsers.filter(({ role }) => role === AlbumUserRole.Editor).map(({ user }) => user),
|
||||
]}
|
||||
|
||||
<div class="my-3 flex gap-x-1">
|
||||
<!-- link -->
|
||||
{#if album.hasSharedLink && isOwned}
|
||||
@ -380,28 +386,28 @@
|
||||
/>
|
||||
{/if}
|
||||
|
||||
<!-- owner -->
|
||||
<button type="button" onclick={() => modalManager.show(AlbumOptionsModal, { album })}>
|
||||
<UserAvatar user={album.owner} size="md" />
|
||||
</button>
|
||||
{#if isOwned}
|
||||
{#each sortedAlbumUsers as user (user.id)}
|
||||
<button type="button" onclick={() => modalManager.show(AlbumOptionsModal, { album })}>
|
||||
<UserAvatar {user} size="md" />
|
||||
</button>
|
||||
{/each}
|
||||
|
||||
<!-- users with write access (collaborators) -->
|
||||
{#each album.albumUsers.filter(({ role }) => role === AlbumUserRole.Editor) as { user } (user.id)}
|
||||
<button type="button" onclick={() => modalManager.show(AlbumOptionsModal, { album })}>
|
||||
<!-- display ellipsis if there are readonly users too -->
|
||||
{#if albumHasViewers}
|
||||
<IconButton
|
||||
shape="round"
|
||||
aria-label={$t('view_all_users')}
|
||||
color="secondary"
|
||||
size="medium"
|
||||
icon={mdiDotsVertical}
|
||||
onclick={() => modalManager.show(AlbumOptionsModal, { album })}
|
||||
/>
|
||||
{/if}
|
||||
{:else}
|
||||
{#each sortedAlbumUsers as user (user.id)}
|
||||
<UserAvatar {user} size="md" />
|
||||
</button>
|
||||
{/each}
|
||||
|
||||
<!-- display ellipsis if there are readonly users too -->
|
||||
{#if albumHasViewers}
|
||||
<IconButton
|
||||
shape="round"
|
||||
aria-label={$t('view_all_users')}
|
||||
color="secondary"
|
||||
size="medium"
|
||||
icon={mdiDotsVertical}
|
||||
onclick={() => modalManager.show(AlbumOptionsModal, { album })}
|
||||
/>
|
||||
{/each}
|
||||
{/if}
|
||||
|
||||
<ActionButton action={Share} />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user