mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix(web): small fixes for album selection modal (#2527)
This commit is contained in:
parent
99b018cd49
commit
50b649cd3e
2 changed files with 13 additions and 20 deletions
|
|
@ -16,18 +16,10 @@
|
|||
export let shared: boolean;
|
||||
|
||||
onMount(async () => {
|
||||
loading = true;
|
||||
|
||||
const { data } = await api.albumApi.getAllAlbums();
|
||||
|
||||
if (shared) {
|
||||
albums = data.filter((album) => album.shared === shared);
|
||||
} else {
|
||||
albums = data;
|
||||
}
|
||||
const { data } = await api.albumApi.getAllAlbums(shared || undefined);
|
||||
albums = data;
|
||||
|
||||
recentAlbums = albums
|
||||
.filter((album) => album.shared === shared)
|
||||
.sort((a, b) => (new Date(a.createdAt) > new Date(b.createdAt) ? -1 : 1))
|
||||
.slice(0, 3);
|
||||
|
||||
|
|
@ -61,7 +53,7 @@
|
|||
<svelte:fragment slot="title">
|
||||
<span class="flex gap-2 place-items-center">
|
||||
<p class="font-medium">
|
||||
Add to {#if shared}shared {/if}
|
||||
Add to {#if shared}Shared {/if} Album
|
||||
</p>
|
||||
</span>
|
||||
</svelte:fragment>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue