1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-18 10:23:52 +00:00

updated try/cache, toast, and FF placement

This commit is contained in:
Isaac Ivins
2026-02-03 15:47:42 -05:00
parent a38fae3051
commit 13fa5085bf
3 changed files with 20 additions and 23 deletions

View File

@@ -21,10 +21,10 @@
name="verification"
></app-user-verification>
</div>
<div id="confirmIdentityHelp">
<p>{{ "confirmIdentity" | i18n }}</p>
</div>
}
<div id="confirmIdentityHelp">
<p>{{ "confirmIdentity" | i18n }}</p>
</div>
</div>
<ng-container bitDialogFooter>
<button bitButton bitFormButton type="submit" buttonType="danger" [disabled]="!secret">

View File

@@ -72,10 +72,18 @@ export class DeleteAccountComponent {
}
submit = async () => {
if (!this.migrationMilestone4()) {
const verification = this.deleteForm.get("verification").value;
await this.accountApiService.deleteAccount(verification);
this.toastService.showToast({
variant: "success",
title: this.i18nService.t("accountDeleted"),
message: this.i18nService.t("accountDeletedDesc"),
});
return;
}
try {
if (this.migrationMilestone4()) {
this.invalidSecret.set(false);
}
this.invalidSecret.set(false);
const verification = this.deleteForm.get("verification").value;
await this.accountApiService.deleteAccount(verification);
this.toastService.showToast({
@@ -84,14 +92,12 @@ export class DeleteAccountComponent {
message: this.i18nService.t("accountDeletedDesc"),
});
} catch {
if (this.migrationMilestone4()) {
this.invalidSecret.set(true);
this.toastService.showToast({
variant: "error",
title: this.i18nService.t("errorOccurred"),
message: this.i18nService.t("userVerificationFailed"),
});
}
this.invalidSecret.set(true);
this.toastService.showToast({
variant: "error",
title: this.i18nService.t("errorOccurred"),
message: this.i18nService.t("userVerificationFailed"),
});
}
};
}

View File

@@ -196,15 +196,6 @@ export function getFeatureFlagValue<Flag extends FeatureFlag>(
serverConfig: ServerConfig | null,
flag: Flag,
) {
if (
flag === FeatureFlag.DesktopUiMigrationMilestone1 ||
flag === FeatureFlag.DesktopUiMigrationMilestone2 ||
flag === FeatureFlag.DesktopUiMigrationMilestone3 ||
flag === FeatureFlag.DesktopUiMigrationMilestone4
) {
// Desktop milestone flags are only read from the server config during desktop app runtime.
return true;
}
if (serverConfig?.featureStates == null || serverConfig.featureStates[flag] == null) {
return DefaultFeatureFlagValue[flag];
}