mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 07:13:32 +00:00
SG-680 - Domain-add-edit-dialog - Confirmation required now for domain deletion
This commit is contained in:
@@ -5562,6 +5562,12 @@
|
|||||||
"invalidDomainNameMessage": {
|
"invalidDomainNameMessage": {
|
||||||
"message": "Input is not a valid format. Format: mydomain.com. Subdomains require separate entries to be verified."
|
"message": "Input is not a valid format. Format: mydomain.com. Subdomains require separate entries to be verified."
|
||||||
},
|
},
|
||||||
|
"removeDomain": {
|
||||||
|
"message": "Remove domain"
|
||||||
|
},
|
||||||
|
"removeDomainWarning": {
|
||||||
|
"message": "Removing a domain cannot be undone. Are you sure you want to continue?"
|
||||||
|
},
|
||||||
"domainRemoved": {
|
"domainRemoved": {
|
||||||
"message": "Domain removed"
|
"message": "Domain removed"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -152,11 +152,20 @@ export class DomainAddEditDialogComponent implements OnInit, OnDestroy {
|
|||||||
};
|
};
|
||||||
|
|
||||||
deleteDomain = async (): Promise<void> => {
|
deleteDomain = async (): Promise<void> => {
|
||||||
// TODO: Do I need an are you sure prompt? yes
|
const confirmed = await this.platformUtilsService.showDialog(
|
||||||
|
this.i18nService.t("removeDomainWarning"),
|
||||||
|
this.i18nService.t("removeDomain"),
|
||||||
|
this.i18nService.t("yes"),
|
||||||
|
this.i18nService.t("no"),
|
||||||
|
"warning"
|
||||||
|
);
|
||||||
|
if (!confirmed) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
await this.orgDomainApiService.delete(this.data.organizationId, this.data.orgDomain.id);
|
await this.orgDomainApiService.delete(this.data.organizationId, this.data.orgDomain.id);
|
||||||
|
|
||||||
this.platformUtilsService.showToast("success", null, this.i18nService.t("domainRemoved"));
|
this.platformUtilsService.showToast("success", null, this.i18nService.t("domainRemoved"));
|
||||||
|
|
||||||
this.dialogRef.close();
|
this.dialogRef.close();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user