mirror of
https://github.com/immich-app/immich.git
synced 2025-03-18 02:31:28 -05:00
feat: use immich ui components for dialog component (#16839)
This commit is contained in:
parent
b778a86c99
commit
8ad95b368b
4 changed files with 7 additions and 8 deletions
web/src
lib/components
admin-page
asset-viewer/editor
shared-components/dialog
routes/admin/user-management
|
@ -32,7 +32,7 @@
|
|||
<ConfirmDialog
|
||||
title={$t('restore_user')}
|
||||
confirmText={$t('continue')}
|
||||
confirmColor="green"
|
||||
confirmColor="success"
|
||||
onConfirm={handleRestoreUser}
|
||||
{onCancel}
|
||||
>
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
prompt={$t('editor_close_without_save_prompt')}
|
||||
cancelText={$t('no')}
|
||||
cancelColor="secondary"
|
||||
confirmColor="red"
|
||||
confirmColor="danger"
|
||||
confirmText={$t('close')}
|
||||
onCancel={() => {
|
||||
$showCancelConfirmDialog = false;
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
<script lang="ts">
|
||||
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 type { Snippet } from 'svelte';
|
||||
import { Button, type Color } from '@immich/ui';
|
||||
|
||||
interface Props {
|
||||
title?: string;
|
||||
|
@ -24,7 +23,7 @@
|
|||
title = $t('confirm'),
|
||||
prompt = $t('are_you_sure_to_do_this'),
|
||||
confirmText = $t('confirm'),
|
||||
confirmColor = 'red',
|
||||
confirmColor = 'danger',
|
||||
cancelText = $t('cancel'),
|
||||
cancelColor = 'secondary',
|
||||
hideCancelButton = false,
|
||||
|
@ -49,11 +48,11 @@
|
|||
|
||||
{#snippet stickyBottom()}
|
||||
{#if !hideCancelButton}
|
||||
<Button color={cancelColor} fullwidth onclick={onCancel}>
|
||||
<Button shape="round" color={cancelColor} fullWidth onclick={onCancel}>
|
||||
{cancelText}
|
||||
</Button>
|
||||
{/if}
|
||||
<Button color={confirmColor} fullwidth onclick={handleConfirm} {disabled}>
|
||||
<Button shape="round" color={confirmColor} fullWidth onclick={handleConfirm} {disabled}>
|
||||
{confirmText}
|
||||
</Button>
|
||||
{/snippet}
|
||||
|
|
|
@ -155,7 +155,7 @@
|
|||
onConfirm={() => (shouldShowPasswordResetSuccess = false)}
|
||||
onCancel={() => (shouldShowPasswordResetSuccess = false)}
|
||||
hideCancelButton={true}
|
||||
confirmColor="green"
|
||||
confirmColor="success"
|
||||
>
|
||||
{#snippet promptSnippet()}
|
||||
<div class="flex flex-col gap-4">
|
||||
|
|
Loading…
Add table
Reference in a new issue