fix(core): add missing confirm button variants (#8786)

fix AF-1628
This commit is contained in:
forehalo
2024-11-12 04:11:12 +00:00
parent 5cde590a4f
commit bfc8b93a96
5 changed files with 15 additions and 3 deletions

View File

@@ -155,6 +155,9 @@ export const PageHeaderMenuButton = ({
}),
cancelText: t['com.affine.confirmModal.button.cancel'](),
confirmText: t.Delete(),
confirmButtonOptions: {
variant: 'error',
},
onConfirm: () => {
editorService.editor.doc.moveToTrash();
},

View File

@@ -141,6 +141,9 @@ export const VirtualizedPageList = ({
}),
cancelText: t['com.affine.confirmModal.button.cancel'](),
confirmText: t.Delete(),
confirmButtonOptions: {
variant: 'error',
},
onConfirm: () => {
for (const docId of filteredSelectedPageIds) {
const doc = docsService.list.doc$(docId).value;

View File

@@ -119,6 +119,9 @@ export const PageOperationCell = ({
}),
cancelText: t['com.affine.confirmModal.button.cancel'](),
confirmText: t.Delete(),
confirmButtonOptions: {
variant: 'error',
},
onConfirm: () => {
docRecord.moveToTrash();
},

View File

@@ -36,6 +36,9 @@ const ResolveConflictOperations = ({ docRecord }: { docRecord: DocRecord }) => {
}),
cancelText: t['com.affine.confirmModal.button.cancel'](),
confirmText: t.Delete(),
confirmButtonOptions: {
variant: 'error',
},
onConfirm: () => {
docRecord.moveToTrash();
},