update confirmation dialog input
This commit is contained in:
parent
98ccd745f3
commit
7272130f7a
@ -23,7 +23,7 @@ interface CheckBox {
|
||||
extraContentData?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export class ConfirmationDialogInput {
|
||||
interface IConfirmationDialogInput {
|
||||
title?: string;
|
||||
titleColor?: TitleColor;
|
||||
question?: string;
|
||||
@ -37,8 +37,24 @@ export class ConfirmationDialogInput {
|
||||
translateParams?: Record<string, unknown>;
|
||||
checkboxes?: CheckBox[];
|
||||
toastMessage?: string;
|
||||
}
|
||||
|
||||
constructor(options?: ConfirmationDialogInput) {
|
||||
export class ConfirmationDialogInput implements IConfirmationDialogInput {
|
||||
title: string;
|
||||
titleColor: TitleColor;
|
||||
question: string;
|
||||
details: string;
|
||||
confirmationText: string;
|
||||
alternativeConfirmationText?: string;
|
||||
discardChangesText?: string;
|
||||
requireInput: boolean;
|
||||
disableConfirm: boolean;
|
||||
denyText: string;
|
||||
translateParams: Record<string, unknown>;
|
||||
checkboxes: CheckBox[];
|
||||
toastMessage?: string;
|
||||
|
||||
constructor(options?: IConfirmationDialogInput) {
|
||||
this.title = options?.title || _('common.confirmation-dialog.title');
|
||||
this.titleColor = options?.titleColor || TitleColors.DEFAULT;
|
||||
this.question = options?.question || _('common.confirmation-dialog.description');
|
||||
@ -78,7 +94,7 @@ export class ConfirmationDialogComponent {
|
||||
}
|
||||
|
||||
get uncheckedBoxes(): boolean {
|
||||
return !!this.config.checkboxes?.some(c => !c.value);
|
||||
return this.config.checkboxes.some(c => !c.value);
|
||||
}
|
||||
|
||||
get isDeleteAction(): boolean {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user