mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-29 12:55:21 +01:00
feat: add confirm collection enhancements dialog, refs AC-2113 (#7884)
This commit is contained in:
parent
c36a38f74e
commit
783ae104a3
@ -67,7 +67,12 @@
|
|||||||
{{ "collectionEnhancementsLearnMore" | i18n }}
|
{{ "collectionEnhancementsLearnMore" | i18n }}
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
<button type="button" bitButton buttonType="primary" [bitAction]="enableCollectionEnhancements">
|
<button
|
||||||
|
type="button"
|
||||||
|
bitButton
|
||||||
|
buttonType="primary"
|
||||||
|
(click)="showConfirmCollectionEnhancementsDialog()"
|
||||||
|
>
|
||||||
{{ "enable" | i18n }}
|
{{ "enable" | i18n }}
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
@ -16,7 +16,7 @@ import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.se
|
|||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
||||||
import { DialogService } from "@bitwarden/components";
|
import { DialogService, SimpleDialogOptions } from "@bitwarden/components";
|
||||||
|
|
||||||
import { ApiKeyComponent } from "../../../auth/settings/security/api-key.component";
|
import { ApiKeyComponent } from "../../../auth/settings/security/api-key.component";
|
||||||
import { PurgeVaultComponent } from "../../../vault/settings/purge-vault.component";
|
import { PurgeVaultComponent } from "../../../vault/settings/purge-vault.component";
|
||||||
@ -183,7 +183,13 @@ export class AccountComponent {
|
|||||||
this.platformUtilsService.showToast("success", null, this.i18nService.t("organizationUpdated"));
|
this.platformUtilsService.showToast("success", null, this.i18nService.t("organizationUpdated"));
|
||||||
};
|
};
|
||||||
|
|
||||||
enableCollectionEnhancements = async () => {
|
async showConfirmCollectionEnhancementsDialog() {
|
||||||
|
const collectionEnhancementsDialogOptions: SimpleDialogOptions = {
|
||||||
|
title: this.i18nService.t("confirmCollectionEnhancementsDialogTitle"),
|
||||||
|
content: this.i18nService.t("confirmCollectionEnhancementsDialogContent"),
|
||||||
|
type: "warning",
|
||||||
|
acceptButtonText: this.i18nService.t("continue"),
|
||||||
|
acceptAction: async () => {
|
||||||
await this.organizationApiService.enableCollectionEnhancements(this.organizationId);
|
await this.organizationApiService.enableCollectionEnhancements(this.organizationId);
|
||||||
|
|
||||||
this.platformUtilsService.showToast(
|
this.platformUtilsService.showToast(
|
||||||
@ -191,8 +197,12 @@ export class AccountComponent {
|
|||||||
null,
|
null,
|
||||||
this.i18nService.t("updatedCollectionManagement"),
|
this.i18nService.t("updatedCollectionManagement"),
|
||||||
);
|
);
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
await this.dialogService.openSimpleDialog(collectionEnhancementsDialogOptions);
|
||||||
|
}
|
||||||
|
|
||||||
submitCollectionManagement = async () => {
|
submitCollectionManagement = async () => {
|
||||||
// Early exit if self-hosted
|
// Early exit if self-hosted
|
||||||
if (this.selfHosted) {
|
if (this.selfHosted) {
|
||||||
|
@ -7519,5 +7519,11 @@
|
|||||||
},
|
},
|
||||||
"smFreeTrialConfirmationEmail": {
|
"smFreeTrialConfirmationEmail": {
|
||||||
"message": "We've sent a confirmation email to your email at "
|
"message": "We've sent a confirmation email to your email at "
|
||||||
|
},
|
||||||
|
"confirmCollectionEnhancementsDialogTitle": {
|
||||||
|
"message": "This action is irreversible"
|
||||||
|
},
|
||||||
|
"confirmCollectionEnhancementsDialogContent": {
|
||||||
|
"message": "Turning on this feature will deprecate the manager role and replace it with a Can manage permission. This will take a few moments. Do not make any organization changes until it is complete. Are you sure you want to proceed?"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user