mirror of
https://github.com/bitwarden/clients.git
synced 2026-07-01 21:10:49 +08:00
Improve routing during account switching to ensure feature flags are triggered (#18037)
Some checks failed
Chromatic / Check PR run (push) Has been cancelled
Scan / Check PR run (push) Has been cancelled
Testing / Run tests (push) Has been cancelled
Testing / Run Rust tests on ${{ matrix.os }} (macos-14) (push) Has been cancelled
Testing / Run Rust tests on ${{ matrix.os }} (ubuntu-22.04) (push) Has been cancelled
Testing / Run Rust tests on ${{ matrix.os }} (windows-2022) (push) Has been cancelled
Testing / Rust Coverage (push) Has been cancelled
Chromatic / Chromatic (push) Has been cancelled
Scan / Checkmarx (push) Has been cancelled
Scan / Sonar (push) Has been cancelled
Testing / Upload to Codecov (push) Has been cancelled
Some checks failed
Chromatic / Check PR run (push) Has been cancelled
Scan / Check PR run (push) Has been cancelled
Testing / Run tests (push) Has been cancelled
Testing / Run Rust tests on ${{ matrix.os }} (macos-14) (push) Has been cancelled
Testing / Run Rust tests on ${{ matrix.os }} (ubuntu-22.04) (push) Has been cancelled
Testing / Run Rust tests on ${{ matrix.os }} (windows-2022) (push) Has been cancelled
Testing / Rust Coverage (push) Has been cancelled
Chromatic / Chromatic (push) Has been cancelled
Scan / Checkmarx (push) Has been cancelled
Scan / Sonar (push) Has been cancelled
Testing / Upload to Codecov (push) Has been cancelled
When account switching from the old layout it's not bringing you into the new design. This resolves it by ensuring the route guard for vault is triggered after account switching.
This commit is contained in:
parent
bea6fb26f8
commit
5fe01323bb
@ -114,6 +114,8 @@ const routes: Routes = [
|
||||
authGuard,
|
||||
canAccessFeature(FeatureFlag.DesktopUiMigrationMilestone1, false, "new-vault", false),
|
||||
],
|
||||
// Needed to ensure feature flag changes are picked up on account switching
|
||||
runGuardsAndResolvers: "always",
|
||||
},
|
||||
{
|
||||
path: "send",
|
||||
|
||||
@ -492,9 +492,8 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
this.loading = true;
|
||||
await this.syncService.fullSync(false);
|
||||
this.loading = false;
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["vault"]);
|
||||
// Force reload to ensure route guards are activated
|
||||
await this.router.navigate(["vault"], { onSameUrlNavigation: "reload" });
|
||||
}
|
||||
this.messagingService.send("finishSwitchAccount");
|
||||
break;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user