mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
Merge branch 'main' into autofill/pm-8027-inline-menu-appears-within-input-fields-that-do-not-relate-to-user-login
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
import { mock, mockReset, MockProxy } from "jest-mock-extended";
|
import { mock, mockReset, MockProxy } from "jest-mock-extended";
|
||||||
import { BehaviorSubject, of } from "rxjs";
|
import { BehaviorSubject, of } from "rxjs";
|
||||||
|
|
||||||
|
import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service";
|
||||||
|
import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status";
|
||||||
import { UserVerificationService } from "@bitwarden/common/auth/services/user-verification/user-verification.service";
|
import { UserVerificationService } from "@bitwarden/common/auth/services/user-verification/user-verification.service";
|
||||||
import { AutofillOverlayVisibility } from "@bitwarden/common/autofill/constants";
|
import { AutofillOverlayVisibility } from "@bitwarden/common/autofill/constants";
|
||||||
import { AutofillSettingsService } from "@bitwarden/common/autofill/services/autofill-settings.service";
|
import { AutofillSettingsService } from "@bitwarden/common/autofill/services/autofill-settings.service";
|
||||||
@@ -78,12 +80,17 @@ describe("AutofillService", () => {
|
|||||||
const userVerificationService = mock<UserVerificationService>();
|
const userVerificationService = mock<UserVerificationService>();
|
||||||
const billingAccountProfileStateService = mock<BillingAccountProfileStateService>();
|
const billingAccountProfileStateService = mock<BillingAccountProfileStateService>();
|
||||||
const platformUtilsService = mock<PlatformUtilsService>();
|
const platformUtilsService = mock<PlatformUtilsService>();
|
||||||
|
let activeAccountStatusMock$: BehaviorSubject<AuthenticationStatus>;
|
||||||
|
let authService: MockProxy<AuthService>;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
scriptInjectorService = new BrowserScriptInjectorService(platformUtilsService, logService);
|
scriptInjectorService = new BrowserScriptInjectorService(platformUtilsService, logService);
|
||||||
inlineMenuVisibilityMock$ = new BehaviorSubject(AutofillOverlayVisibility.OnFieldFocus);
|
inlineMenuVisibilityMock$ = new BehaviorSubject(AutofillOverlayVisibility.OnFieldFocus);
|
||||||
autofillSettingsService = mock<AutofillSettingsService>();
|
autofillSettingsService = mock<AutofillSettingsService>();
|
||||||
(autofillSettingsService as any).inlineMenuVisibility$ = inlineMenuVisibilityMock$;
|
(autofillSettingsService as any).inlineMenuVisibility$ = inlineMenuVisibilityMock$;
|
||||||
|
activeAccountStatusMock$ = new BehaviorSubject(AuthenticationStatus.Unlocked);
|
||||||
|
authService = mock<AuthService>();
|
||||||
|
authService.activeAccountStatus$ = activeAccountStatusMock$;
|
||||||
autofillService = new AutofillService(
|
autofillService = new AutofillService(
|
||||||
cipherService,
|
cipherService,
|
||||||
autofillSettingsService,
|
autofillSettingsService,
|
||||||
@@ -95,6 +102,7 @@ describe("AutofillService", () => {
|
|||||||
billingAccountProfileStateService,
|
billingAccountProfileStateService,
|
||||||
scriptInjectorService,
|
scriptInjectorService,
|
||||||
accountService,
|
accountService,
|
||||||
|
authService,
|
||||||
);
|
);
|
||||||
|
|
||||||
domainSettingsService = new DefaultDomainSettingsService(fakeStateProvider);
|
domainSettingsService = new DefaultDomainSettingsService(fakeStateProvider);
|
||||||
@@ -287,6 +295,18 @@ describe("AutofillService", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("skips injecting the autofiller script when the user's account is not unlocked", async () => {
|
||||||
|
activeAccountStatusMock$.next(AuthenticationStatus.Locked);
|
||||||
|
|
||||||
|
await autofillService.injectAutofillScripts(sender.tab, sender.frameId, true);
|
||||||
|
|
||||||
|
expect(BrowserApi.executeScriptInTab).not.toHaveBeenCalledWith(tabMock.id, {
|
||||||
|
file: "content/autofiller.js",
|
||||||
|
frameId: sender.frameId,
|
||||||
|
...defaultExecuteScriptOptions,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
it("will inject the bootstrap-autofill-overlay script if the user has the autofill overlay enabled", async () => {
|
it("will inject the bootstrap-autofill-overlay script if the user has the autofill overlay enabled", async () => {
|
||||||
await autofillService.injectAutofillScripts(sender.tab, sender.frameId);
|
await autofillService.injectAutofillScripts(sender.tab, sender.frameId);
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,9 @@ import { pairwise } from "rxjs/operators";
|
|||||||
|
|
||||||
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 { AuthService } from "@bitwarden/common/auth/abstractions/auth.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 { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status";
|
||||||
import { AutofillOverlayVisibility } from "@bitwarden/common/autofill/constants";
|
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";
|
||||||
@@ -61,6 +63,7 @@ export default class AutofillService implements AutofillServiceInterface {
|
|||||||
private billingAccountProfileStateService: BillingAccountProfileStateService,
|
private billingAccountProfileStateService: BillingAccountProfileStateService,
|
||||||
private scriptInjectorService: ScriptInjectorService,
|
private scriptInjectorService: ScriptInjectorService,
|
||||||
private accountService: AccountService,
|
private accountService: AccountService,
|
||||||
|
private authService: AuthService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -113,6 +116,8 @@ 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$);
|
||||||
|
const authStatus = await firstValueFrom(this.authService.activeAccountStatus$);
|
||||||
|
const accountIsUnlocked = authStatus === AuthenticationStatus.Unlocked;
|
||||||
let overlayVisibility: InlineMenuVisibilitySetting = AutofillOverlayVisibility.Off;
|
let overlayVisibility: InlineMenuVisibilitySetting = AutofillOverlayVisibility.Off;
|
||||||
let autoFillOnPageLoadIsEnabled = false;
|
let autoFillOnPageLoadIsEnabled = false;
|
||||||
|
|
||||||
@@ -126,7 +131,7 @@ export default class AutofillService implements AutofillServiceInterface {
|
|||||||
|
|
||||||
const injectedScripts = [mainAutofillScript];
|
const injectedScripts = [mainAutofillScript];
|
||||||
|
|
||||||
if (activeAccount) {
|
if (activeAccount && accountIsUnlocked) {
|
||||||
autoFillOnPageLoadIsEnabled = await this.getAutofillOnPageLoad();
|
autoFillOnPageLoadIsEnabled = await this.getAutofillOnPageLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -872,6 +872,7 @@ export default class MainBackground {
|
|||||||
this.billingAccountProfileStateService,
|
this.billingAccountProfileStateService,
|
||||||
this.scriptInjectorService,
|
this.scriptInjectorService,
|
||||||
this.accountService,
|
this.accountService,
|
||||||
|
this.authService,
|
||||||
);
|
);
|
||||||
this.auditService = new AuditService(this.cryptoFunctionService, this.apiService);
|
this.auditService = new AuditService(this.cryptoFunctionService, this.apiService);
|
||||||
|
|
||||||
@@ -1332,7 +1333,7 @@ export default class MainBackground {
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
//Needs to be checked before state is cleaned
|
//Needs to be checked before state is cleaned
|
||||||
const needStorageReseed = await this.needsStorageReseed(userId);
|
const needStorageReseed = await this.needsStorageReseed(userBeingLoggedOut);
|
||||||
|
|
||||||
await this.stateService.clean({ userId: userBeingLoggedOut });
|
await this.stateService.clean({ userId: userBeingLoggedOut });
|
||||||
await this.accountService.clean(userBeingLoggedOut);
|
await this.accountService.clean(userBeingLoggedOut);
|
||||||
|
|||||||
@@ -341,6 +341,7 @@ const safeProviders: SafeProvider[] = [
|
|||||||
BillingAccountProfileStateService,
|
BillingAccountProfileStateService,
|
||||||
ScriptInjectorService,
|
ScriptInjectorService,
|
||||||
AccountServiceAbstraction,
|
AccountServiceAbstraction,
|
||||||
|
AuthService,
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
safeProvider({
|
safeProvider({
|
||||||
|
|||||||
@@ -1,34 +1,51 @@
|
|||||||
<h1 class="tw-text-3xl !tw-text-alt2">The Password Manager Trusted by Millions</h1>
|
<h1 class="tw-text-3xl !tw-text-alt2">Start your 7-day free trial of Bitwarden</h1>
|
||||||
<div class="tw-pt-32">
|
<div class="tw-pt-20">
|
||||||
<h2 class="tw-text-2xl">Everything enterprises need out of a password manager:</h2>
|
<h2 class="tw-text-2xl">
|
||||||
|
Strengthen business security with the password manager designed for seamless administration and
|
||||||
|
employee usability.
|
||||||
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
<ul class="tw-mt-12 tw-flex tw-flex-col tw-gap-10 tw-text-2xl tw-text-main tw-list-none tw-pl-0">
|
<ul class="tw-mt-12 tw-flex tw-flex-col tw-gap-10 tw-text-2xl tw-text-main tw-list-none tw-pl-0">
|
||||||
<li><i class="bwi bwi-lg bwi-check-circle tw-mr-4"></i>Secure password sharing</li>
|
<li class="tw-flex tw-items-center">
|
||||||
<li>
|
<i class="bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none"></i
|
||||||
<i class="bwi bwi-lg bwi-check-circle tw-mr-4"></i>Easy, flexible SSO and SCIM integrations
|
><span class="tw-flex-auto"
|
||||||
|
>Instantly and securely share credentials with the groups and individuals who need them</span
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li class="tw-flex tw-items-center">
|
||||||
|
<i class="bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none"></i
|
||||||
|
><span class="tw-flex-auto"
|
||||||
|
>Strengthen employee security practices through centralized administrative control and
|
||||||
|
policies</span
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li class="tw-flex tw-items-center">
|
||||||
|
<i class="bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none"></i
|
||||||
|
><span class="tw-flex-auto"
|
||||||
|
>Streamline user onboarding and automate account provisioning with turnkey SSO and SCIM
|
||||||
|
integrations</span
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li class="tw-flex tw-items-center">
|
||||||
|
<i class="bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none"></i
|
||||||
|
><span class="tw-flex-auto"
|
||||||
|
>Migrate to Bitwarden in minutes with comprehensive import options</span
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li class="tw-flex tw-items-center">
|
||||||
|
<i class="bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none"></i
|
||||||
|
><span class="tw-flex-auto"
|
||||||
|
>Save time and increase productivity with autofill and instant device syncing</span
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li class="tw-flex tw-items-center">
|
||||||
|
<i class="bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none"></i
|
||||||
|
><span class="tw-flex-auto"
|
||||||
|
>Empower employees to secure their digital life at home, at work, and on the go by offering a
|
||||||
|
free Families plan to all Enterprise users</span
|
||||||
|
>
|
||||||
</li>
|
</li>
|
||||||
<li><i class="bwi bwi-lg bwi-check-circle tw-mr-4"></i>Free families plan for users</li>
|
|
||||||
<li><i class="bwi bwi-lg bwi-check-circle tw-mr-4"></i>Quick import and migration tools</li>
|
|
||||||
<li><i class="bwi bwi-lg bwi-check-circle tw-mr-4"></i>Simple, streamlined user experience</li>
|
|
||||||
<li><i class="bwi bwi-lg bwi-check-circle tw-mr-4"></i>Priority support and trainers</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
<div class="tw-mt-28 tw-flex tw-flex-col tw-items-center tw-gap-5">
|
<div class="tw-mt-28 tw-flex tw-flex-col tw-items-center tw-gap-5">
|
||||||
<app-logo-cnet-5-stars></app-logo-cnet-5-stars>
|
<app-logo-badges></app-logo-badges>
|
||||||
<div class="tw-flex tw-items-end tw-gap-8">
|
|
||||||
<review-logo
|
|
||||||
logoClass="tw-w-8"
|
|
||||||
logoSrc="../../images/register-layout/g2-logo.svg"
|
|
||||||
logoAlt="G2 Logo"
|
|
||||||
></review-logo>
|
|
||||||
<review-logo
|
|
||||||
logoClass="tw-w-28"
|
|
||||||
logoSrc="../../images/register-layout/capterra-logo.svg"
|
|
||||||
logoAlt="Capterra Logo"
|
|
||||||
></review-logo>
|
|
||||||
<review-logo
|
|
||||||
logoClass="tw-w-28"
|
|
||||||
logoSrc="../../images/register-layout/get-app-logo.svg"
|
|
||||||
logoAlt="Get App Logo"
|
|
||||||
></review-logo>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<figure>
|
||||||
|
<figcaption>
|
||||||
|
<cite>
|
||||||
|
<img
|
||||||
|
src="../../images/register-layout/vault-signup-badges.png"
|
||||||
|
class="tw-mx-auto tw-block tw-w-full"
|
||||||
|
alt="third party awards"
|
||||||
|
/>
|
||||||
|
</cite>
|
||||||
|
</figcaption>
|
||||||
|
</figure>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import { Component } from "@angular/core";
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: "app-logo-badges",
|
||||||
|
templateUrl: "logo-badges.component.html",
|
||||||
|
})
|
||||||
|
export class LogoBadgesComponent {}
|
||||||
@@ -1,21 +1,36 @@
|
|||||||
<h1 class="tw-text-4xl !tw-text-alt2">Start Your Teams Free Trial Now</h1>
|
<h1 class="tw-text-4xl !tw-text-alt2">Start your 7-day free trial for Teams</h1>
|
||||||
<div class="tw-flex tw-flex-col tw-items-center tw-justify-center tw-pt-16">
|
<div class="tw-flex tw-flex-col tw-items-center tw-justify-center tw-pt-16"></div>
|
||||||
<div class="tw-text-2xl">$4 per month / per user</div>
|
|
||||||
<div class="tw-text-xl">Annual subscription</div>
|
|
||||||
</div>
|
|
||||||
<div class="tw-pt-10">
|
<div class="tw-pt-10">
|
||||||
<h2 class="tw-text-2xl">
|
<h2 class="tw-text-2xl">
|
||||||
Millions of individuals, teams, and organizations worldwide trust Bitwarden for secure password
|
Strengthen business security with an easy-to-use password manager your team will love.
|
||||||
storage and sharing.
|
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
<ul class="tw-mt-12 tw-flex tw-flex-col tw-gap-10 tw-text-2xl tw-text-main">
|
<ul class="tw-mt-12 tw-flex tw-flex-col tw-gap-10 tw-text-2xl tw-text-main tw-list-none tw-pl-0">
|
||||||
<li>Collaborate and share securely</li>
|
<li class="tw-flex tw-items-center">
|
||||||
<li>Deploy and manage quickly and easily</li>
|
<i class="bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none"></i
|
||||||
<li>Access anywhere on any device</li>
|
><span class="tw-flex-auto"
|
||||||
<li>Create your account to get started</li>
|
>Instantly and securely share credentials with the groups and individuals who need them</span
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li class="tw-flex tw-items-center">
|
||||||
|
<i class="bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none"></i
|
||||||
|
><span class="tw-flex-auto"
|
||||||
|
>Migrate to Bitwarden in minutes with comprehensive import options</span
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li class="tw-flex tw-items-center">
|
||||||
|
<i class="bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none"></i
|
||||||
|
><span class="tw-flex-auto"
|
||||||
|
>Save time and increase productivity with autofill and instant device syncing</span
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li class="tw-flex tw-items-center">
|
||||||
|
<i class="bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none"></i
|
||||||
|
><span class="tw-flex-auto"
|
||||||
|
>Enhance security practices across your team with easy user management</span
|
||||||
|
>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="tw-mt-28 tw-flex tw-flex-col tw-items-center tw-gap-5">
|
<div class="tw-mt-28 tw-flex tw-flex-col tw-items-center tw-gap-5">
|
||||||
<app-logo-forbes></app-logo-forbes>
|
<app-logo-badges></app-logo-badges>
|
||||||
<app-logo-us-news></app-logo-us-news>
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import { DefaultContentComponent } from "./content/default-content.component";
|
|||||||
import { EnterpriseContentComponent } from "./content/enterprise-content.component";
|
import { EnterpriseContentComponent } from "./content/enterprise-content.component";
|
||||||
import { Enterprise1ContentComponent } from "./content/enterprise1-content.component";
|
import { Enterprise1ContentComponent } from "./content/enterprise1-content.component";
|
||||||
import { Enterprise2ContentComponent } from "./content/enterprise2-content.component";
|
import { Enterprise2ContentComponent } from "./content/enterprise2-content.component";
|
||||||
|
import { LogoBadgesComponent } from "./content/logo-badges.component";
|
||||||
import { LogoCnet5StarsComponent } from "./content/logo-cnet-5-stars.component";
|
import { LogoCnet5StarsComponent } from "./content/logo-cnet-5-stars.component";
|
||||||
import { LogoCnetComponent } from "./content/logo-cnet.component";
|
import { LogoCnetComponent } from "./content/logo-cnet.component";
|
||||||
import { LogoForbesComponent } from "./content/logo-forbes.component";
|
import { LogoForbesComponent } from "./content/logo-forbes.component";
|
||||||
@@ -69,6 +70,7 @@ import { VerticalStepperModule } from "./vertical-stepper/vertical-stepper.modul
|
|||||||
CnetTeamsContentComponent,
|
CnetTeamsContentComponent,
|
||||||
AbmEnterpriseContentComponent,
|
AbmEnterpriseContentComponent,
|
||||||
AbmTeamsContentComponent,
|
AbmTeamsContentComponent,
|
||||||
|
LogoBadgesComponent,
|
||||||
LogoCnet5StarsComponent,
|
LogoCnet5StarsComponent,
|
||||||
LogoCnetComponent,
|
LogoCnetComponent,
|
||||||
LogoForbesComponent,
|
LogoForbesComponent,
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<ng-container *ngIf="!firstLoaded && loading">
|
<ng-container *ngIf="!firstLoaded && loading">
|
||||||
<i
|
<i
|
||||||
class="bwi bwi-spinner bwi-spin text-muted"
|
class="bwi bwi-spinner bwi-spin tw-text-muted"
|
||||||
title="{{ 'loading' | i18n }}"
|
title="{{ 'loading' | i18n }}"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
></i>
|
></i>
|
||||||
<span class="sr-only">{{ "loading" | i18n }}</span>
|
<span class="tw-sr-only">{{ "loading" | i18n }}</span>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="sub">
|
<ng-container *ngIf="sub">
|
||||||
<bit-callout
|
<bit-callout
|
||||||
@@ -19,19 +19,17 @@
|
|||||||
title="{{ 'pendingCancellation' | i18n }}"
|
title="{{ 'pendingCancellation' | i18n }}"
|
||||||
*ngIf="subscriptionMarkedForCancel"
|
*ngIf="subscriptionMarkedForCancel"
|
||||||
>
|
>
|
||||||
<p>{{ "subscriptionPendingCanceled" | i18n }}</p>
|
<p bitTypography="body1">{{ "subscriptionPendingCanceled" | i18n }}</p>
|
||||||
<button
|
<button
|
||||||
bitButton
|
bitButton
|
||||||
type="button"
|
type="button"
|
||||||
buttonType="secondary"
|
buttonType="secondary"
|
||||||
#reinstateBtn
|
#reinstateBtn
|
||||||
class="btn-submit"
|
|
||||||
(click)="reinstate()"
|
(click)="reinstate()"
|
||||||
[appApiAction]="reinstatePromise"
|
[appApiAction]="reinstatePromise"
|
||||||
[disabled]="$any(reinstateBtn).loading"
|
[disabled]="$any(reinstateBtn).loading"
|
||||||
>
|
>
|
||||||
<i class="bwi bwi-spinner bwi-spin" title="{{ 'loading' | i18n }}" aria-hidden="true"></i>
|
{{ "reinstateSubscription" | i18n }}
|
||||||
<span>{{ "reinstateSubscription" | i18n }}</span>
|
|
||||||
</button>
|
</button>
|
||||||
</bit-callout>
|
</bit-callout>
|
||||||
<dl *ngIf="selfHosted">
|
<dl *ngIf="selfHosted">
|
||||||
@@ -39,12 +37,12 @@
|
|||||||
<dd *ngIf="sub.expiration">{{ sub.expiration | date: "mediumDate" }}</dd>
|
<dd *ngIf="sub.expiration">{{ sub.expiration | date: "mediumDate" }}</dd>
|
||||||
<dd *ngIf="!sub.expiration">{{ "neverExpires" | i18n }}</dd>
|
<dd *ngIf="!sub.expiration">{{ "neverExpires" | i18n }}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<div class="row" *ngIf="!selfHosted">
|
<div class="tw-flex tw-w-full" *ngIf="!selfHosted">
|
||||||
<div class="col-4">
|
<div class="tw-w-1/3">
|
||||||
<dl>
|
<dl>
|
||||||
<dt>{{ "status" | i18n }}</dt>
|
<dt>{{ "status" | i18n }}</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span class="text-capitalize">{{ (subscription && subscription.status) || "-" }}</span>
|
<span class="tw-capitalize">{{ (subscription && subscription.status) || "-" }}</span>
|
||||||
<span bitBadge variant="warning" *ngIf="subscriptionMarkedForCancel">{{
|
<span bitBadge variant="warning" *ngIf="subscriptionMarkedForCancel">{{
|
||||||
"pendingCancellation" | i18n
|
"pendingCancellation" | i18n
|
||||||
}}</span>
|
}}</span>
|
||||||
@@ -61,19 +59,19 @@
|
|||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8" *ngIf="subscription">
|
<div class="tw-w-2/3" *ngIf="subscription">
|
||||||
<strong class="d-block mb-1">{{ "details" | i18n }}</strong>
|
<strong class="!tw-block tw-mb-1">{{ "details" | i18n }}</strong>
|
||||||
<table class="table">
|
<bit-table>
|
||||||
<tbody>
|
<ng-template body>
|
||||||
<tr *ngFor="let i of subscription.items">
|
<tr *ngFor="let i of subscription.items">
|
||||||
<td>
|
<td bitCell>
|
||||||
{{ i.name }} {{ i.quantity > 1 ? "×" + i.quantity : "" }} @
|
{{ i.name }} {{ i.quantity > 1 ? "×" + i.quantity : "" }} @
|
||||||
{{ i.amount | currency: "$" }}
|
{{ i.amount | currency: "$" }}
|
||||||
</td>
|
</td>
|
||||||
<td>{{ i.quantity * i.amount | currency: "$" }} /{{ i.interval | i18n }}</td>
|
<td bitCell>{{ i.quantity * i.amount | currency: "$" }} /{{ i.interval | i18n }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</ng-template>
|
||||||
</table>
|
</bit-table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ng-container *ngIf="selfHosted">
|
<ng-container *ngIf="selfHosted">
|
||||||
@@ -91,27 +89,9 @@
|
|||||||
{{ "launchCloudSubscription" | i18n }}
|
{{ "launchCloudSubscription" | i18n }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="card mt-3" *ngIf="showUpdateLicense">
|
|
||||||
<div class="card-body">
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="close"
|
|
||||||
appA11yTitle="{{ 'cancel' | i18n }}"
|
|
||||||
(click)="closeUpdateLicense(false)"
|
|
||||||
>
|
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
|
||||||
<h3 class="card-body-header">{{ "updateLicense" | i18n }}</h3>
|
|
||||||
<app-update-license
|
|
||||||
(onUpdated)="closeUpdateLicense(true)"
|
|
||||||
(onCanceled)="closeUpdateLicense(false)"
|
|
||||||
>
|
|
||||||
</app-update-license>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="!selfHosted">
|
<ng-container *ngIf="!selfHosted">
|
||||||
<div class="d-flex">
|
<div class="tw-flex tw-justify-between">
|
||||||
<button
|
<button
|
||||||
bitButton
|
bitButton
|
||||||
type="button"
|
type="button"
|
||||||
@@ -126,43 +106,27 @@
|
|||||||
#cancelBtn
|
#cancelBtn
|
||||||
type="button"
|
type="button"
|
||||||
buttonType="danger"
|
buttonType="danger"
|
||||||
class="btn-submit tw-ml-auto"
|
class="tw-ml-auto"
|
||||||
(click)="cancelSubscription()"
|
(click)="cancelSubscription()"
|
||||||
[appApiAction]="cancelPromise"
|
[appApiAction]="cancelPromise"
|
||||||
[disabled]="$any(cancelBtn).loading"
|
[disabled]="$any(cancelBtn).loading"
|
||||||
*ngIf="subscription && !subscription.cancelled && !subscriptionMarkedForCancel"
|
*ngIf="subscription && !subscription.cancelled && !subscriptionMarkedForCancel"
|
||||||
>
|
>
|
||||||
<i class="bwi bwi-spinner bwi-spin" title="{{ 'loading' | i18n }}" aria-hidden="true"></i>
|
{{ "cancelSubscription" | i18n }}
|
||||||
<span>{{ "cancelSubscription" | i18n }}</span>
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<h2 class="spaced-header">{{ "storage" | i18n }}</h2>
|
<h3 bitTypography="h3" class="tw-mt-16">{{ "storage" | i18n }}</h3>
|
||||||
<p>{{ "subscriptionStorage" | i18n: sub.maxStorageGb || 0 : sub.storageName || "0 MB" }}</p>
|
<p bitTypography="body1">
|
||||||
<div class="progress">
|
{{ "subscriptionStorage" | i18n: sub.maxStorageGb || 0 : sub.storageName || "0 MB" }}
|
||||||
<div
|
</p>
|
||||||
class="progress-bar bg-success"
|
<bit-progress [barWidth]="storagePercentage" bgColor="success" size="default"></bit-progress>
|
||||||
role="progressbar"
|
|
||||||
[ngStyle]="{ width: storageProgressWidth + '%' }"
|
|
||||||
[attr.aria-valuenow]="storagePercentage"
|
|
||||||
aria-valuemin="0"
|
|
||||||
aria-valuemax="100"
|
|
||||||
>
|
|
||||||
{{ storagePercentage / 100 | percent }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<ng-container *ngIf="subscription && !subscription.cancelled && !subscriptionMarkedForCancel">
|
<ng-container *ngIf="subscription && !subscription.cancelled && !subscriptionMarkedForCancel">
|
||||||
<div class="mt-3">
|
<div class="tw-mt-3">
|
||||||
<div class="d-flex">
|
<div class="tw-flex tw-gap-1">
|
||||||
<button bitButton type="button" buttonType="secondary" [bitAction]="adjustStorage(true)">
|
<button bitButton type="button" buttonType="secondary" (click)="adjustStorage(true)">
|
||||||
{{ "addStorage" | i18n }}
|
{{ "addStorage" | i18n }}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button bitButton type="button" buttonType="secondary" (click)="adjustStorage(false)">
|
||||||
bitButton
|
|
||||||
type="button"
|
|
||||||
buttonType="secondary"
|
|
||||||
class="tw-ml-1"
|
|
||||||
[bitAction]="adjustStorage(false)"
|
|
||||||
>
|
|
||||||
{{ "removeStorage" | i18n }}
|
{{ "removeStorage" | i18n }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -20,6 +20,10 @@ import {
|
|||||||
OffboardingSurveyDialogResultType,
|
OffboardingSurveyDialogResultType,
|
||||||
openOffboardingSurvey,
|
openOffboardingSurvey,
|
||||||
} from "../shared/offboarding-survey.component";
|
} from "../shared/offboarding-survey.component";
|
||||||
|
import {
|
||||||
|
UpdateLicenseDialogComponent,
|
||||||
|
UpdateLicenseDialogResult,
|
||||||
|
} from "../shared/update-license-dialog.component";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: "user-subscription.component.html",
|
templateUrl: "user-subscription.component.html",
|
||||||
@@ -131,21 +135,16 @@ export class UserSubscriptionComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
updateLicense() {
|
updateLicense = async () => {
|
||||||
if (this.loading) {
|
if (this.loading) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.showUpdateLicense = true;
|
const dialogRef = UpdateLicenseDialogComponent.open(this.dialogService);
|
||||||
}
|
const result = await lastValueFrom(dialogRef.closed);
|
||||||
|
if (result === UpdateLicenseDialogResult.Updated) {
|
||||||
closeUpdateLicense(load: boolean) {
|
await this.load();
|
||||||
this.showUpdateLicense = false;
|
|
||||||
if (load) {
|
|
||||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
||||||
this.load();
|
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
adjustStorage = (add: boolean) => {
|
adjustStorage = (add: boolean) => {
|
||||||
return async () => {
|
return async () => {
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import { PaymentMethodComponent } from "./payment-method.component";
|
|||||||
import { PaymentComponent } from "./payment.component";
|
import { PaymentComponent } from "./payment.component";
|
||||||
import { SecretsManagerSubscribeComponent } from "./sm-subscribe.component";
|
import { SecretsManagerSubscribeComponent } from "./sm-subscribe.component";
|
||||||
import { TaxInfoComponent } from "./tax-info.component";
|
import { TaxInfoComponent } from "./tax-info.component";
|
||||||
|
import { UpdateLicenseDialogComponent } from "./update-license-dialog.component";
|
||||||
import { UpdateLicenseComponent } from "./update-license.component";
|
import { UpdateLicenseComponent } from "./update-license.component";
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
@@ -24,6 +25,7 @@ import { UpdateLicenseComponent } from "./update-license.component";
|
|||||||
PaymentMethodComponent,
|
PaymentMethodComponent,
|
||||||
SecretsManagerSubscribeComponent,
|
SecretsManagerSubscribeComponent,
|
||||||
UpdateLicenseComponent,
|
UpdateLicenseComponent,
|
||||||
|
UpdateLicenseDialogComponent,
|
||||||
OffboardingSurveyComponent,
|
OffboardingSurveyComponent,
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [
|
||||||
@@ -34,6 +36,7 @@ import { UpdateLicenseComponent } from "./update-license.component";
|
|||||||
BillingHistoryComponent,
|
BillingHistoryComponent,
|
||||||
SecretsManagerSubscribeComponent,
|
SecretsManagerSubscribeComponent,
|
||||||
UpdateLicenseComponent,
|
UpdateLicenseComponent,
|
||||||
|
UpdateLicenseDialogComponent,
|
||||||
OffboardingSurveyComponent,
|
OffboardingSurveyComponent,
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
<form [formGroup]="updateLicenseForm" [bitSubmit]="submitLicenseDialog">
|
||||||
|
<bit-dialog dialogSize="default" [title]="'updateLicense' | i18n">
|
||||||
|
<ng-container bitDialogContent>
|
||||||
|
<bit-form-field>
|
||||||
|
<bit-label>{{ "licenseFile" | i18n }}</bit-label>
|
||||||
|
<div>
|
||||||
|
<button bitButton type="button" buttonType="secondary" (click)="fileSelector.click()">
|
||||||
|
{{ "chooseFile" | i18n }}
|
||||||
|
</button>
|
||||||
|
{{ licenseFile ? licenseFile.name : ("noFileChosen" | i18n) }}
|
||||||
|
</div>
|
||||||
|
<input
|
||||||
|
bitInput
|
||||||
|
#fileSelector
|
||||||
|
type="file"
|
||||||
|
formControlName="file"
|
||||||
|
(change)="setSelectedFile($event)"
|
||||||
|
hidden
|
||||||
|
/>
|
||||||
|
<bit-hint>{{ "licenseFileDesc" | i18n: "bitwarden_premium_license.json" }}</bit-hint>
|
||||||
|
</bit-form-field>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container bitDialogFooter>
|
||||||
|
<button type="submit" buttonType="primary" bitButton bitFormButton>
|
||||||
|
{{ "submit" | i18n }}
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
bitButton
|
||||||
|
*ngIf="showCancel"
|
||||||
|
bitFormButton
|
||||||
|
buttonType="secondary"
|
||||||
|
type="button"
|
||||||
|
bitDialogClose
|
||||||
|
[bitAction]="cancel"
|
||||||
|
>
|
||||||
|
{{ "cancel" | i18n }}
|
||||||
|
</button>
|
||||||
|
</ng-container>
|
||||||
|
</bit-dialog>
|
||||||
|
</form>
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
import { Component } from "@angular/core";
|
||||||
|
import { FormBuilder } from "@angular/forms";
|
||||||
|
|
||||||
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
|
import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction";
|
||||||
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
|
import { UpdateLicenseComponent } from "./update-license.component";
|
||||||
|
|
||||||
|
export enum UpdateLicenseDialogResult {
|
||||||
|
Updated = "updated",
|
||||||
|
Cancelled = "cancelled",
|
||||||
|
}
|
||||||
|
@Component({
|
||||||
|
templateUrl: "update-license-dialog.component.html",
|
||||||
|
})
|
||||||
|
export class UpdateLicenseDialogComponent extends UpdateLicenseComponent {
|
||||||
|
constructor(
|
||||||
|
apiService: ApiService,
|
||||||
|
i18nService: I18nService,
|
||||||
|
platformUtilsService: PlatformUtilsService,
|
||||||
|
organizationApiService: OrganizationApiServiceAbstraction,
|
||||||
|
formBuilder: FormBuilder,
|
||||||
|
) {
|
||||||
|
super(apiService, i18nService, platformUtilsService, organizationApiService, formBuilder);
|
||||||
|
}
|
||||||
|
async submitLicense() {
|
||||||
|
await this.submit();
|
||||||
|
}
|
||||||
|
submitLicenseDialog = async () => {
|
||||||
|
await this.submitLicense();
|
||||||
|
};
|
||||||
|
static open(dialogService: DialogService) {
|
||||||
|
return dialogService.open<UpdateLicenseDialogResult>(UpdateLicenseDialogComponent);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -42,4 +42,9 @@ export class ExportComponent extends BaseExportComponent {
|
|||||||
organizationService,
|
organizationService,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected saved() {
|
||||||
|
super.saved();
|
||||||
|
this.platformUtilsService.showToast("success", null, this.i18nService.t("exportSuccess"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
[showPremiumFeatures]="organization?.useTotp"
|
[showPremiumFeatures]="organization?.useTotp"
|
||||||
[showBulkMove]="false"
|
[showBulkMove]="false"
|
||||||
[showBulkTrashOptions]="filter.type === 'trash'"
|
[showBulkTrashOptions]="filter.type === 'trash'"
|
||||||
[useEvents]="organization?.useEvents"
|
[useEvents]="organization?.canAccessEventLogs"
|
||||||
[showAdminActions]="true"
|
[showAdminActions]="true"
|
||||||
(onEvent)="onVaultItemsEvent($event)"
|
(onEvent)="onVaultItemsEvent($event)"
|
||||||
[showBulkEditCollectionAccess]="organization?.flexibleCollections"
|
[showBulkEditCollectionAccess]="organization?.flexibleCollections"
|
||||||
|
|||||||
BIN
apps/web/src/images/register-layout/vault-signup-badges.png
Normal file
BIN
apps/web/src/images/register-layout/vault-signup-badges.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
@@ -2102,7 +2102,7 @@
|
|||||||
"message": "Bitwarden Families plan."
|
"message": "Bitwarden Families plan."
|
||||||
},
|
},
|
||||||
"addons": {
|
"addons": {
|
||||||
"message": "Addons"
|
"message": "Add-ons"
|
||||||
},
|
},
|
||||||
"premiumAccess": {
|
"premiumAccess": {
|
||||||
"message": "Premium access"
|
"message": "Premium access"
|
||||||
|
|||||||
Reference in New Issue
Block a user