mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +00:00
[PM-18918] Navigate directly to at risk passwords page (#14044)
* refactor `openPopup` vault message to `OpenAtRiskPasswords`
* navigate directly to the at risk passwords page
* ensure the at-risk-passwords page navigates back to the vault
* reset popup index page
* avoid setting `hasNavigated` for the initial route
* Revert "avoid setting `hasNavigated` for the initial route"
This reverts commit 68bd9268ae.
* always reset popup page to the index
---------
Co-authored-by: Shane Melton <smelton@bitwarden.com>
This commit is contained in:
@@ -1620,6 +1620,26 @@ export default class MainBackground {
|
||||
}
|
||||
}
|
||||
|
||||
/** Opens the `/at-risk-passwords` page within the popup */
|
||||
async openAtRisksPasswordsPage() {
|
||||
const browserAction = BrowserApi.getBrowserAction();
|
||||
|
||||
try {
|
||||
// Set route of the popup before attempting to open it.
|
||||
// If the vault is locked, this won't have an effect as the auth guards will
|
||||
// redirect the user to the login page.
|
||||
await browserAction.setPopup({ popup: "popup/index.html#/at-risk-passwords" });
|
||||
|
||||
await this.openPopup();
|
||||
} finally {
|
||||
// Reset the popup route to the default route so any subsequent
|
||||
// popup openings will not open to the at-risk-passwords page.
|
||||
await browserAction.setPopup({
|
||||
popup: "popup/index.html#/",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
async reseedStorage() {
|
||||
if (
|
||||
!this.platformUtilsService.isChrome() &&
|
||||
|
||||
Reference in New Issue
Block a user