-
Notifications
You must be signed in to change notification settings - Fork 2.8k
perf: Unified deletion confirmation button #2495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -713,7 +713,7 @@ function deleteMulDocument() { | |
| `${t('views.document.delete.confirmTitle1')} ${multipleSelection.value.length} ${t('views.document.delete.confirmTitle2')}`, | ||
| t('views.document.delete.confirmMessage'), | ||
| { | ||
| confirmButtonText: t('common.delete'), | ||
| confirmButtonText: t('common.confirm'), | ||
| confirmButtonClass: 'danger' | ||
| } | ||
| ) | ||
|
|
@@ -749,7 +749,7 @@ function deleteDocument(row: any) { | |
| `${t('views.document.delete.confirmTitle3')} ${row.name} ?`, | ||
| `${t('views.document.delete.confirmMessage1')} ${row.paragraph_count} ${t('views.document.delete.confirmMessage2')}`, | ||
| { | ||
| confirmButtonText: t('common.delete'), | ||
| confirmButtonText: t('common.confirm'), | ||
| confirmButtonClass: 'danger' | ||
| } | ||
| ) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code has some minor adjustments that do not directly affect functionality but could improve readability or maintainability:
These changes make the strings more concise while keeping their meaning consistent. |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -236,7 +236,7 @@ function deleteMulParagraph() { | |
| `${t('views.document.delete.confirmTitle1')} ${multipleSelection.value.length} ${t('views.document.delete.confirmTitle2')}`, | ||
| t('views.paragraph.delete.confirmMessage'), | ||
| { | ||
| confirmButtonText: t('common.delete'), | ||
| confirmButtonText: t('common.confirm'), | ||
| confirmButtonClass: 'danger' | ||
| } | ||
| ) | ||
|
|
@@ -294,7 +294,7 @@ function deleteParagraph(row: any) { | |
| `${t('views.paragraph.delete.confirmTitle')} ${row.title || '-'} ?`, | ||
| t('views.paragraph.delete.confirmMessage'), | ||
| { | ||
| confirmButtonText: t('common.delete'), | ||
| confirmButtonText: t('common.confirm'), | ||
| confirmButtonClass: 'danger' | ||
| } | ||
| ) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The provided code snippets look relatively clean and efficient compared to their original versions, with minor changes that aim to improve readability and usability. However, there are a few points you might consider optimizing for future maintainability: Improvements:
While the current implementation works well, these adjustments will enhance both functionality and developer experience over time. |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an identical line of code that needs to be removed. Please correct this issue.