mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
refactor: buttons (#18317)
* refactor: buttons * fix: woopsie --------- Co-authored-by: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com>
This commit is contained in:
parent
c1150fe7e3
commit
86d64f3483
26 changed files with 148 additions and 279 deletions
|
|
@ -1,13 +1,12 @@
|
|||
<script lang="ts">
|
||||
import ImageThumbnail from '$lib/components/assets/thumbnail/image-thumbnail.svelte';
|
||||
import Button from '$lib/components/elements/buttons/button.svelte';
|
||||
import Icon from '$lib/components/elements/icon.svelte';
|
||||
import SearchBar from '$lib/components/elements/search-bar.svelte';
|
||||
import LoadingSpinner from '$lib/components/shared-components/loading-spinner.svelte';
|
||||
import SingleGridRow from '$lib/components/shared-components/single-grid-row.svelte';
|
||||
import { getPeopleThumbnailUrl } from '$lib/utils';
|
||||
import { handleError } from '$lib/utils/handle-error';
|
||||
import { getAllPeople, type PersonResponseDto } from '@immich/sdk';
|
||||
import { Button } from '@immich/ui';
|
||||
import { mdiArrowRight, mdiClose } from '@mdi/js';
|
||||
import { t } from 'svelte-i18n';
|
||||
import type { SvelteSet } from 'svelte/reactivity';
|
||||
|
|
@ -92,18 +91,14 @@
|
|||
{#if showAllPeople || people.length > peopleList.length}
|
||||
<div class="flex justify-center mt-2">
|
||||
<Button
|
||||
shadow={false}
|
||||
color="text-primary"
|
||||
color="primary"
|
||||
variant="ghost"
|
||||
shape="round"
|
||||
leadingIcon={showAllPeople ? mdiClose : mdiArrowRight}
|
||||
class="flex gap-2 place-items-center"
|
||||
onclick={() => (showAllPeople = !showAllPeople)}
|
||||
>
|
||||
{#if showAllPeople}
|
||||
<span><Icon path={mdiClose} ariaHidden /></span>
|
||||
{$t('collapse')}
|
||||
{:else}
|
||||
<span><Icon path={mdiArrowRight} ariaHidden /></span>
|
||||
{$t('see_all_people')}
|
||||
{/if}
|
||||
{showAllPeople ? $t('collapse') : $t('see_all_people')}
|
||||
</Button>
|
||||
</div>
|
||||
{/if}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue