mirror of
https://github.com/immich-app/immich.git
synced 2025-05-31 20:25:32 -04:00
feat: use immich ui components for dialog component (#16839)
This commit is contained in:
parent
b778a86c99
commit
8ad95b368b
@ -32,7 +32,7 @@
|
|||||||
<ConfirmDialog
|
<ConfirmDialog
|
||||||
title={$t('restore_user')}
|
title={$t('restore_user')}
|
||||||
confirmText={$t('continue')}
|
confirmText={$t('continue')}
|
||||||
confirmColor="green"
|
confirmColor="success"
|
||||||
onConfirm={handleRestoreUser}
|
onConfirm={handleRestoreUser}
|
||||||
{onCancel}
|
{onCancel}
|
||||||
>
|
>
|
||||||
|
@ -69,7 +69,7 @@
|
|||||||
prompt={$t('editor_close_without_save_prompt')}
|
prompt={$t('editor_close_without_save_prompt')}
|
||||||
cancelText={$t('no')}
|
cancelText={$t('no')}
|
||||||
cancelColor="secondary"
|
cancelColor="secondary"
|
||||||
confirmColor="red"
|
confirmColor="danger"
|
||||||
confirmText={$t('close')}
|
confirmText={$t('close')}
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
$showCancelConfirmDialog = false;
|
$showCancelConfirmDialog = false;
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import FullScreenModal from '../full-screen-modal.svelte';
|
import FullScreenModal from '../full-screen-modal.svelte';
|
||||||
import Button from '../../elements/buttons/button.svelte';
|
|
||||||
import type { Color } from '$lib/components/elements/buttons/button.svelte';
|
|
||||||
import { t } from 'svelte-i18n';
|
import { t } from 'svelte-i18n';
|
||||||
import type { Snippet } from 'svelte';
|
import type { Snippet } from 'svelte';
|
||||||
|
import { Button, type Color } from '@immich/ui';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
title?: string;
|
title?: string;
|
||||||
@ -24,7 +23,7 @@
|
|||||||
title = $t('confirm'),
|
title = $t('confirm'),
|
||||||
prompt = $t('are_you_sure_to_do_this'),
|
prompt = $t('are_you_sure_to_do_this'),
|
||||||
confirmText = $t('confirm'),
|
confirmText = $t('confirm'),
|
||||||
confirmColor = 'red',
|
confirmColor = 'danger',
|
||||||
cancelText = $t('cancel'),
|
cancelText = $t('cancel'),
|
||||||
cancelColor = 'secondary',
|
cancelColor = 'secondary',
|
||||||
hideCancelButton = false,
|
hideCancelButton = false,
|
||||||
@ -49,11 +48,11 @@
|
|||||||
|
|
||||||
{#snippet stickyBottom()}
|
{#snippet stickyBottom()}
|
||||||
{#if !hideCancelButton}
|
{#if !hideCancelButton}
|
||||||
<Button color={cancelColor} fullwidth onclick={onCancel}>
|
<Button shape="round" color={cancelColor} fullWidth onclick={onCancel}>
|
||||||
{cancelText}
|
{cancelText}
|
||||||
</Button>
|
</Button>
|
||||||
{/if}
|
{/if}
|
||||||
<Button color={confirmColor} fullwidth onclick={handleConfirm} {disabled}>
|
<Button shape="round" color={confirmColor} fullWidth onclick={handleConfirm} {disabled}>
|
||||||
{confirmText}
|
{confirmText}
|
||||||
</Button>
|
</Button>
|
||||||
{/snippet}
|
{/snippet}
|
||||||
|
@ -155,7 +155,7 @@
|
|||||||
onConfirm={() => (shouldShowPasswordResetSuccess = false)}
|
onConfirm={() => (shouldShowPasswordResetSuccess = false)}
|
||||||
onCancel={() => (shouldShowPasswordResetSuccess = false)}
|
onCancel={() => (shouldShowPasswordResetSuccess = false)}
|
||||||
hideCancelButton={true}
|
hideCancelButton={true}
|
||||||
confirmColor="green"
|
confirmColor="success"
|
||||||
>
|
>
|
||||||
{#snippet promptSnippet()}
|
{#snippet promptSnippet()}
|
||||||
<div class="flex flex-col gap-4">
|
<div class="flex flex-col gap-4">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user