Refactor confirmation dialogs to standardize button labels and styles across components (#2560)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
This commit is contained in:
@@ -95,6 +95,14 @@ export class BookMenuService {
|
||||
icon: 'pi pi-exclamation-triangle',
|
||||
acceptLabel: 'Yes',
|
||||
rejectLabel: 'No',
|
||||
acceptButtonProps: {
|
||||
label: 'Yes',
|
||||
severity: 'success'
|
||||
},
|
||||
rejectButtonProps: {
|
||||
label: 'No',
|
||||
severity: 'secondary'
|
||||
},
|
||||
accept: () => {
|
||||
const loader = this.loadingService.show(`Updating read status for ${count} book(s)...`);
|
||||
|
||||
|
||||
@@ -119,6 +119,8 @@ export class LibraryShelfMenuService {
|
||||
this.confirmationService.confirm({
|
||||
message: `Are you sure you want to delete library: ${entity?.name}?`,
|
||||
header: 'Confirmation',
|
||||
acceptLabel: 'Yes',
|
||||
rejectLabel: 'Cancel',
|
||||
rejectButtonProps: {
|
||||
label: 'Cancel',
|
||||
severity: 'secondary',
|
||||
@@ -183,9 +185,16 @@ export class LibraryShelfMenuService {
|
||||
this.confirmationService.confirm({
|
||||
message: `Are you sure you want to delete shelf: ${entity?.name}?`,
|
||||
header: 'Confirmation',
|
||||
acceptLabel: 'Yes',
|
||||
rejectLabel: 'Cancel',
|
||||
acceptButtonProps: {
|
||||
label: 'Yes',
|
||||
severity: 'danger'
|
||||
},
|
||||
rejectButtonProps: {
|
||||
label: 'Cancel',
|
||||
severity: 'secondary'
|
||||
},
|
||||
accept: () => {
|
||||
this.shelfService.deleteShelf(entity?.id!).subscribe({
|
||||
complete: () => {
|
||||
@@ -237,9 +246,16 @@ export class LibraryShelfMenuService {
|
||||
this.confirmationService.confirm({
|
||||
message: `Are you sure you want to delete magic shelf: ${entity?.name}?`,
|
||||
header: 'Confirmation',
|
||||
acceptLabel: 'Yes',
|
||||
rejectLabel: 'Cancel',
|
||||
acceptButtonProps: {
|
||||
label: 'Yes',
|
||||
severity: 'danger'
|
||||
},
|
||||
rejectButtonProps: {
|
||||
label: 'Cancel',
|
||||
severity: 'secondary'
|
||||
},
|
||||
accept: () => {
|
||||
this.magicShelfService.deleteShelf(entity?.id!).subscribe({
|
||||
complete: () => {
|
||||
|
||||
Reference in New Issue
Block a user