From 424835488952bfedda6b2ed1b428a7829d4e7537 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Tue, 8 Mar 2022 14:00:21 -0500 Subject: [PATCH] Fixes missing plan replacements in Home webview --- src/webviews/apps/home/home.ts | 3 ++- src/webviews/apps/home/partials/state.plus-trial.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/webviews/apps/home/home.ts b/src/webviews/apps/home/home.ts index bf57602..c6b7d15 100644 --- a/src/webviews/apps/home/home.ts +++ b/src/webviews/apps/home/home.ts @@ -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; } diff --git a/src/webviews/apps/home/partials/state.plus-trial.html b/src/webviews/apps/home/partials/state.plus-trial.html index e799108..72348b4 100644 --- a/src/webviews/apps/home/partials/state.plus-trial.html +++ b/src/webviews/apps/home/partials/state.plus-trial.html @@ -1,6 +1,6 @@