Browse Source

Fixes missing plan replacements in Home webview

main
Eric Amodio 2 years ago
parent
commit
4248354889
2 changed files with 3 additions and 2 deletions
  1. +2
    -1
      src/webviews/apps/home/home.ts
  2. +1
    -1
      src/webviews/apps/home/partials/state.plus-trial.html

+ 2
- 1
src/webviews/apps/home/home.ts View File

@ -103,6 +103,7 @@ export class HomeApp extends App {
const remaining = getSubscriptionTimeRemaining(subscription, 'days') ?? 0;
DOM.insertTemplate('state:plus-trial', this.$slot1, {
bindings: {
plan: subscription.plan.effective.name,
trialDays: `${remaining === 1 ? `${remaining} day` : `${remaining} days`}`,
},
});
@ -114,7 +115,7 @@ export class HomeApp extends App {
DOM.insertTemplate(welcomeVisible ? 'welcome' : 'links', this.$slot2);
break;
case SubscriptionState.Paid:
DOM.insertTemplate('state:paid', this.$slot1);
DOM.insertTemplate('state:paid', this.$slot1, { bindings: { plan: subscription.plan.effective.name } });
DOM.insertTemplate(welcomeVisible ? 'welcome' : 'links', this.$slot2);
break;
}

+ 1
- 1
src/webviews/apps/home/partials/state.plus-trial.html View File

@ -1,6 +1,6 @@
<template id="state:plus-trial">
<section>
<h3>GitLens+ Pro Trial</h3>
<h3><span data-bind="plan">GitLens+ Pro</span> Trial</h3>
<p>
You have <span data-bind="trialDays">7 days</span> left in your
<a title="Learn more about GitLens+ features" href="command:gitlens.plus.learn">GitLens+ features</a>

Loading…
Cancel
Save