diff --git a/web/src/lib/components/shared-components/search-bar/search-tags-section.svelte b/web/src/lib/components/shared-components/search-bar/search-tags-section.svelte index 208de3f8a4..b98ffeab90 100644 --- a/web/src/lib/components/shared-components/search-bar/search-tags-section.svelte +++ b/web/src/lib/components/shared-components/search-bar/search-tags-section.svelte @@ -2,11 +2,11 @@ import Combobox, { type ComboBoxOption } from '$lib/components/shared-components/combobox.svelte'; import { preferences } from '$lib/stores/user.store'; import { getAllTags, type TagResponseDto } from '@immich/sdk'; - import { Checkbox, Icon, Label, Text } from '@immich/ui'; - import { mdiClose } from '@mdi/js'; + import { Checkbox, Label, Text } from '@immich/ui'; import { onMount } from 'svelte'; import { t } from 'svelte-i18n'; import { SvelteSet } from 'svelte/reactivity'; + import TagPill from '../tag-pill.svelte'; interface Props { selectedTags: SvelteSet | null; @@ -73,24 +73,7 @@ {#each selectedTags ?? [] as tagId (tagId)} {@const tag = tagMap[tagId]} {#if tag} -
- -

- {tag.value} -

-
- - -
+ handleRemove(tagId)} /> {/if} {/each} diff --git a/web/src/lib/components/shared-components/tag-pill.svelte b/web/src/lib/components/shared-components/tag-pill.svelte new file mode 100644 index 0000000000..43148c5954 --- /dev/null +++ b/web/src/lib/components/shared-components/tag-pill.svelte @@ -0,0 +1,31 @@ + + +
+ +

+ {label} +

+
+ + +
diff --git a/web/src/lib/modals/AssetTagModal.svelte b/web/src/lib/modals/AssetTagModal.svelte index dbd5bdb118..5097be51aa 100644 --- a/web/src/lib/modals/AssetTagModal.svelte +++ b/web/src/lib/modals/AssetTagModal.svelte @@ -2,12 +2,13 @@ import { eventManager } from '$lib/managers/event-manager.svelte'; import { tagAssets } from '$lib/utils/asset-utils'; import { getAllTags, upsertTags, type TagResponseDto } from '@immich/sdk'; - import { FormModal, Icon } from '@immich/ui'; - import { mdiClose, mdiTag } from '@mdi/js'; + import { FormModal } from '@immich/ui'; + import { mdiTag } from '@mdi/js'; import { onMount } from 'svelte'; import { t } from 'svelte-i18n'; import { SvelteSet } from 'svelte/reactivity'; import Combobox, { type ComboBoxOption } from '../components/shared-components/combobox.svelte'; + import TagPill from '../components/shared-components/tag-pill.svelte'; interface Props { onClose: (updated?: boolean) => void; @@ -81,24 +82,7 @@ {#each selectedIds as tagId (tagId)} {@const tag = tagMap[tagId]} {#if tag} -
- -

- {tag.value} -

-
- - -
+ handleRemove(tagId)} /> {/if} {/each}