From 6755c70d3171bbc6a25399d648e6ce9bac29048f Mon Sep 17 00:00:00 2001 From: merefield Date: Sun, 24 Sep 2023 13:01:46 +0100 Subject: [PATCH] simplify buttons --- .../discourse/components/wizard-subscription-badge.hbs | 3 ++- .../discourse/components/wizard-subscription-badge.js | 2 +- .../discourse/components/wizard-subscription-cta.hbs | 6 +++--- .../discourse/components/wizard-subscription-cta.js | 5 ++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/assets/javascripts/discourse/components/wizard-subscription-badge.hbs b/assets/javascripts/discourse/components/wizard-subscription-badge.hbs index bd4e7d96..8d86d4d7 100644 --- a/assets/javascripts/discourse/components/wizard-subscription-badge.hbs +++ b/assets/javascripts/discourse/components/wizard-subscription-badge.hbs @@ -2,6 +2,7 @@ @action={{this.click}} class="wizard-subscription-badge {{this.subscription.subscriptionType}}" @title={{this.title}} + > - {{label}} + {{this.label}} \ No newline at end of file diff --git a/assets/javascripts/discourse/components/wizard-subscription-badge.js b/assets/javascripts/discourse/components/wizard-subscription-badge.js index 02cc479e..fdee6e64 100644 --- a/assets/javascripts/discourse/components/wizard-subscription-badge.js +++ b/assets/javascripts/discourse/components/wizard-subscription-badge.js @@ -18,7 +18,7 @@ export default class WizardSubscriptionBadge extends Component { @computed("i18nKey") get title() { - return I18n.t(`${this.i18nKey}.title`); + return `${this.i18nKey}.title`; } @computed("i18nKey") diff --git a/assets/javascripts/discourse/components/wizard-subscription-cta.hbs b/assets/javascripts/discourse/components/wizard-subscription-cta.hbs index 0224518c..83783aac 100644 --- a/assets/javascripts/discourse/components/wizard-subscription-cta.hbs +++ b/assets/javascripts/discourse/components/wizard-subscription-cta.hbs @@ -2,6 +2,6 @@ @action={{this.click}} class="btn btn-pavilion-support {{this.subscription.subscriptionType}}" @title={{this.title}} -> - {{d-icon icon}}{{label}} - \ No newline at end of file + @label={{this.label}} + @icon="{{this.icon}}" +/> \ No newline at end of file diff --git a/assets/javascripts/discourse/components/wizard-subscription-cta.js b/assets/javascripts/discourse/components/wizard-subscription-cta.js index 1c9edfe1..47b2f382 100644 --- a/assets/javascripts/discourse/components/wizard-subscription-cta.js +++ b/assets/javascripts/discourse/components/wizard-subscription-cta.js @@ -1,6 +1,5 @@ import { inject as service } from "@ember/service"; import { action, computed } from "@ember/object"; -import I18n from "I18n"; import Component from "@glimmer/component"; export default class WizardSubscriptionCta extends Component { @@ -20,12 +19,12 @@ export default class WizardSubscriptionCta extends Component { @computed("i18nKey") get title() { - return I18n.t(`${this.i18nKey}.title`); + return `${this.i18nKey}.title`; } @computed("i18nKey") get label() { - return I18n.t(`${this.i18nKey}.label`); + return `${this.i18nKey}.label`; } @action