mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-06-20 21:00:41 +00:00
feat: implement archive and bulk archive functionality with confirmation dialogs
This commit is contained in:
@@ -8,6 +8,8 @@ interface VaultDialogsProps {
|
||||
fieldType: CustomFieldType;
|
||||
fieldLabel: string;
|
||||
fieldValue: string;
|
||||
archiveConfirmOpen: boolean;
|
||||
bulkArchiveOpen: boolean;
|
||||
pendingDeleteOpen: boolean;
|
||||
bulkDeleteOpen: boolean;
|
||||
sidebarTrashMode: boolean;
|
||||
@@ -26,6 +28,10 @@ interface VaultDialogsProps {
|
||||
onFieldTypeChange: (value: CustomFieldType) => void;
|
||||
onFieldLabelChange: (value: string) => void;
|
||||
onFieldValueChange: (value: string) => void;
|
||||
onConfirmArchive: () => void;
|
||||
onCancelArchive: () => void;
|
||||
onConfirmBulkArchive: () => void;
|
||||
onCancelBulkArchive: () => void;
|
||||
onConfirmDelete: () => void;
|
||||
onCancelDelete: () => void;
|
||||
onConfirmBulkDelete: () => void;
|
||||
@@ -88,6 +94,26 @@ export default function VaultDialogs(props: VaultDialogsProps) {
|
||||
)}
|
||||
</ConfirmDialog>
|
||||
|
||||
<ConfirmDialog
|
||||
open={props.archiveConfirmOpen}
|
||||
title={t('txt_archive_item')}
|
||||
message={t('txt_archive_item_message')}
|
||||
confirmText={t('txt_archive')}
|
||||
cancelText={t('txt_cancel')}
|
||||
onConfirm={props.onConfirmArchive}
|
||||
onCancel={props.onCancelArchive}
|
||||
/>
|
||||
|
||||
<ConfirmDialog
|
||||
open={props.bulkArchiveOpen}
|
||||
title={t('txt_archive_selected_items')}
|
||||
message={t('txt_archive_selected_items_message', { count: props.selectedCount })}
|
||||
confirmText={t('txt_archive')}
|
||||
cancelText={t('txt_cancel')}
|
||||
onConfirm={props.onConfirmBulkArchive}
|
||||
onCancel={props.onCancelBulkArchive}
|
||||
/>
|
||||
|
||||
<ConfirmDialog open={props.pendingDeleteOpen} title={t('txt_delete_item')} message={t('txt_are_you_sure_you_want_to_delete_this_item')} danger onConfirm={props.onConfirmDelete} onCancel={props.onCancelDelete} />
|
||||
|
||||
<ConfirmDialog
|
||||
|
||||
Reference in New Issue
Block a user