diff --git a/web/src/lib/components/faces-page/search-bar.svelte b/web/src/lib/components/elements/search-bar.svelte similarity index 88% rename from web/src/lib/components/faces-page/search-bar.svelte rename to web/src/lib/components/elements/search-bar.svelte index e1f999dbca..9c6eded224 100644 --- a/web/src/lib/components/faces-page/search-bar.svelte +++ b/web/src/lib/components/elements/search-bar.svelte @@ -1,12 +1,13 @@ diff --git a/web/src/routes/(user)/albums/+page.svelte b/web/src/routes/(user)/albums/+page.svelte index fa0115d828..07000d9136 100644 --- a/web/src/routes/(user)/albums/+page.svelte +++ b/web/src/routes/(user)/albums/+page.svelte @@ -43,11 +43,13 @@ import { flip } from 'svelte/animate'; import type { PageData } from './$types'; import { useAlbums } from './albums.bloc'; + import SearchBar from '$lib/components/elements/search-bar.svelte'; export let data: PageData; let shouldShowEditUserForm = false; let selectedAlbum: AlbumResponseDto; + let searchAlbum = ''; let sortByOptions: Record = { albumTitle: { @@ -180,6 +182,8 @@ } } + $: albumsFiltered = $albums.filter((album) => album.albumName.toLowerCase().includes(searchAlbum.toLowerCase())); + const searchSort = (searched: string): Sort => { for (const key in sortByOptions) { if (sortByOptions[key].title === searched) { @@ -243,6 +247,9 @@ + + + @@ -285,7 +292,7 @@ {#if $albumViewSettings.view === AlbumViewMode.Cover} - {#each $albums as album, index (album.id)} + {#each albumsFiltered as album, index (album.id)} {:else if $albumViewSettings.view === AlbumViewMode.List} - + @@ -310,7 +317,7 @@ - {#each $albums as album (album.id)} + {#each albumsFiltered as album (album.id)} goto(`${AppRoute.ALBUMS}/${album.id}`)} diff --git a/web/src/routes/(user)/albums/[albumId]/+page.svelte b/web/src/routes/(user)/albums/[albumId]/+page.svelte index 52b780acc2..7c9ca39acd 100644 --- a/web/src/routes/(user)/albums/[albumId]/+page.svelte +++ b/web/src/routes/(user)/albums/[albumId]/+page.svelte @@ -603,7 +603,7 @@ e.key === 'Enter' && titleInput.blur()} on:blur={handleUpdateName} - class="w-[99%] border-b-2 border-transparent text-6xl text-immich-primary outline-none transition-all dark:text-immich-dark-primary {isOwned + class="w-[99%] mb-2 border-b-2 border-transparent text-6xl text-immich-primary outline-none transition-all dark:text-immich-dark-primary {isOwned ? 'hover:border-gray-400' : 'hover:border-transparent'} bg-immich-bg focus:border-b-2 focus:border-immich-primary focus:outline-none dark:bg-immich-dark-bg dark:focus:border-immich-dark-primary dark:focus:bg-immich-dark-gray" type="text" @@ -616,7 +616,7 @@ {#if album.assetCount > 0} - + {getDateRange()} ยท {album.assetCount} items @@ -625,7 +625,7 @@ {#if album.sharedUsers.length > 0 || (album.hasSharedLink && isOwned)} - + {#if album.hasSharedLink && isOwned} {#if isOwned} autoGrowHeight(textArea)} diff --git a/web/src/routes/(user)/people/+page.svelte b/web/src/routes/(user)/people/+page.svelte index eba6ed2764..100c3e6253 100644 --- a/web/src/routes/(user)/people/+page.svelte +++ b/web/src/routes/(user)/people/+page.svelte @@ -8,7 +8,7 @@ import Icon from '$lib/components/elements/icon.svelte'; import MergeSuggestionModal from '$lib/components/faces-page/merge-suggestion-modal.svelte'; import PeopleCard from '$lib/components/faces-page/people-card.svelte'; - import SearchBar from '$lib/components/faces-page/search-bar.svelte'; + import SearchBar from '$lib/components/elements/search-bar.svelte'; import SetBirthDateModal from '$lib/components/faces-page/set-birth-date-modal.svelte'; import ShowHide from '$lib/components/faces-page/show-hide.svelte'; import UserPageLayout from '$lib/components/layouts/user-page-layout.svelte'; @@ -441,7 +441,8 @@ { searchedPeople = []; }}
{getDateRange()}
ยท
{album.assetCount} items