mirror of
https://github.com/bitwarden/browser.git
synced 2024-06-26 10:35:48 +02:00
Add Free Bitwarden Families link
Include speedbump explaining Free Bitwarden Families
This commit is contained in:
parent
6a4cc10560
commit
837ad2097b
|
@ -231,6 +231,12 @@
|
||||||
"continueToPasswordlessDotDevPageDesc": {
|
"continueToPasswordlessDotDevPageDesc": {
|
||||||
"message": "Create smooth and secure login experiences free from traditional passwords with Passwordless.dev. Learn more on the bitwarden.com website."
|
"message": "Create smooth and secure login experiences free from traditional passwords with Passwordless.dev. Learn more on the bitwarden.com website."
|
||||||
},
|
},
|
||||||
|
"freeBitwardenFamilies": {
|
||||||
|
"message": "Free Bitwarden Families"
|
||||||
|
},
|
||||||
|
"freeBitwardenFamiliesPageDesc": {
|
||||||
|
"message": "You are eligible for Free Bitwarden Families. Redeem this offer today in the web app."
|
||||||
|
},
|
||||||
"version": {
|
"version": {
|
||||||
"message": "Version"
|
"message": "Version"
|
||||||
},
|
},
|
||||||
|
|
|
@ -25,6 +25,15 @@
|
||||||
<i class="bwi bwi-angle-right bwi-lg row-sub-icon" aria-hidden="true"></i>
|
<i class="bwi bwi-angle-right bwi-lg row-sub-icon" aria-hidden="true"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="box-content-row box-content-row-flex text-default"
|
||||||
|
appStopClick
|
||||||
|
(click)="openFreeBitwardenFamiliesPage()"
|
||||||
|
>
|
||||||
|
<div class="row-main">{{ "freeBitwardenFamilies" | i18n }}</div>
|
||||||
|
<i class="bwi bwi-external-link bwi-lg row-sub-icon" aria-hidden="true"></i>
|
||||||
|
</button>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="box-content-row box-content-row-flex text-default"
|
class="box-content-row box-content-row-flex text-default"
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
import { CommonModule } from "@angular/common";
|
import { CommonModule } from "@angular/common";
|
||||||
import { Component } from "@angular/core";
|
import { Component } from "@angular/core";
|
||||||
import { RouterModule } from "@angular/router";
|
import { RouterModule } from "@angular/router";
|
||||||
import { Observable } from "rxjs";
|
import { Observable, firstValueFrom } from "rxjs";
|
||||||
|
|
||||||
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||||
import { BillingAccountProfileStateService } from "@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service";
|
import { BillingAccountProfileStateService } from "@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service";
|
||||||
|
import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service";
|
||||||
import { DialogService } from "@bitwarden/components";
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { BrowserApi } from "../../../../platform/browser/browser-api";
|
import { BrowserApi } from "../../../../platform/browser/browser-api";
|
||||||
|
@ -20,11 +21,26 @@ export class MoreFromBitwardenPageComponent {
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private dialogService: DialogService,
|
private dialogService: DialogService,
|
||||||
billingAccountProfileStateService: BillingAccountProfileStateService,
|
private billingAccountProfileStateService: BillingAccountProfileStateService,
|
||||||
|
private environmentService: EnvironmentService,
|
||||||
) {
|
) {
|
||||||
this.canAccessPremium$ = billingAccountProfileStateService.hasPremiumFromAnySource$;
|
this.canAccessPremium$ = billingAccountProfileStateService.hasPremiumFromAnySource$;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async openFreeBitwardenFamiliesPage() {
|
||||||
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
|
title: { key: "continueToWebApp" },
|
||||||
|
content: { key: "freeBitwardenFamiliesPageDesc" },
|
||||||
|
type: "info",
|
||||||
|
acceptButtonText: { key: "continue" },
|
||||||
|
});
|
||||||
|
if (confirmed) {
|
||||||
|
const env = await firstValueFrom(this.environmentService.environment$);
|
||||||
|
const url = env.getWebVaultUrl();
|
||||||
|
await BrowserApi.createNewTab(url + "/#/settings/sponsored-families");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async openBitwardenForBusinessPage() {
|
async openBitwardenForBusinessPage() {
|
||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: "continueToBitwardenDotCom" },
|
title: { key: "continueToBitwardenDotCom" },
|
||||||
|
|
Loading…
Reference in New Issue
Block a user