mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
fix(web): always show search type button (#27043)
* fix(web): always show search type button * fix(web): formatting fixes * fix(web): search-type-button inactive styling outline/secondary * chore: styling --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
@@ -184,6 +184,7 @@
|
|||||||
localStorage.setItem('searchQueryType', type);
|
localStorage.setItem('searchQueryType', type);
|
||||||
currentSearchType = type;
|
currentSearchType = type;
|
||||||
showSearchTypeDropdown = false;
|
showSearchTypeDropdown = false;
|
||||||
|
input?.focus();
|
||||||
};
|
};
|
||||||
|
|
||||||
const onsubmit = (event: Event) => {
|
const onsubmit = (event: Event) => {
|
||||||
@@ -306,7 +307,6 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if searchStore.isSearchEnabled}
|
|
||||||
<div
|
<div
|
||||||
id={searchTypeId}
|
id={searchTypeId}
|
||||||
class="absolute inset-y-0 flex items-center end-16"
|
class="absolute inset-y-0 flex items-center end-16"
|
||||||
@@ -315,7 +315,12 @@
|
|||||||
>
|
>
|
||||||
<div class="relative" use:focusOutside={{ onFocusOut: closeSearchTypeDropdown }}>
|
<div class="relative" use:focusOutside={{ onFocusOut: closeSearchTypeDropdown }}>
|
||||||
<Button
|
<Button
|
||||||
class="bg-immich-primary text-white dark:bg-immich-dark-primary/90 dark:text-black/75 rounded-full px-3 py-1 text-xs hover:opacity-80 transition-opacity cursor-pointer"
|
shape="round"
|
||||||
|
variant={searchStore.isSearchEnabled ? 'filled' : 'outline'}
|
||||||
|
color={searchStore.isSearchEnabled ? 'primary' : 'secondary'}
|
||||||
|
class="px-3 py-1 text-xs {searchStore.isSearchEnabled
|
||||||
|
? 'border border-transparent'
|
||||||
|
: 'border border-secondary/5 text-muted hover:text-dark font-light'}"
|
||||||
onclick={toggleSearchTypeDropdown}
|
onclick={toggleSearchTypeDropdown}
|
||||||
aria-expanded={showSearchTypeDropdown}
|
aria-expanded={showSearchTypeDropdown}
|
||||||
aria-haspopup="listbox"
|
aria-haspopup="listbox"
|
||||||
@@ -342,7 +347,6 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
|
||||||
|
|
||||||
{#if showClearIcon}
|
{#if showClearIcon}
|
||||||
<div class="absolute inset-y-0 end-0 flex items-center pe-2">
|
<div class="absolute inset-y-0 end-0 flex items-center pe-2">
|
||||||
|
|||||||
Reference in New Issue
Block a user