1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 02:03:39 +00:00

[AC-2443] Update unassigned items banner text for self-hosted (#8719)

* Update banner text for self-hosted environments

* Fix tests

* Fix web vault wording

* Actually fix web vault wording
This commit is contained in:
Thomas Rittson
2024-04-12 21:57:17 +10:00
committed by GitHub
parent bf11b90c43
commit d026087bfd
6 changed files with 34 additions and 7 deletions

View File

@@ -1,6 +1,10 @@
import { Injectable } from "@angular/core";
import { concatMap } from "rxjs";
import { concatMap, map } from "rxjs";
import {
EnvironmentService,
Region,
} from "@bitwarden/common/platform/abstractions/environment.service";
import {
StateProvider,
UNASSIGNED_ITEMS_BANNER_DISK,
@@ -36,9 +40,18 @@ export class UnassignedItemsBannerService {
}),
);
bannerText$ = this.environmentService.environment$.pipe(
map((e) =>
e?.getRegion() == Region.SelfHosted
? "unassignedItemsBannerSelfHost"
: "unassignedItemsBanner",
),
);
constructor(
private stateProvider: StateProvider,
private apiService: UnassignedItemsBannerApiService,
private environmentService: EnvironmentService,
) {}
async hideBanner() {