1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-25 10:43:13 +02:00

fix(web): show history search box only when needed (#7544)

show history search box only when needed
This commit is contained in:
martin 2024-03-02 16:38:34 +01:00 committed by GitHub
parent b63b42d3d7
commit db455060f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -106,7 +106,9 @@
name="q" name="q"
class="w-full {grayTheme class="w-full {grayTheme
? 'dark:bg-immich-dark-gray' ? 'dark:bg-immich-dark-gray'
: 'dark:bg-immich-dark-bg'} px-14 py-4 text-immich-fg/75 dark:text-immich-dark-fg {showHistory || showFilter : 'dark:bg-immich-dark-bg'} px-14 py-4 text-immich-fg/75 dark:text-immich-dark-fg {(showHistory &&
$savedSearchTerms.length > 0) ||
showFilter
? 'rounded-t-3xl border border-gray-200 bg-white dark:border-gray-800' ? 'rounded-t-3xl border border-gray-200 bg-white dark:border-gray-800'
: 'rounded-3xl border border-transparent bg-gray-200'}" : 'rounded-3xl border border-transparent bg-gray-200'}"
placeholder="Search your photos" placeholder="Search your photos"
@ -138,7 +140,7 @@
{/if} {/if}
<!-- SEARCH HISTORY BOX --> <!-- SEARCH HISTORY BOX -->
{#if showHistory} {#if showHistory && $savedSearchTerms.length > 0}
<SearchHistoryBox <SearchHistoryBox
on:clearAllSearchTerms={clearAllSearchTerms} on:clearAllSearchTerms={clearAllSearchTerms}
on:clearSearchTerm={({ detail: searchTerm }) => clearSearchTerm(searchTerm)} on:clearSearchTerm={({ detail: searchTerm }) => clearSearchTerm(searchTerm)}