mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 00:03:56 +00:00
do not show the inline menu when there are no active users (#9273)
This commit is contained in:
@@ -3,6 +3,7 @@ import { firstValueFrom } from "rxjs";
|
|||||||
import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service";
|
import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service";
|
||||||
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
|
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
|
||||||
import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction";
|
import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction";
|
||||||
|
import { AutofillOverlayVisibility } from "@bitwarden/common/autofill/constants";
|
||||||
import { AutofillSettingsServiceAbstraction } from "@bitwarden/common/autofill/services/autofill-settings.service";
|
import { AutofillSettingsServiceAbstraction } from "@bitwarden/common/autofill/services/autofill-settings.service";
|
||||||
import { DomainSettingsService } from "@bitwarden/common/autofill/services/domain-settings.service";
|
import { DomainSettingsService } from "@bitwarden/common/autofill/services/domain-settings.service";
|
||||||
import { InlineMenuVisibilitySetting } from "@bitwarden/common/autofill/types";
|
import { InlineMenuVisibilitySetting } from "@bitwarden/common/autofill/types";
|
||||||
@@ -109,9 +110,12 @@ export default class AutofillService implements AutofillServiceInterface {
|
|||||||
// Autofill user settings loaded from state can await the active account state indefinitely
|
// Autofill user settings loaded from state can await the active account state indefinitely
|
||||||
// if not guarded by an active account check (e.g. the user is logged in)
|
// if not guarded by an active account check (e.g. the user is logged in)
|
||||||
const activeAccount = await firstValueFrom(this.accountService.activeAccount$);
|
const activeAccount = await firstValueFrom(this.accountService.activeAccount$);
|
||||||
|
let overlayVisibility: InlineMenuVisibilitySetting = AutofillOverlayVisibility.Off;
|
||||||
let autoFillOnPageLoadIsEnabled = false;
|
let autoFillOnPageLoadIsEnabled = false;
|
||||||
const overlayVisibility = await this.getOverlayVisibility();
|
|
||||||
|
if (activeAccount) {
|
||||||
|
overlayVisibility = await this.getOverlayVisibility();
|
||||||
|
}
|
||||||
|
|
||||||
const mainAutofillScript = overlayVisibility
|
const mainAutofillScript = overlayVisibility
|
||||||
? "bootstrap-autofill-overlay.js"
|
? "bootstrap-autofill-overlay.js"
|
||||||
|
|||||||
Reference in New Issue
Block a user