-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auth/PM-12077 - Web Process Reload (#11781)
* PM-12077 - Initial work on web process reload - more testing required. * PM-12077 - Clarify comment * PM-12077 - Improving UX of logout with process reload. * PM-12077 - Final tweaks for process reload * PM-12077 - Remove no longer accurate comment. * PM-12077 - Per PR feedback, clean up logout reason --------- Co-authored-by: Matt Bishop <[email protected]>
- Loading branch information
1 parent
365c7dd
commit d1499da
Showing
9 changed files
with
77 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,19 @@ | ||
<router-outlet></router-outlet> | ||
<ng-template #loadingState> | ||
<!-- This is the same html from index.html which presents the bitwarden logo and loading spinny properly | ||
when the body has the layout_frontend class. Having this match the index allows for a duplicative yet seamless | ||
loading state here for process reloading. --> | ||
<div class="tw-p-8 tw-flex"> | ||
<img class="new-logo-themed" alt="Bitwarden" /> | ||
<div class="spinner-container tw-justify-center"> | ||
<i | ||
class="bwi bwi-spinner bwi-spin bwi-3x tw-text-muted" | ||
title="Loading" | ||
aria-hidden="true" | ||
></i> | ||
</div> | ||
</div> | ||
</ng-template> | ||
|
||
<ng-container *ngIf="!loading; else loadingState"> | ||
<router-outlet></router-outlet> | ||
</ng-container> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
apps/web/src/app/key-management/services/web-process-reload.service.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; | ||
import { ProcessReloadServiceAbstraction } from "@bitwarden/common/key-management/abstractions/process-reload.service"; | ||
|
||
export class WebProcessReloadService implements ProcessReloadServiceAbstraction { | ||
constructor(private window: Window) {} | ||
|
||
async startProcessReload(authService: AuthService): Promise<void> { | ||
this.window.location.reload(); | ||
} | ||
|
||
cancelProcessReload(): void { | ||
return; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters