mirror of
https://github.com/immich-app/immich.git
synced 2025-05-24 01:12:58 -04:00
parent
8f045bc602
commit
fa45a26cff
@ -1,37 +0,0 @@
|
||||
<script lang="ts">
|
||||
interface Props {
|
||||
id: string;
|
||||
label: string;
|
||||
checked?: boolean | undefined;
|
||||
disabled?: boolean;
|
||||
labelClass?: string | undefined;
|
||||
name?: string | undefined;
|
||||
value?: string | undefined;
|
||||
onchange?: () => void;
|
||||
}
|
||||
|
||||
let {
|
||||
id,
|
||||
label,
|
||||
checked = $bindable(),
|
||||
disabled = false,
|
||||
labelClass = undefined,
|
||||
name = undefined,
|
||||
value = undefined,
|
||||
onchange = () => {},
|
||||
}: Props = $props();
|
||||
</script>
|
||||
|
||||
<div class="flex items-center space-x-2">
|
||||
<input
|
||||
type="checkbox"
|
||||
{name}
|
||||
{id}
|
||||
{value}
|
||||
{disabled}
|
||||
class="size-5 flex-shrink-0 focus-visible:ring"
|
||||
bind:checked
|
||||
{onchange}
|
||||
/>
|
||||
<label class={labelClass} for={id}>{label}</label>
|
||||
</div>
|
@ -1,8 +1,8 @@
|
||||
<script lang="ts">
|
||||
import Checkbox from '$lib/components/elements/checkbox.svelte';
|
||||
import FormatMessage from '$lib/components/i18n/format-message.svelte';
|
||||
import ConfirmModal from '$lib/modals/ConfirmModal.svelte';
|
||||
import { showDeleteModal } from '$lib/stores/preferences.store';
|
||||
import { Checkbox, Label } from '@immich/ui';
|
||||
import { t } from 'svelte-i18n';
|
||||
|
||||
interface Props {
|
||||
@ -38,8 +38,9 @@
|
||||
</p>
|
||||
<p><b>{$t('cannot_undo_this_action')}</b></p>
|
||||
|
||||
<div class="pt-4 flex justify-center items-center">
|
||||
<Checkbox id="confirm-deletion-input" label={$t('do_not_show_again')} bind:checked />
|
||||
<div class="pt-4 flex justify-center items-center gap-2">
|
||||
<Checkbox id="confirm-deletion-input" bind:checked color="secondary" />
|
||||
<Label label={$t('do_not_show_again')} for="confirm-deletion-input" />
|
||||
</div>
|
||||
{/snippet}
|
||||
</ConfirmModal>
|
||||
|
@ -1,13 +1,14 @@
|
||||
<script lang="ts" module>
|
||||
export interface SearchDisplayFilters {
|
||||
isNotInAlbum?: boolean;
|
||||
isArchive?: boolean;
|
||||
isFavorite?: boolean;
|
||||
isNotInAlbum: boolean;
|
||||
isArchive: boolean;
|
||||
isFavorite: boolean;
|
||||
}
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import Checkbox from '$lib/components/elements/checkbox.svelte';
|
||||
import { Checkbox, Label } from '@immich/ui';
|
||||
|
||||
import { t } from 'svelte-i18n';
|
||||
|
||||
interface Props {
|
||||
@ -21,9 +22,18 @@
|
||||
<fieldset>
|
||||
<legend class="immich-form-label">{$t('display_options').toUpperCase()}</legend>
|
||||
<div class="flex flex-wrap gap-x-5 gap-y-2 mt-1">
|
||||
<Checkbox id="not-in-album-checkbox" label={$t('not_in_any_album')} bind:checked={filters.isNotInAlbum} />
|
||||
<Checkbox id="archive-checkbox" label={$t('archive')} bind:checked={filters.isArchive} />
|
||||
<Checkbox id="favorite-checkbox" label={$t('favorites')} bind:checked={filters.isFavorite} />
|
||||
<div class="flex items-center gap-2">
|
||||
<Checkbox id="not-in-album-checkbox" size="tiny" bind:checked={filters.isNotInAlbum} />
|
||||
<Label label={$t('not_in_any_album')} for="not-in-album-checkbox" />
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<Checkbox id="archive-checkbox" size="tiny" bind:checked={filters.isArchive} />
|
||||
<Label label={$t('archive')} for="archive-checkbox" />
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<Checkbox id="favorites-checkbox" size="tiny" bind:checked={filters.isFavorite} />
|
||||
<Label label={$t('favorites')} for="favorites-checkbox" />
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<script lang="ts">
|
||||
import Checkbox from '$lib/components/elements/checkbox.svelte';
|
||||
import { Checkbox, Label } from '@immich/ui';
|
||||
import { t } from 'svelte-i18n';
|
||||
import { quintOut } from 'svelte/easing';
|
||||
import { fly } from 'svelte/transition';
|
||||
import { t } from 'svelte-i18n';
|
||||
|
||||
interface Props {
|
||||
value: string[];
|
||||
@ -52,14 +52,18 @@
|
||||
{/if}
|
||||
<div class="flex flex-col gap-2">
|
||||
{#each options as option (option.value)}
|
||||
<div class="flex gap-2 items-center">
|
||||
<Checkbox
|
||||
size="tiny"
|
||||
id="{option.value}-checkbox"
|
||||
label={option.text}
|
||||
checked={value.includes(option.value)}
|
||||
{disabled}
|
||||
labelClass="text-gray-500 dark:text-gray-300"
|
||||
onchange={() => handleCheckboxChange(option.value)}
|
||||
onCheckedChange={() => handleCheckboxChange(option.value)}
|
||||
/>
|
||||
<Label label={option.text} for="{option.value}-checkbox">
|
||||
{option.text}
|
||||
</Label>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -84,8 +84,8 @@
|
||||
},
|
||||
display: {
|
||||
isArchive: searchQuery.visibility === AssetVisibility.Archive,
|
||||
isFavorite: searchQuery.isFavorite,
|
||||
isNotInAlbum: 'isNotInAlbum' in searchQuery ? searchQuery.isNotInAlbum : undefined,
|
||||
isFavorite: searchQuery.isFavorite ?? false,
|
||||
isNotInAlbum: 'isNotInAlbum' in searchQuery ? (searchQuery.isNotInAlbum ?? false) : false,
|
||||
},
|
||||
mediaType:
|
||||
searchQuery.type === AssetTypeEnum.Image
|
||||
@ -105,7 +105,11 @@
|
||||
location: {},
|
||||
camera: {},
|
||||
date: {},
|
||||
display: {},
|
||||
display: {
|
||||
isArchive: false,
|
||||
isFavorite: false,
|
||||
isNotInAlbum: false,
|
||||
},
|
||||
mediaType: MediaType.All,
|
||||
rating: undefined,
|
||||
};
|
||||
|
@ -1,10 +1,10 @@
|
||||
<script lang="ts">
|
||||
import Checkbox from '$lib/components/elements/checkbox.svelte';
|
||||
import FormatMessage from '$lib/components/i18n/format-message.svelte';
|
||||
import ConfirmModal from '$lib/modals/ConfirmModal.svelte';
|
||||
import { serverConfig } from '$lib/stores/server-config.store';
|
||||
import { handleError } from '$lib/utils/handle-error';
|
||||
import { deleteUserAdmin, type UserAdminResponseDto, type UserResponseDto } from '@immich/sdk';
|
||||
import { Checkbox, Label } from '@immich/ui';
|
||||
import { t } from 'svelte-i18n';
|
||||
|
||||
interface Props {
|
||||
@ -66,16 +66,14 @@
|
||||
</p>
|
||||
{/if}
|
||||
|
||||
<div class="flex justify-center m-4 gap-2">
|
||||
<div class="flex justify-center items-center gap-2">
|
||||
<Checkbox
|
||||
id="queue-user-deletion-checkbox"
|
||||
label={$t('admin.user_delete_immediately_checkbox')}
|
||||
labelClass="text-sm dark:text-immich-dark-fg"
|
||||
color="secondary"
|
||||
bind:checked={forceDelete}
|
||||
onchange={() => {
|
||||
deleteButtonDisabled = forceDelete;
|
||||
}}
|
||||
onCheckedChange={() => (deleteButtonDisabled = forceDelete)}
|
||||
/>
|
||||
<Label label={$t('admin.user_delete_immediately_checkbox')} for="queue-user-deletion-checkbox" />
|
||||
</div>
|
||||
|
||||
{#if forceDelete}
|
||||
|
Loading…
x
Reference in New Issue
Block a user