mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
This reverts commit 5a1940f3f4.
This commit is contained in:
@@ -2,15 +2,13 @@ import { Component, EventEmitter, Input, Output } from "@angular/core";
|
||||
|
||||
import { Utils } from "@bitwarden/common/misc/utils";
|
||||
|
||||
import { WebI18nKey } from "../core/web-i18n.service.implementation";
|
||||
|
||||
@Component({
|
||||
selector: "app-nested-checkbox",
|
||||
templateUrl: "nested-checkbox.component.html",
|
||||
})
|
||||
export class NestedCheckboxComponent {
|
||||
@Input() parentId: WebI18nKey;
|
||||
@Input() checkboxes: { id: WebI18nKey; get: () => boolean; set: (v: boolean) => void }[];
|
||||
@Input() parentId: string;
|
||||
@Input() checkboxes: { id: string; get: () => boolean; set: (v: boolean) => void }[];
|
||||
@Output() onSavedUser = new EventEmitter();
|
||||
@Output() onDeletedUser = new EventEmitter();
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
import { JslibServicesModule } from "@bitwarden/angular/services/jslib-services.module";
|
||||
import { ModalService as ModalServiceAbstraction } from "@bitwarden/angular/services/modal.service";
|
||||
import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service";
|
||||
import { I18nService } from "@bitwarden/common/abstractions/i18n.service";
|
||||
import { I18nService as I18nServiceAbstraction } from "@bitwarden/common/abstractions/i18n.service";
|
||||
import { LoginService as LoginServiceAbstraction } from "@bitwarden/common/abstractions/login.service";
|
||||
import { MessagingService as MessagingServiceAbstraction } from "@bitwarden/common/abstractions/messaging.service";
|
||||
import { PasswordRepromptService as PasswordRepromptServiceAbstraction } from "@bitwarden/common/abstractions/passwordReprompt.service";
|
||||
@@ -27,6 +27,7 @@ import { MemoryStorageService } from "@bitwarden/common/services/memoryStorage.s
|
||||
import { BroadcasterMessagingService } from "./broadcaster-messaging.service";
|
||||
import { EventService } from "./event.service";
|
||||
import { HtmlStorageService } from "./html-storage.service";
|
||||
import { I18nService } from "./i18n.service";
|
||||
import { InitService } from "./init.service";
|
||||
import { ModalService } from "./modal.service";
|
||||
import { PasswordRepromptService } from "./password-reprompt.service";
|
||||
@@ -35,7 +36,6 @@ import { RouterService } from "./router.service";
|
||||
import { Account, GlobalState, StateService } from "./state";
|
||||
import { StateMigrationService } from "./state-migration.service";
|
||||
import { WebFileDownloadService } from "./web-file-download.service";
|
||||
import { WebI18nServiceImplementation } from "./web-i18n.service.implementation";
|
||||
import { WebPlatformUtilsService } from "./web-platform-utils.service";
|
||||
|
||||
@NgModule({
|
||||
@@ -46,7 +46,6 @@ import { WebPlatformUtilsService } from "./web-platform-utils.service";
|
||||
RouterService,
|
||||
EventService,
|
||||
PolicyListService,
|
||||
WebI18nServiceImplementation,
|
||||
{
|
||||
provide: APP_INITIALIZER,
|
||||
useFactory: (initService: InitService) => initService.init(),
|
||||
@@ -62,8 +61,8 @@ import { WebPlatformUtilsService } from "./web-platform-utils.service";
|
||||
useValue: false,
|
||||
},
|
||||
{
|
||||
provide: I18nService,
|
||||
useClass: WebI18nServiceImplementation,
|
||||
provide: I18nServiceAbstraction,
|
||||
useClass: I18nService,
|
||||
deps: [SYSTEM_LANGUAGE, LOCALES_DIRECTORY],
|
||||
},
|
||||
{ provide: AbstractStorageService, useClass: HtmlStorageService },
|
||||
|
||||
@@ -1,13 +1,6 @@
|
||||
import { Injectable } from "@angular/core";
|
||||
import { I18nService as BaseI18nService } from "@bitwarden/common/services/i18n.service";
|
||||
|
||||
import { I18nServiceImplementation } from "@bitwarden/common/services/i18n.service.implementation";
|
||||
|
||||
import type eng from "../../locales/en/messages.json";
|
||||
|
||||
export type WebI18nKey = keyof typeof eng;
|
||||
|
||||
@Injectable()
|
||||
export class WebI18nServiceImplementation extends I18nServiceImplementation<WebI18nKey> {
|
||||
export class I18nService extends BaseI18nService {
|
||||
constructor(systemLanguage: string, localesDirectory: string) {
|
||||
super(systemLanguage || "en-US", localesDirectory, async (formattedLocale: string) => {
|
||||
const filePath =
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
Urls,
|
||||
} from "@bitwarden/common/abstractions/environment.service";
|
||||
import { EventUploadService as EventUploadServiceAbstraction } from "@bitwarden/common/abstractions/event/event-upload.service";
|
||||
import { I18nService } from "@bitwarden/common/abstractions/i18n.service";
|
||||
import { I18nService as I18nServiceAbstraction } from "@bitwarden/common/abstractions/i18n.service";
|
||||
import { NotificationsService as NotificationsServiceAbstraction } from "@bitwarden/common/abstractions/notifications.service";
|
||||
import { StateService as StateServiceAbstraction } from "@bitwarden/common/abstractions/state.service";
|
||||
import { TwoFactorService as TwoFactorServiceAbstraction } from "@bitwarden/common/abstractions/twoFactor.service";
|
||||
@@ -18,7 +18,7 @@ import { ContainerService } from "@bitwarden/common/services/container.service";
|
||||
import { EventUploadService } from "@bitwarden/common/services/event/event-upload.service";
|
||||
import { VaultTimeoutService as VaultTimeoutService } from "@bitwarden/common/services/vaultTimeout/vaultTimeout.service";
|
||||
|
||||
import { WebI18nServiceImplementation } from "./web-i18n.service.implementation";
|
||||
import { I18nService } from "./i18n.service";
|
||||
|
||||
@Injectable()
|
||||
export class InitService {
|
||||
@@ -27,7 +27,7 @@ export class InitService {
|
||||
private environmentService: EnvironmentServiceAbstraction,
|
||||
private notificationsService: NotificationsServiceAbstraction,
|
||||
private vaultTimeoutService: VaultTimeoutServiceAbstraction,
|
||||
private i18nService: I18nService,
|
||||
private i18nService: I18nServiceAbstraction,
|
||||
private eventUploadService: EventUploadServiceAbstraction,
|
||||
private twoFactorService: TwoFactorServiceAbstraction,
|
||||
private stateService: StateServiceAbstraction,
|
||||
@@ -47,7 +47,7 @@ export class InitService {
|
||||
setTimeout(() => this.notificationsService.init(), 3000);
|
||||
(this.vaultTimeoutService as VaultTimeoutService).init(true);
|
||||
const locale = await this.stateService.getLocale();
|
||||
await (this.i18nService as WebI18nServiceImplementation).init(locale);
|
||||
await (this.i18nService as I18nService).init(locale);
|
||||
(this.eventUploadService as EventUploadService).init(true);
|
||||
this.twoFactorService.init();
|
||||
const htmlEl = this.win.document.documentElement;
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
import { Pipe } from "@angular/core";
|
||||
|
||||
import { I18nPipe } from "@bitwarden/angular/pipes/i18n.pipe";
|
||||
|
||||
import { WebI18nKey } from "./web-i18n.service.implementation";
|
||||
|
||||
@Pipe({
|
||||
name: "i18n",
|
||||
})
|
||||
export class WebI18nPipe extends I18nPipe<WebI18nKey> {}
|
||||
@@ -15,7 +15,7 @@ export class AdjustSubscription {
|
||||
@Input() maxAutoscaleSeats: number;
|
||||
@Input() currentSeatCount: number;
|
||||
@Input() seatPrice = 0;
|
||||
@Input() interval: "month" | "year" = "year";
|
||||
@Input() interval = "year";
|
||||
@Output() onAdjusted = new EventEmitter();
|
||||
|
||||
formPromise: Promise<void>;
|
||||
|
||||
@@ -6,8 +6,6 @@ import { FormSelectionList } from "@bitwarden/angular/utils/form-selection-list"
|
||||
import { I18nService } from "@bitwarden/common/abstractions/i18n.service";
|
||||
import { SelectItemView } from "@bitwarden/components/src/multi-select/models/select-item-view";
|
||||
|
||||
import { WebI18nKey } from "../../../core/web-i18n.service.implementation";
|
||||
|
||||
import {
|
||||
AccessItemType,
|
||||
AccessItemValue,
|
||||
@@ -85,7 +83,7 @@ export class AccessSelectorComponent implements ControlValueAccessor, OnInit, On
|
||||
});
|
||||
|
||||
protected itemType = AccessItemType;
|
||||
protected permissionList: { perm: CollectionPermission; labelId: WebI18nKey }[] = [
|
||||
protected permissionList = [
|
||||
{ perm: CollectionPermission.View, labelId: "canView" },
|
||||
{ perm: CollectionPermission.ViewExceptPass, labelId: "canViewExceptPass" },
|
||||
{ perm: CollectionPermission.Edit, labelId: "canEdit" },
|
||||
|
||||
@@ -14,8 +14,6 @@ import {
|
||||
} from "@bitwarden/common/abstractions/organization/organization.service.abstraction";
|
||||
import { Organization } from "@bitwarden/common/models/domain/organization";
|
||||
|
||||
import { WebI18nKey } from "../../core/web-i18n.service.implementation";
|
||||
|
||||
@Component({
|
||||
selector: "app-organization-layout",
|
||||
templateUrl: "organization-layout.component.html",
|
||||
@@ -71,7 +69,7 @@ export class OrganizationLayoutComponent implements OnInit, OnDestroy {
|
||||
return canAccessBillingTab(organization);
|
||||
}
|
||||
|
||||
getReportTabLabel(organization: Organization): WebI18nKey {
|
||||
getReportTabLabel(organization: Organization): string {
|
||||
return organization.useEvents ? "reporting" : "reports";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,10 +20,6 @@ import { SelectionReadOnlyRequest } from "@bitwarden/common/models/request/selec
|
||||
import { CollectionDetailsResponse } from "@bitwarden/common/models/response/collection.response";
|
||||
import { CollectionView } from "@bitwarden/common/models/view/collection.view";
|
||||
|
||||
import { WebI18nKey } from "../../core/web-i18n.service.implementation";
|
||||
|
||||
type NestedCheckbox = { id: WebI18nKey; get: () => boolean; set: (v: boolean) => boolean };
|
||||
|
||||
@Component({
|
||||
selector: "app-user-add-edit",
|
||||
templateUrl: "user-add-edit.component.html",
|
||||
@@ -53,7 +49,7 @@ export class UserAddEditComponent implements OnInit {
|
||||
organizationUserType = OrganizationUserType;
|
||||
canUseCustomPermissions: boolean;
|
||||
|
||||
manageAllCollectionsCheckboxes: NestedCheckbox[] = [
|
||||
manageAllCollectionsCheckboxes = [
|
||||
{
|
||||
id: "createNewCollections",
|
||||
get: () => this.permissions.createNewCollections,
|
||||
@@ -71,7 +67,7 @@ export class UserAddEditComponent implements OnInit {
|
||||
},
|
||||
];
|
||||
|
||||
manageAssignedCollectionsCheckboxes: NestedCheckbox[] = [
|
||||
manageAssignedCollectionsCheckboxes = [
|
||||
{
|
||||
id: "editAssignedCollections",
|
||||
get: () => this.permissions.editAssignedCollections,
|
||||
|
||||
@@ -6,11 +6,9 @@ import { Organization } from "@bitwarden/common/models/domain/organization";
|
||||
import { PolicyRequest } from "@bitwarden/common/models/request/policy.request";
|
||||
import { PolicyResponse } from "@bitwarden/common/models/response/policy.response";
|
||||
|
||||
import { WebI18nKey } from "../../core/web-i18n.service.implementation";
|
||||
|
||||
export abstract class BasePolicy {
|
||||
abstract name: WebI18nKey;
|
||||
abstract description: WebI18nKey;
|
||||
abstract name: string;
|
||||
abstract description: string;
|
||||
abstract type: PolicyType;
|
||||
abstract component: any;
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ import { PolicyType } from "@bitwarden/common/enums/policyType";
|
||||
import { BasePolicy, BasePolicyComponent } from "./base-policy.component";
|
||||
|
||||
export class DisableSendPolicy extends BasePolicy {
|
||||
readonly name = "disableSend";
|
||||
readonly description = "disableSendPolicyDesc";
|
||||
name = "disableSend";
|
||||
description = "disableSendPolicyDesc";
|
||||
type = PolicyType.DisableSend;
|
||||
component = DisableSendPolicyComponent;
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@ import { PolicyType } from "@bitwarden/common/enums/policyType";
|
||||
import { BasePolicy, BasePolicyComponent } from "./base-policy.component";
|
||||
|
||||
export class MasterPasswordPolicy extends BasePolicy {
|
||||
readonly name = "masterPassPolicyTitle";
|
||||
readonly description = "masterPassPolicyDesc";
|
||||
name = "masterPassPolicyTitle";
|
||||
description = "masterPassPolicyDesc";
|
||||
type = PolicyType.MasterPassword;
|
||||
component = MasterPasswordPolicyComponent;
|
||||
}
|
||||
|
||||
@@ -7,8 +7,8 @@ import { PolicyType } from "@bitwarden/common/enums/policyType";
|
||||
import { BasePolicy, BasePolicyComponent } from "./base-policy.component";
|
||||
|
||||
export class PasswordGeneratorPolicy extends BasePolicy {
|
||||
readonly name = "passwordGenerator";
|
||||
readonly description = "passwordGeneratorPolicyDesc";
|
||||
name = "passwordGenerator";
|
||||
description = "passwordGeneratorPolicyDesc";
|
||||
type = PolicyType.PasswordGenerator;
|
||||
component = PasswordGeneratorPolicyComponent;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@ import { PolicyType } from "@bitwarden/common/enums/policyType";
|
||||
import { BasePolicy, BasePolicyComponent } from "./base-policy.component";
|
||||
|
||||
export class PersonalOwnershipPolicy extends BasePolicy {
|
||||
readonly name = "personalOwnership";
|
||||
readonly description = "personalOwnershipPolicyDesc";
|
||||
name = "personalOwnership";
|
||||
description = "personalOwnershipPolicyDesc";
|
||||
type = PolicyType.PersonalOwnership;
|
||||
component = PersonalOwnershipPolicyComponent;
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@ import { PolicyRequest } from "@bitwarden/common/models/request/policy.request";
|
||||
import { BasePolicy, BasePolicyComponent } from "./base-policy.component";
|
||||
|
||||
export class RequireSsoPolicy extends BasePolicy {
|
||||
readonly name = "requireSso";
|
||||
readonly description = "requireSsoPolicyDesc";
|
||||
name = "requireSso";
|
||||
description = "requireSsoPolicyDesc";
|
||||
type = PolicyType.RequireSso;
|
||||
component = RequireSsoPolicyComponent;
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ import { Organization } from "@bitwarden/common/models/domain/organization";
|
||||
import { BasePolicy, BasePolicyComponent } from "./base-policy.component";
|
||||
|
||||
export class ResetPasswordPolicy extends BasePolicy {
|
||||
readonly name = "resetPasswordPolicy";
|
||||
readonly description = "resetPasswordPolicyDescription";
|
||||
name = "resetPasswordPolicy";
|
||||
description = "resetPasswordPolicyDescription";
|
||||
type = PolicyType.ResetPassword;
|
||||
component = ResetPasswordPolicyComponent;
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ import { PolicyType } from "@bitwarden/common/enums/policyType";
|
||||
import { BasePolicy, BasePolicyComponent } from "./base-policy.component";
|
||||
|
||||
export class SendOptionsPolicy extends BasePolicy {
|
||||
readonly name = "sendOptions";
|
||||
readonly description = "sendOptionsPolicyDesc";
|
||||
name = "sendOptions";
|
||||
description = "sendOptionsPolicyDesc";
|
||||
type = PolicyType.SendOptions;
|
||||
component = SendOptionsPolicyComponent;
|
||||
}
|
||||
|
||||
@@ -7,8 +7,8 @@ import { PolicyRequest } from "@bitwarden/common/models/request/policy.request";
|
||||
import { BasePolicy, BasePolicyComponent } from "./base-policy.component";
|
||||
|
||||
export class SingleOrgPolicy extends BasePolicy {
|
||||
readonly name = "singleOrg";
|
||||
readonly description = "singleOrgDesc";
|
||||
name = "singleOrg";
|
||||
description = "singleOrgDesc";
|
||||
type = PolicyType.SingleOrg;
|
||||
component = SingleOrgPolicyComponent;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@ import { PolicyType } from "@bitwarden/common/enums/policyType";
|
||||
import { BasePolicy, BasePolicyComponent } from "./base-policy.component";
|
||||
|
||||
export class TwoFactorAuthenticationPolicy extends BasePolicy {
|
||||
readonly name = "twoStepLoginPolicyTitle";
|
||||
readonly description = "twoStepLoginPolicyDesc";
|
||||
name = "twoStepLoginPolicyTitle";
|
||||
description = "twoStepLoginPolicyDesc";
|
||||
type = PolicyType.TwoFactorAuthentication;
|
||||
component = TwoFactorAuthenticationPolicyComponent;
|
||||
}
|
||||
|
||||
@@ -12,17 +12,15 @@ import { Utils } from "@bitwarden/common/misc/utils";
|
||||
import { CipherView } from "@bitwarden/common/models/view/cipher.view";
|
||||
import { Verification } from "@bitwarden/common/types/verification";
|
||||
|
||||
import { WebI18nKey } from "../../core/web-i18n.service.implementation";
|
||||
|
||||
class CountBasedLocalizationKey {
|
||||
singular: WebI18nKey;
|
||||
plural: WebI18nKey;
|
||||
singular: string;
|
||||
plural: string;
|
||||
|
||||
getKey(count: number) {
|
||||
return count == 1 ? this.singular : this.plural;
|
||||
}
|
||||
|
||||
constructor(singular: WebI18nKey, plural: WebI18nKey) {
|
||||
constructor(singular: string, plural: string) {
|
||||
this.singular = singular;
|
||||
this.plural = plural;
|
||||
}
|
||||
@@ -30,7 +28,7 @@ class CountBasedLocalizationKey {
|
||||
|
||||
class OrganizationContentSummaryItem {
|
||||
count: number;
|
||||
get localizationKey() {
|
||||
get localizationKey(): string {
|
||||
return this.localizationKeyOptions.getKey(this.count);
|
||||
}
|
||||
private localizationKeyOptions: CountBasedLocalizationKey;
|
||||
@@ -128,9 +126,6 @@ export class DeleteOrganizationComponent implements OnInit {
|
||||
}
|
||||
|
||||
private getOrganizationItemLocalizationKeysByType(type: string): CountBasedLocalizationKey {
|
||||
return new CountBasedLocalizationKey(
|
||||
`type${type}` as WebI18nKey,
|
||||
`type${type}Plural` as WebI18nKey
|
||||
);
|
||||
return new CountBasedLocalizationKey(`type${type}`, `type${type}Plural`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,8 +10,6 @@ import { CipherType } from "@bitwarden/common/enums/cipherType";
|
||||
import { CipherView } from "@bitwarden/common/models/view/cipher.view";
|
||||
import { BadgeTypes } from "@bitwarden/components";
|
||||
|
||||
import { WebI18nKey } from "../../core/web-i18n.service.implementation";
|
||||
|
||||
import { CipherReportComponent } from "./cipher-report.component";
|
||||
|
||||
@Component({
|
||||
@@ -19,7 +17,7 @@ import { CipherReportComponent } from "./cipher-report.component";
|
||||
templateUrl: "weak-passwords-report.component.html",
|
||||
})
|
||||
export class WeakPasswordsReportComponent extends CipherReportComponent implements OnInit {
|
||||
passwordStrengthMap = new Map<string, [WebI18nKey, BadgeTypes]>();
|
||||
passwordStrengthMap = new Map<string, [string, BadgeTypes]>();
|
||||
|
||||
private passwordStrengthCache = new Map<string, number>();
|
||||
|
||||
@@ -113,7 +111,7 @@ export class WeakPasswordsReportComponent extends CipherReportComponent implemen
|
||||
return true;
|
||||
}
|
||||
|
||||
private scoreKey(score: number): [WebI18nKey, BadgeTypes] {
|
||||
private scoreKey(score: number): [string, BadgeTypes] {
|
||||
switch (score) {
|
||||
case 4:
|
||||
return ["strong", "success"];
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import { Icon } from "@bitwarden/components";
|
||||
|
||||
import { WebI18nKey } from "../../../core/web-i18n.service.implementation";
|
||||
|
||||
import { ReportVariant } from "./report-variant";
|
||||
|
||||
export type ReportEntry = {
|
||||
title: WebI18nKey;
|
||||
description: WebI18nKey;
|
||||
title: string;
|
||||
description: string;
|
||||
route: string;
|
||||
icon: Icon;
|
||||
variant: ReportVariant;
|
||||
|
||||
@@ -19,7 +19,7 @@ export class AdjustStorageComponent {
|
||||
@Input() storageGbPrice = 0;
|
||||
@Input() add = true;
|
||||
@Input() organizationId: string;
|
||||
@Input() interval: "month" | "year" = "year";
|
||||
@Input() interval = "year";
|
||||
@Output() onAdjusted = new EventEmitter<number>();
|
||||
@Output() onCanceled = new EventEmitter();
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@ import { SecretVerificationRequest } from "@bitwarden/common/models/request/secr
|
||||
import { ApiKeyResponse } from "@bitwarden/common/models/response/api-key.response";
|
||||
import { Verification } from "@bitwarden/common/types/verification";
|
||||
|
||||
import { WebI18nKey } from "../core/web-i18n.service.implementation";
|
||||
|
||||
@Component({
|
||||
selector: "app-api-key",
|
||||
templateUrl: "api-key.component.html",
|
||||
@@ -19,9 +17,9 @@ export class ApiKeyComponent {
|
||||
entityId: string;
|
||||
scope: string;
|
||||
grantType: string;
|
||||
apiKeyTitle: WebI18nKey;
|
||||
apiKeyWarning: WebI18nKey;
|
||||
apiKeyDescription: WebI18nKey;
|
||||
apiKeyTitle: string;
|
||||
apiKeyWarning: string;
|
||||
apiKeyDescription: string;
|
||||
|
||||
masterPassword: Verification;
|
||||
formPromise: Promise<ApiKeyResponse>;
|
||||
|
||||
@@ -53,7 +53,10 @@
|
||||
></i>
|
||||
{{ t.details }}
|
||||
</td>
|
||||
<td [ngClass]="{ 'text-strike': t.refunded }" [title]="t.refunded ? ('refunded' | i18n) : ''">
|
||||
<td
|
||||
[ngClass]="{ 'text-strike': t.refunded }"
|
||||
title="{{ (t.refunded ? 'refunded' : '') | i18n }}"
|
||||
>
|
||||
{{ t.amount | currency: "$" }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -27,7 +27,6 @@ import {
|
||||
|
||||
// Register the locales for the application
|
||||
import "./locales";
|
||||
import { WebI18nPipe } from "../core/web-i18n.pipe";
|
||||
|
||||
/**
|
||||
* This NgModule should contain the most basic shared directives, pipes, and components. They
|
||||
@@ -67,7 +66,6 @@ import { WebI18nPipe } from "../core/web-i18n.pipe";
|
||||
|
||||
// Web specific
|
||||
],
|
||||
declarations: [WebI18nPipe],
|
||||
exports: [
|
||||
CommonModule,
|
||||
DragDropModule,
|
||||
@@ -97,7 +95,6 @@ import { WebI18nPipe } from "../core/web-i18n.pipe";
|
||||
ColorPasswordModule,
|
||||
|
||||
// Web specific
|
||||
WebI18nPipe,
|
||||
],
|
||||
providers: [DatePipe],
|
||||
bootstrap: [],
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { APP_INITIALIZER, NgModule } from "@angular/core";
|
||||
|
||||
import { I18nService } from "@bitwarden/common/abstractions/i18n.service";
|
||||
import { I18nServiceImplementation } from "@bitwarden/common/services/i18n.service.implementation";
|
||||
import { I18nService as BaseI18nService } from "@bitwarden/common/services/i18n.service";
|
||||
|
||||
import eng from "../../locales/en/messages.json";
|
||||
|
||||
class PreloadedEnglishI18nService extends I18nServiceImplementation {
|
||||
class PreloadedEnglishI18nService extends BaseI18nService {
|
||||
constructor() {
|
||||
super("en", "", () => {
|
||||
return Promise.resolve(eng);
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import { VaultFilter } from "@bitwarden/angular/vault/vault-filter/models/vault-filter.model";
|
||||
|
||||
import { WebI18nKey } from "../../core/web-i18n.service.implementation";
|
||||
|
||||
export class VaultService {
|
||||
calculateSearchBarLocalizationString(vaultFilter: VaultFilter): WebI18nKey {
|
||||
calculateSearchBarLocalizationString(vaultFilter: VaultFilter): string {
|
||||
if (vaultFilter.status === "favorites") {
|
||||
return "searchFavorites";
|
||||
}
|
||||
|
||||
@@ -2,8 +2,6 @@ import { Component, EventEmitter, Output } from "@angular/core";
|
||||
|
||||
import { VaultFilterComponent as BaseVaultFilterComponent } from "@bitwarden/angular/vault/vault-filter/components/vault-filter.component";
|
||||
|
||||
import { WebI18nKey } from "../../core/web-i18n.service.implementation";
|
||||
|
||||
import { VaultFilterService } from "./shared/vault-filter.service";
|
||||
|
||||
@Component({
|
||||
@@ -14,7 +12,7 @@ import { VaultFilterService } from "./shared/vault-filter.service";
|
||||
export class VaultFilterComponent extends BaseVaultFilterComponent {
|
||||
@Output() onSearchTextChanged = new EventEmitter<string>();
|
||||
|
||||
searchPlaceholder: WebI18nKey;
|
||||
searchPlaceholder: string;
|
||||
searchText = "";
|
||||
|
||||
constructor(protected vaultFilterService: VaultFilterService) {
|
||||
|
||||
@@ -5789,18 +5789,6 @@
|
||||
"switchProducts": {
|
||||
"message": "Switch Products"
|
||||
},
|
||||
"searchMyVault": {
|
||||
"message": "Search My Vault"
|
||||
},
|
||||
"searchOrganization": {
|
||||
"message": "Search organization"
|
||||
},
|
||||
"noClientsInList": {
|
||||
"message": "No clients in list"
|
||||
},
|
||||
"copy": {
|
||||
"messages": "Copy"
|
||||
},
|
||||
"freeOrgInvLimitReachedManageBilling": {
|
||||
"message": "Free organizations may have up to $SEATCOUNT$ members. Upgrade to a paid plan to invite more members.",
|
||||
"placeholders": {
|
||||
|
||||
Reference in New Issue
Block a user