mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor: dialog callbacks (#18034)
This commit is contained in:
parent
5d21ba3166
commit
15d431ba6a
13 changed files with 69 additions and 81 deletions
|
|
@ -47,8 +47,7 @@
|
|||
<ConfirmDialog
|
||||
title={$t('delete_user')}
|
||||
confirmText={forceDelete ? $t('permanently_delete') : $t('delete')}
|
||||
onConfirm={handleDeleteUser}
|
||||
{onCancel}
|
||||
onClose={(confirmed) => (confirmed ? handleDeleteUser() : onCancel())}
|
||||
disabled={deleteButtonDisabled}
|
||||
>
|
||||
{#snippet promptSnippet()}
|
||||
|
|
|
|||
|
|
@ -33,8 +33,7 @@
|
|||
title={$t('restore_user')}
|
||||
confirmText={$t('continue')}
|
||||
confirmColor="success"
|
||||
onConfirm={handleRestoreUser}
|
||||
{onCancel}
|
||||
onClose={(confirmed) => (confirmed ? handleRestoreUser() : onCancel())}
|
||||
>
|
||||
{#snippet promptSnippet()}
|
||||
<p>
|
||||
|
|
|
|||
|
|
@ -49,8 +49,7 @@
|
|||
{#if isConfirmOpen}
|
||||
<ConfirmDialog
|
||||
title={$t('admin.disable_login')}
|
||||
onCancel={() => (isConfirmOpen = false)}
|
||||
onConfirm={() => handleSave(true)}
|
||||
onClose={(confirmed) => (confirmed ? handleSave(true) : (isConfirmOpen = false))}
|
||||
>
|
||||
{#snippet promptSnippet()}
|
||||
<div class="flex flex-col gap-4">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue