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
No known key found for this signature in database
GPG Key ID: 56709255DC7EC728
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();
},

View File

@ -2,7 +2,7 @@
"ar": 79,
"ca": 6,
"da": 6,
"de": 30,
"de": 29,
"en": 100,
"es-AR": 14,
"es-CL": 16,
@ -10,10 +10,10 @@
"fr": 70,
"hi": 2,
"it": 1,
"ja": 94,
"ja": 93,
"ko": 83,
"pl": 0,
"pt-BR": 91,
"pt-BR": 90,
"ru": 77,
"sv-SE": 5,
"ur": 3,