mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor: introduce modal manager (#18039)
This commit is contained in:
parent
15d431ba6a
commit
62fc5b3c7d
11 changed files with 265 additions and 236 deletions
43
web/src/lib/forms/password-reset-success.svelte
Normal file
43
web/src/lib/forms/password-reset-success.svelte
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<script lang="ts">
|
||||
import ConfirmDialog from '$lib/components/shared-components/dialog/confirm-dialog.svelte';
|
||||
import { copyToClipboard } from '$lib/utils';
|
||||
import { Code, IconButton, Text } from '@immich/ui';
|
||||
import { mdiContentCopy } from '@mdi/js';
|
||||
import { t } from 'svelte-i18n';
|
||||
|
||||
type Props = {
|
||||
onClose: () => void;
|
||||
newPassword: string;
|
||||
};
|
||||
|
||||
const { onClose, newPassword }: Props = $props();
|
||||
</script>
|
||||
|
||||
<ConfirmDialog
|
||||
title={$t('password_reset_success')}
|
||||
confirmText={$t('done')}
|
||||
{onClose}
|
||||
hideCancelButton={true}
|
||||
confirmColor="success"
|
||||
>
|
||||
{#snippet promptSnippet()}
|
||||
<div class="flex flex-col gap-4">
|
||||
<Text>{$t('admin.user_password_has_been_reset')}</Text>
|
||||
|
||||
<div class="flex justify-center gap-2 items-center">
|
||||
<Code color="primary">{newPassword}</Code>
|
||||
<IconButton
|
||||
icon={mdiContentCopy}
|
||||
shape="round"
|
||||
color="secondary"
|
||||
variant="ghost"
|
||||
onclick={() => copyToClipboard(newPassword)}
|
||||
title={$t('copy_password')}
|
||||
aria-label={$t('copy_password')}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<Text>{$t('admin.user_password_reset_description')}</Text>
|
||||
</div>
|
||||
{/snippet}
|
||||
</ConfirmDialog>
|
||||
Loading…
Add table
Add a link
Reference in a new issue