web-manager 3.2.20 → 3.2.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/lib/account.js +11 -2
  2. package/package.json +1 -1
package/lib/account.js CHANGED
@@ -180,6 +180,12 @@ function handlePlanVisibility(planId) {
180
180
  });
181
181
  }
182
182
 
183
+ function splitDashesAndUppercase(str) {
184
+ return str.split('-').map(function (word) {
185
+ return uppercase(word);
186
+ }).join(' ');
187
+ }
188
+
183
189
  function uppercase(str) {
184
190
  return str.charAt(0).toUpperCase() + str.slice(1);
185
191
  }
@@ -454,14 +460,17 @@ Account.prototype._resolveAccount = function (firebaseUser, account, options) {
454
460
  }
455
461
 
456
462
  // Update trial UI
457
- if (account.plan.trial.activated) {
463
+ if (
464
+ account.plan.trial.activated
465
+ && daysTillTrialExpire > 0
466
+ ) {
458
467
  billingTrialExpirationDateEl
459
468
  .removeAttribute('hidden')
460
469
  .setInnerHTML('<i class="fas fa-gift mr-1"></i> Your free trial expires in ' + daysTillTrialExpire + ' days');
461
470
  }
462
471
 
463
472
  // Update billing UI
464
- billingPlanId.setInnerHTML(uppercase(account.plan.id));
473
+ billingPlanId.setInnerHTML(splitDashesAndUppercase(account.plan.id));
465
474
  billingFrequencyEl.setInnerHTML(account.plan.id !== defaultPlanId ? ' (billed ' + uppercase(account.plan.payment.frequency) + ')' : '');
466
475
  billingStartDateEl.setInnerHTML(account.plan.id !== defaultPlanId ? ' - Purchased ' + getMonth(startDate) + ' ' + startDate.getDate() + ', ' + startDate.getFullYear() : '');
467
476
  billingExpirationDateEl.setInnerHTML(account.plan.id !== defaultPlanId && daysTillExpire < 366
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-manager",
3
- "version": "3.2.20",
3
+ "version": "3.2.22",
4
4
  "description": "Easily access important variables such as the query string, current domain, and current page in a single object.",
5
5
  "main": "index.js",
6
6
  "scripts": {