mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-21 16:18:28 +01:00
[AC-471] Cloud update subscription page (#4897)
* [AC-471] feat: update copy * [AC-471] feat: change text color when expired * [AC-471] feat: remove charge amount
This commit is contained in:
parent
926012f921
commit
7e905d518b
@ -55,15 +55,11 @@
|
||||
"pendingCancellation" | i18n
|
||||
}}</span>
|
||||
</dd>
|
||||
<dt>{{ "nextCharge" | i18n }}</dt>
|
||||
<dd>
|
||||
{{
|
||||
nextInvoice
|
||||
? (nextInvoice.date | date : "mediumDate") +
|
||||
", " +
|
||||
(nextInvoice.amount | currency : "$")
|
||||
: "-"
|
||||
}}
|
||||
<dt [ngClass]="{ 'tw-text-danger': isExpired }">
|
||||
{{ "subscriptionExpiration" | i18n }}
|
||||
</dt>
|
||||
<dd [ngClass]="{ 'tw-text-danger': isExpired }">
|
||||
{{ nextInvoice ? (nextInvoice.date | date : "mediumDate") : "-" }}
|
||||
</dd>
|
||||
</ng-container>
|
||||
</dl>
|
||||
|
@ -99,6 +99,16 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
|
||||
return this.sub != null ? this.sub.upcomingInvoice : null;
|
||||
}
|
||||
|
||||
get isExpired() {
|
||||
const nextInvoice = this.nextInvoice;
|
||||
|
||||
if (nextInvoice == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return new Date(nextInvoice.date).getTime() < Date.now();
|
||||
}
|
||||
|
||||
get storagePercentage() {
|
||||
return this.sub != null && this.sub.maxStorageGb
|
||||
? +(100 * (this.sub.storageGb / this.sub.maxStorageGb)).toFixed(2)
|
||||
|
@ -2020,6 +2020,9 @@
|
||||
"cancelSubscription": {
|
||||
"message": "Cancel subscription"
|
||||
},
|
||||
"subscriptionExpiration": {
|
||||
"message": "Subscription expiration"
|
||||
},
|
||||
"subscriptionCanceled": {
|
||||
"message": "The subscription has been canceled."
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user