diff --git a/apps/browser/src/_locales/en/messages.json b/apps/browser/src/_locales/en/messages.json index b38a984dd9a..ac25f4cf293 100644 --- a/apps/browser/src/_locales/en/messages.json +++ b/apps/browser/src/_locales/en/messages.json @@ -1967,6 +1967,9 @@ }, "ssoKeyConnectorError": { "message": "Key Connector error: make sure Key Connector is available and working correctly." + }, + "premiumSubcriptionRequired": { + "message": "Premium subscription required" }, "organizationIsDisabled": { "message": "Organization is disabled." diff --git a/apps/browser/src/popup/settings/premium.component.html b/apps/browser/src/popup/settings/premium.component.html index fad784da6b4..01ac9258133 100644 --- a/apps/browser/src/popup/settings/premium.component.html +++ b/apps/browser/src/popup/settings/premium.component.html @@ -1,6 +1,6 @@
- diff --git a/apps/browser/src/popup/settings/premium.component.ts b/apps/browser/src/popup/settings/premium.component.ts index b8213919245..d44fdb09a70 100644 --- a/apps/browser/src/popup/settings/premium.component.ts +++ b/apps/browser/src/popup/settings/premium.component.ts @@ -1,4 +1,4 @@ -import { CurrencyPipe } from "@angular/common"; +import { CurrencyPipe, Location } from "@angular/common"; import { Component } from "@angular/core"; import { PremiumComponent as BasePremiumComponent } from "@bitwarden/angular/components/premium.component"; @@ -21,6 +21,7 @@ export class PremiumComponent extends BasePremiumComponent { apiService: ApiService, stateService: StateService, logService: LogService, + private location: Location, private currencyPipe: CurrencyPipe ) { super(i18nService, platformUtilsService, apiService, logService, stateService); @@ -32,4 +33,8 @@ export class PremiumComponent extends BasePremiumComponent { this.priceString = this.priceString.replace("%price%", thePrice); } } + + goBack() { + this.location.back(); + } } diff --git a/apps/browser/src/popup/vault/view.component.html b/apps/browser/src/popup/vault/view.component.html index feb17606669..e168879dd06 100644 --- a/apps/browser/src/popup/vault/view.component.html +++ b/apps/browser/src/popup/vault/view.component.html @@ -139,7 +139,7 @@
+ +
+
+ {{ "verificationCodeTotp" | i18n }} + + + {{ "premiumSubcriptionRequired" | i18n }} + + +
+
diff --git a/apps/desktop/src/app/vault/view.component.html b/apps/desktop/src/app/vault/view.component.html index a033cdd8272..5038e4b984b 100644 --- a/apps/desktop/src/app/vault/view.component.html +++ b/apps/desktop/src/app/vault/view.component.html @@ -100,7 +100,7 @@
+
+
+ {{ "verificationCodeTotp" | i18n }} + + {{ "premiumSubcriptionRequired" | i18n }} + + +
+
diff --git a/apps/desktop/src/app/vault/view.component.ts b/apps/desktop/src/app/vault/view.component.ts index eb58df0d1e3..a3125c02e7d 100644 --- a/apps/desktop/src/app/vault/view.component.ts +++ b/apps/desktop/src/app/vault/view.component.ts @@ -115,4 +115,10 @@ export class ViewComponent extends BaseViewComponent implements OnChanges { }); } } + + showGetPremium() { + if (!this.canAccessPremium) { + this.messagingService.send("premiumRequired"); + } + } } diff --git a/apps/desktop/src/locales/en/messages.json b/apps/desktop/src/locales/en/messages.json index 170ddb72145..e399281c061 100644 --- a/apps/desktop/src/locales/en/messages.json +++ b/apps/desktop/src/locales/en/messages.json @@ -1979,6 +1979,9 @@ "apiKey": { "message": "API Key" }, + "premiumSubcriptionRequired": { + "message": "Premium subscription required" + }, "organizationIsDisabled": { "message": "Organization is disabled." }, diff --git a/apps/web/src/app/app.component.ts b/apps/web/src/app/app.component.ts index 381fd551124..ef80dc5e736 100644 --- a/apps/web/src/app/app.component.ts +++ b/apps/web/src/app/app.component.ts @@ -147,7 +147,7 @@ export class AppComponent implements OnDestroy, OnInit { const premiumConfirmed = await this.platformUtilsService.showDialog( this.i18nService.t("premiumRequiredDesc"), this.i18nService.t("premiumRequired"), - this.i18nService.t("learnMore"), + this.i18nService.t("upgrade"), this.i18nService.t("cancel") ); if (premiumConfirmed) { diff --git a/apps/web/src/app/vault/add-edit.component.html b/apps/web/src/app/vault/add-edit.component.html index 54b707c9f6e..d7aa44f8772 100644 --- a/apps/web/src/app/vault/add-edit.component.html +++ b/apps/web/src/app/vault/add-edit.component.html @@ -166,8 +166,8 @@
-
-
+
+
-
-
- +
+ + 15 + + + + + + + + + >--- --- + +
+
-
- +
+ {{ totpSec }} @@ -225,16 +255,18 @@ - {{ - totpCodeFormatted - }} + {{ totpCodeFormatted }}
diff --git a/apps/web/src/app/vault/add-edit.component.ts b/apps/web/src/app/vault/add-edit.component.ts index 4b89162803e..0b7642eb97e 100644 --- a/apps/web/src/app/vault/add-edit.component.ts +++ b/apps/web/src/app/vault/add-edit.component.ts @@ -152,6 +152,17 @@ export class AddEditComponent extends BaseAddEditComponent { }); } + showGetPremium() { + if (this.canAccessPremium) { + return; + } + if (this.cipher.organizationUseTotp) { + this.upgradeOrganization(); + } else { + this.premiumRequired(); + } + } + viewHistory() { this.viewingPasswordHistory = !this.viewingPasswordHistory; } diff --git a/apps/web/src/images/totp-countdown.png b/apps/web/src/images/totp-countdown.png deleted file mode 100644 index ef07c49b98b..00000000000 Binary files a/apps/web/src/images/totp-countdown.png and /dev/null differ diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json index 71f3bd7b8f6..0e711752773 100644 --- a/apps/web/src/locales/en/messages.json +++ b/apps/web/src/locales/en/messages.json @@ -5220,6 +5220,9 @@ } } }, + "premiumSubcriptionRequired": { + "message": "Premium subscription required" + }, "scim": { "message": "SCIM Provisioning", "description": "The text, 'SCIM', is an acronymn and should not be translated." diff --git a/apps/web/src/scss/modals.scss b/apps/web/src/scss/modals.scss index 337bc3169c1..7d4fd478e5e 100644 --- a/apps/web/src/scss/modals.scss +++ b/apps/web/src/scss/modals.scss @@ -130,6 +130,25 @@ stroke-width: 2; } } + + .totp-circle-muted { + fill: none; + @include themify($themes) { + stroke: themed("info"); + } + + &.inner { + stroke-dasharray: 78.6; + stroke-dashoffset: 0; + stroke-width: 3; + } + + &.outer { + stroke-dasharray: 88; + stroke-dashoffset: 0; + stroke-width: 2; + } + } } > .align-items-center {