Skip to content

High performance self-hosted photo and video management solution.

fix: adjust search bar padding and visibility based on input state (#20598)

Paweł Wojtaszkob56a272f647b
diff --git a/web/src/lib/components/shared-components/search-bar/search-bar.svelte b/web/src/lib/components/shared-components/search-bar/search-bar.svelte
index 4c807e7652..05816d2d76 100644
--- a/web/src/lib/components/shared-components/search-bar/search-bar.svelte
+++ b/web/src/lib/components/shared-components/search-bar/search-bar.svelte
@@ -230,7 +230,8 @@
type="text"
name="q"
id="main-search-bar"
- class="w-full transition-all border-2 px-14 py-4 max-md:py-2 text-immich-fg/75 dark:text-immich-dark-fg
+ class="w-full transition-all border-2 ps-14 py-4 max-md:py-2 text-immich-fg/75 dark:text-immich-dark-fg
+ {showClearIcon ? 'pe-[90px]' : 'pe-14'}
{grayTheme ? 'dark:bg-immich-dark-gray' : 'dark:bg-immich-dark-bg'}
{showSuggestions && isSearchSuggestions ? 'rounded-t-3xl' : 'rounded-3xl bg-gray-200'}
{searchStore.isSearchEnabled ? 'border-gray-200 dark:border-gray-700 bg-white' : 'border-transparent'}"
@@ -285,6 +286,7 @@
{#if isFocus}
<div
class="absolute inset-y-0 flex items-center"
+ class:max-md:hidden={value}
class:end-16={isFocus}
class:end-28={isFocus && value.length > 0}
>