DEV: Update linting (#247)
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
{{#if shouldShow}}
|
||||
{{#if this.shouldShow}}
|
||||
<div
|
||||
class="campaign-banner"
|
||||
style={{html-safe (concat "box-shadow: 5px 5px #" dropShadowColor)}}
|
||||
style={{html-safe (concat "box-shadow: 5px 5px #" this.dropShadowColor)}}
|
||||
>
|
||||
<DButton @icon="times" @action={{this.dismissBanner}} class="close" />
|
||||
|
||||
<div class="campaign-banner-info" style={{html-safe this.bannerInfoStyle}}>
|
||||
{{#if isGoalMet}}
|
||||
{{#if this.isGoalMet}}
|
||||
<h2 class="campaign-banner-info-header">
|
||||
{{i18n "discourse_subscriptions.campaign.success_title"}}
|
||||
</h2>
|
||||
@@ -23,11 +23,11 @@
|
||||
{{i18n "discourse_subscriptions.campaign.body"}}
|
||||
</p>
|
||||
|
||||
{{#if product}}
|
||||
{{#if this.product}}
|
||||
<LinkTo
|
||||
@route="subscribe.show"
|
||||
@model={{product}}
|
||||
@disabled={{product.subscribed}}
|
||||
@model={{this.product}}
|
||||
@disabled={{this.product.subscribed}}
|
||||
class="btn btn-primary campaign-banner-info-button"
|
||||
>
|
||||
{{d-icon "far-heart"}}
|
||||
@@ -48,7 +48,7 @@
|
||||
</div>
|
||||
|
||||
<div class="campaign-banner-progress">
|
||||
{{#if isGoalMet}}
|
||||
{{#if this.isGoalMet}}
|
||||
<div class="fireworks">
|
||||
<div class="before"></div>
|
||||
<div class="after"></div>
|
||||
@@ -56,13 +56,13 @@
|
||||
|
||||
<div class="campaign-banner-progress-success"></div>
|
||||
|
||||
{{#if subscriberGoal}}
|
||||
{{#if this.subscriberGoal}}
|
||||
<p class="campaign-banner-progress-description">
|
||||
{{html-safe
|
||||
(i18n
|
||||
"discourse_subscriptions.campaign.goal_comparison"
|
||||
current=subscribers
|
||||
goal=goalTarget
|
||||
current=this.subscribers
|
||||
goal=this.goalTarget
|
||||
)
|
||||
}}
|
||||
{{i18n "discourse_subscriptions.campaign.subscribers"}}
|
||||
@@ -72,15 +72,18 @@
|
||||
{{html-safe
|
||||
(i18n
|
||||
"discourse_subscriptions.campaign.goal_comparison"
|
||||
current=(format-currency currency amountRaised)
|
||||
goal=(format-currency currency goalTarget)
|
||||
current=(format-currency this.currency this.amountRaised)
|
||||
goal=(format-currency this.currency this.goalTarget)
|
||||
)
|
||||
}}
|
||||
{{i18n "discourse_subscriptions.campaign.raised"}}
|
||||
</p>
|
||||
|
||||
{{#if showContributors}}
|
||||
<ConditionalLoadingSpinner @condition={{loading}} @size="small">
|
||||
{{#if this.showContributors}}
|
||||
<ConditionalLoadingSpinner
|
||||
@condition={{this.loading}}
|
||||
@size="small"
|
||||
>
|
||||
<div class="campaign-banner-progress-users">
|
||||
<p class="campaign-banner-progress-users-title">
|
||||
<strong>
|
||||
@@ -91,7 +94,7 @@
|
||||
</p>
|
||||
|
||||
<div class="campaign-banner-progress-users-avatars">
|
||||
{{#each contributors as |contributor|}}
|
||||
{{#each this.contributors as |contributor|}}
|
||||
{{avatar
|
||||
contributor
|
||||
avatarTemplatePath="avatar_template"
|
||||
@@ -106,19 +109,19 @@
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{#if subscriberGoal}}
|
||||
{{#if this.subscriberGoal}}
|
||||
<progress
|
||||
class="campaign-banner-progress-bar"
|
||||
value={{subscribers}}
|
||||
max={{siteSettings.discourse_subscriptions_campaign_goal}}
|
||||
value={{this.subscribers}}
|
||||
max={{this.siteSettings.discourse_subscriptions_campaign_goal}}
|
||||
></progress>
|
||||
|
||||
<p class="campaign-banner-progress-description">
|
||||
{{html-safe
|
||||
(i18n
|
||||
"discourse_subscriptions.campaign.goal_comparison"
|
||||
current=subscribers
|
||||
goal=goalTarget
|
||||
current=this.subscribers
|
||||
goal=this.goalTarget
|
||||
)
|
||||
}}
|
||||
{{i18n "discourse_subscriptions.campaign.subscribers"}}
|
||||
@@ -126,24 +129,24 @@
|
||||
{{else}}
|
||||
<progress
|
||||
class="campaign-banner-progress-bar"
|
||||
value={{amountRaised}}
|
||||
max={{siteSettings.discourse_subscriptions_campaign_goal}}
|
||||
value={{this.amountRaised}}
|
||||
max={{this.siteSettings.discourse_subscriptions_campaign_goal}}
|
||||
></progress>
|
||||
|
||||
<p class="campaign-banner-progress-description">
|
||||
{{html-safe
|
||||
(i18n
|
||||
"discourse_subscriptions.campaign.goal_comparison"
|
||||
current=(format-currency currency amountRaised)
|
||||
goal=(format-currency currency goalTarget)
|
||||
current=(format-currency this.currency this.amountRaised)
|
||||
goal=(format-currency this.currency this.goalTarget)
|
||||
)
|
||||
}}
|
||||
{{i18n "discourse_subscriptions.campaign.raised"}}
|
||||
</p>
|
||||
{{/if}}
|
||||
|
||||
{{#if showContributors}}
|
||||
<ConditionalLoadingSpinner @condition={{loading}} @size="small">
|
||||
{{#if this.showContributors}}
|
||||
<ConditionalLoadingSpinner @condition={{this.loading}} @size="small">
|
||||
<div class="campaign-banner-progress-users">
|
||||
<p class="campaign-banner-progress-users-title">
|
||||
<strong>
|
||||
@@ -154,7 +157,7 @@
|
||||
</p>
|
||||
|
||||
<div class="campaign-banner-progress-users-avatars">
|
||||
{{#each contributors as |contributor|}}
|
||||
{{#each this.contributors as |contributor|}}
|
||||
{{avatar
|
||||
contributor
|
||||
avatarTemplatePath="avatar_template"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<label for="promo_code">
|
||||
{{i18n "discourse_subscriptions.admin.coupons.promo_code"}}
|
||||
</label>
|
||||
<Input @type="text" name="promo_code" @value={{promoCode}} />
|
||||
<Input @type="text" name="promo_code" @value={{this.promoCode}} />
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -12,15 +12,15 @@
|
||||
{{i18n "discourse_subscriptions.admin.coupons.discount"}}
|
||||
</label>
|
||||
<ComboBox
|
||||
@content={{discountTypes}}
|
||||
@value={{discountType}}
|
||||
@onChange={{action (mut discountType)}}
|
||||
@content={{this.discountTypes}}
|
||||
@value={{this.discountType}}
|
||||
@onChange={{action (mut this.discountType)}}
|
||||
/>
|
||||
<Input
|
||||
class="discount-amount"
|
||||
@type="text"
|
||||
name="amount"
|
||||
@value={{discount}}
|
||||
@value={{this.discount}}
|
||||
/>
|
||||
</p>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<label for="active">
|
||||
{{i18n "discourse_subscriptions.admin.coupons.active"}}
|
||||
</label>
|
||||
<Input @type="checkbox" name="active" @checked={{active}} />
|
||||
<Input @type="checkbox" name="active" @checked={{this.active}} />
|
||||
</p>
|
||||
</form>
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
</p>
|
||||
|
||||
<div class="subscribe-buttons">
|
||||
{{#each orderedPlans as |plan|}}
|
||||
{{#each this.orderedPlans as |plan|}}
|
||||
<PaymentPlan
|
||||
@plan={{plan}}
|
||||
@selectedPlan={{selectedPlan}}
|
||||
@selectedPlan={{this.selectedPlan}}
|
||||
@clickPlan={{action "clickPlan"}}
|
||||
/>
|
||||
{{/each}}
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<DButton
|
||||
@action={{action "planClick"}}
|
||||
class={{concat-class "btn-discourse-subscriptions-subscribe" selectedClass}}
|
||||
class={{concat-class
|
||||
"btn-discourse-subscriptions-subscribe"
|
||||
this.selectedClass
|
||||
}}
|
||||
>
|
||||
<span class="interval">
|
||||
{{#if this.recurringPlan}}
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
<h2>{{product.name}}</h2>
|
||||
<h2>{{this.product.name}}</h2>
|
||||
|
||||
<p class="product-description">
|
||||
{{html-safe product.description}}
|
||||
{{html-safe this.product.description}}
|
||||
</p>
|
||||
|
||||
{{#if isLoggedIn}}
|
||||
{{#if this.isLoggedIn}}
|
||||
<div class="product-purchase">
|
||||
{{#if product.repurchaseable}}
|
||||
{{#if this.product.repurchaseable}}
|
||||
<LinkTo
|
||||
@route="subscribe.show"
|
||||
@model={{product.id}}
|
||||
@model={{this.product.id}}
|
||||
class="btn btn-primary"
|
||||
>
|
||||
{{i18n "discourse_subscriptions.subscribe.title"}}
|
||||
</LinkTo>
|
||||
|
||||
{{#if product.subscribed}}
|
||||
{{#if this.product.subscribed}}
|
||||
<LinkTo
|
||||
@route="user.billing.subscriptions"
|
||||
@model={{currentUser.username}}
|
||||
@model={{this.currentUser.username}}
|
||||
class="billing-link"
|
||||
>
|
||||
{{i18n "discourse_subscriptions.subscribe.view_past"}}
|
||||
</LinkTo>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{#if product.subscribed}}
|
||||
{{#if this.product.subscribed}}
|
||||
<span class="purchased">
|
||||
✓
|
||||
{{i18n "discourse_subscriptions.subscribe.purchased"}}
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
<LinkTo
|
||||
@route="user.billing.subscriptions"
|
||||
@model={{currentUser.username}}
|
||||
@model={{this.currentUser.username}}
|
||||
class="billing-link"
|
||||
>
|
||||
{{i18n "discourse_subscriptions.subscribe.go_to_billing"}}
|
||||
@@ -41,8 +41,8 @@
|
||||
{{else}}
|
||||
<LinkTo
|
||||
@route="subscribe.show"
|
||||
@model={{product.id}}
|
||||
@disabled={{product.subscribed}}
|
||||
@model={{this.product.id}}
|
||||
@disabled={{this.product.subscribed}}
|
||||
class="btn btn-primary"
|
||||
>
|
||||
{{i18n "discourse_subscriptions.subscribe.title"}}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{{#if emptyProducts}}
|
||||
{{#if this.emptyProducts}}
|
||||
<p>{{i18n "discourse_subscriptions.subscribe.no_products"}}</p>
|
||||
{{else}}
|
||||
{{#each products as |product|}}
|
||||
<ProductItem @product={{product}} @isLoggedIn={{isLoggedIn}} />
|
||||
{{#each this.products as |product|}}
|
||||
<ProductItem @product={{product}} @isLoggedIn={{this.isLoggedIn}} />
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
+5
-5
@@ -1,4 +1,4 @@
|
||||
{{#if model.unconfigured}}
|
||||
{{#if this.model.unconfigured}}
|
||||
<p>{{i18n "discourse_subscriptions.admin.unconfigured"}}</p>
|
||||
<p>
|
||||
<a href="https://meta.discourse.org/t/discourse-subscriptions/140818/">
|
||||
@@ -6,7 +6,7 @@
|
||||
</a>
|
||||
</p>
|
||||
{{else}}
|
||||
{{#if model}}
|
||||
{{#if this.model}}
|
||||
<table class="table discourse-patrons-table">
|
||||
<thead>
|
||||
<th>{{i18n "discourse_subscriptions.admin.coupons.code"}}</th>
|
||||
@@ -16,7 +16,7 @@
|
||||
<th>{{i18n "discourse_subscriptions.admin.coupons.actions"}}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each model as |coupon|}}
|
||||
{{#each this.model as |coupon|}}
|
||||
<tr>
|
||||
<td>{{coupon.code}}</td>
|
||||
<td>{{coupon.discount}}</td>
|
||||
@@ -42,7 +42,7 @@
|
||||
</table>
|
||||
{{/if}}
|
||||
|
||||
{{#unless creating}}
|
||||
{{#unless this.creating}}
|
||||
<DButton
|
||||
@action={{action "openCreateForm"}}
|
||||
@label="discourse_subscriptions.admin.coupons.create"
|
||||
@@ -52,7 +52,7 @@
|
||||
/>
|
||||
{{/unless}}
|
||||
|
||||
{{#if creating}}
|
||||
{{#if this.creating}}
|
||||
<CreateCouponForm
|
||||
@cancel={{action "closeCreateForm"}}
|
||||
@create={{action "createNewCoupon"}}
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
<h3>{{i18n "discourse_subscriptions.admin.dashboard.title"}}</h3>
|
||||
|
||||
<LoadMore @selector=".discourse-patrons-table tr" @action={{action "loadMore"}}>
|
||||
{{#if model}}
|
||||
{{#if this.model}}
|
||||
<table class="table discourse-patrons-table">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -35,7 +35,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each model as |payment|}}
|
||||
{{#each this.model as |payment|}}
|
||||
<tr>
|
||||
<td>
|
||||
<LinkTo
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each model as |plan|}}
|
||||
{{#each this.model as |plan|}}
|
||||
<tr>
|
||||
<td>{{plan.id}}</td>
|
||||
<td>{{plan.nickname}}</td>
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
{{#if model.unconfigured}}
|
||||
{{#if this.model.unconfigured}}
|
||||
<p>{{i18n "discourse_subscriptions.admin.unconfigured"}}</p>
|
||||
<p>
|
||||
<a href="https://meta.discourse.org/t/discourse-subscriptions/140818/">
|
||||
@@ -19,7 +19,7 @@
|
||||
</LinkTo>
|
||||
</p>
|
||||
|
||||
{{#if model}}
|
||||
{{#if this.model}}
|
||||
<table class="table discourse-patrons-table">
|
||||
<thead>
|
||||
<th>
|
||||
@@ -38,7 +38,7 @@
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{{#each model as |product|}}
|
||||
{{#each this.model as |product|}}
|
||||
<tr>
|
||||
<td>{{product.name}}</td>
|
||||
<td>{{format-unix-date product.created}}</td>
|
||||
|
||||
+25
-25
@@ -9,7 +9,7 @@
|
||||
<Input
|
||||
@type="text"
|
||||
name="product_name"
|
||||
@value={{model.product.name}}
|
||||
@value={{this.model.product.name}}
|
||||
disabled={{true}}
|
||||
/>
|
||||
</p>
|
||||
@@ -19,7 +19,7 @@
|
||||
{{i18n "discourse_subscriptions.admin.plans.plan.nickname"}}
|
||||
</label>
|
||||
|
||||
<Input @type="text" name="name" @value={{model.plan.nickname}} />
|
||||
<Input @type="text" name="name" @value={{this.model.plan.nickname}} />
|
||||
|
||||
<div class="control-instructions">
|
||||
{{i18n "discourse_subscriptions.admin.plans.plan.nickname_help"}}
|
||||
@@ -33,9 +33,9 @@
|
||||
|
||||
<ComboBox
|
||||
@valueProperty="name"
|
||||
@content={{availableGroups}}
|
||||
@value={{selectedGroup}}
|
||||
@onChange={{action (mut model.plan.metadata.group_name)}}
|
||||
@content={{this.availableGroups}}
|
||||
@value={{this.selectedGroup}}
|
||||
@onChange={{action (mut this.model.plan.metadata.group_name)}}
|
||||
/>
|
||||
|
||||
<div class="control-instructions">
|
||||
@@ -48,18 +48,18 @@
|
||||
{{i18n "discourse_subscriptions.admin.plans.plan.amount"}}
|
||||
</label>
|
||||
|
||||
{{#if planFieldDisabled}}
|
||||
{{#if this.planFieldDisabled}}
|
||||
<Input
|
||||
class="plan-amount plan-currency"
|
||||
disabled={{true}}
|
||||
@value={{model.plan.currency}}
|
||||
@value={{this.model.plan.currency}}
|
||||
/>
|
||||
{{else}}
|
||||
<ComboBox
|
||||
@disabled={{planFieldDisabled}}
|
||||
@content={{currencies}}
|
||||
@value={{model.plan.currency}}
|
||||
@onChange={{action (mut model.plan.currency)}}
|
||||
@disabled={{this.planFieldDisabled}}
|
||||
@content={{this.currencies}}
|
||||
@value={{this.model.plan.currency}}
|
||||
@onChange={{action (mut this.model.plan.currency)}}
|
||||
/>
|
||||
{{/if}}
|
||||
|
||||
@@ -67,8 +67,8 @@
|
||||
class="plan-amount"
|
||||
@type="text"
|
||||
name="name"
|
||||
@value={{model.plan.amountDollars}}
|
||||
disabled={{planFieldDisabled}}
|
||||
@value={{this.model.plan.amountDollars}}
|
||||
disabled={{this.planFieldDisabled}}
|
||||
/>
|
||||
</p>
|
||||
|
||||
@@ -77,37 +77,37 @@
|
||||
{{i18n "discourse_subscriptions.admin.plans.plan.recurring"}}
|
||||
</label>
|
||||
|
||||
{{#if planFieldDisabled}}
|
||||
{{#if this.planFieldDisabled}}
|
||||
<Input
|
||||
@type="checkbox"
|
||||
name="recurring"
|
||||
@checked={{model.plan.isRecurring}}
|
||||
@checked={{this.model.plan.isRecurring}}
|
||||
disabled={{true}}
|
||||
/>
|
||||
{{else}}
|
||||
<Input
|
||||
@type="checkbox"
|
||||
name="recurring"
|
||||
@checked={{model.plan.isRecurring}}
|
||||
@checked={{this.model.plan.isRecurring}}
|
||||
{{on "change" (action "changeRecurring")}}
|
||||
/>
|
||||
{{/if}}
|
||||
</p>
|
||||
|
||||
{{#if model.plan.isRecurring}}
|
||||
{{#if this.model.plan.isRecurring}}
|
||||
<p>
|
||||
<label for="interval">
|
||||
{{i18n "discourse_subscriptions.admin.plans.plan.interval"}}
|
||||
</label>
|
||||
|
||||
{{#if planFieldDisabled}}
|
||||
<Input disabled={{true}} @value={{selectedInterval}} />
|
||||
{{#if this.planFieldDisabled}}
|
||||
<Input disabled={{true}} @value={{this.selectedInterval}} />
|
||||
{{else}}
|
||||
<ComboBox
|
||||
@valueProperty="name"
|
||||
@content={{availableIntervals}}
|
||||
@value={{selectedInterval}}
|
||||
@onChange={{action (mut selectedInterval)}}
|
||||
@content={{this.availableIntervals}}
|
||||
@value={{this.selectedInterval}}
|
||||
@onChange={{action (mut this.selectedInterval)}}
|
||||
/>
|
||||
{{/if}}
|
||||
</p>
|
||||
@@ -121,7 +121,7 @@
|
||||
<Input
|
||||
@type="text"
|
||||
name="trial"
|
||||
@value={{model.plan.trial_period_days}}
|
||||
@value={{this.model.plan.trial_period_days}}
|
||||
/>
|
||||
|
||||
<div class="control-instructions">
|
||||
@@ -134,7 +134,7 @@
|
||||
<label for="active">
|
||||
{{i18n "discourse_subscriptions.admin.plans.plan.active"}}
|
||||
</label>
|
||||
<Input @type="checkbox" name="active" @checked={{model.plan.active}} />
|
||||
<Input @type="checkbox" name="active" @checked={{this.model.plan.active}} />
|
||||
</p>
|
||||
</form>
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
</p>
|
||||
|
||||
<div class="pull-right">
|
||||
{{#if model.plan.isNew}}
|
||||
{{#if this.model.plan.isNew}}
|
||||
<DButton
|
||||
@label="discourse_subscriptions.admin.plans.operations.create"
|
||||
@action={{action "createPlan"}}
|
||||
|
||||
+14
-10
@@ -5,7 +5,7 @@
|
||||
<label for="name">
|
||||
{{i18n "discourse_subscriptions.admin.products.product.name"}}
|
||||
</label>
|
||||
<Input @type="text" name="name" @value={{model.product.name}} />
|
||||
<Input @type="text" name="name" @value={{this.model.product.name}} />
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<Textarea
|
||||
name="description"
|
||||
@value={{model.product.metadata.description}}
|
||||
@value={{this.model.product.metadata.description}}
|
||||
class="discourse-subscriptions-admin-textarea"
|
||||
/>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<Input
|
||||
@type="text"
|
||||
name="statement_descriptor"
|
||||
@value={{model.product.statement_descriptor}}
|
||||
@value={{this.model.product.statement_descriptor}}
|
||||
/>
|
||||
|
||||
<div class="control-instructions">
|
||||
@@ -52,7 +52,7 @@
|
||||
<Input
|
||||
@type="checkbox"
|
||||
name="repurchaseable"
|
||||
@checked={{model.product.metadata.repurchaseable}}
|
||||
@checked={{this.model.product.metadata.repurchaseable}}
|
||||
/>
|
||||
|
||||
<div class="control-instructions">
|
||||
@@ -65,7 +65,11 @@
|
||||
{{i18n "discourse_subscriptions.admin.products.product.active"}}
|
||||
</label>
|
||||
|
||||
<Input @type="checkbox" name="active" @checked={{model.product.active}} />
|
||||
<Input
|
||||
@type="checkbox"
|
||||
name="active"
|
||||
@checked={{this.model.product.active}}
|
||||
/>
|
||||
|
||||
<div class="control-instructions">
|
||||
{{i18n "discourse_subscriptions.admin.products.product.active_help"}}
|
||||
@@ -73,7 +77,7 @@
|
||||
</p>
|
||||
</form>
|
||||
|
||||
{{#unless model.product.isNew}}
|
||||
{{#unless this.model.product.isNew}}
|
||||
<h4>{{i18n "discourse_subscriptions.admin.plans.title"}}</h4>
|
||||
|
||||
<p>
|
||||
@@ -90,7 +94,7 @@
|
||||
<th class="td-right">
|
||||
<LinkTo
|
||||
@route="adminPlugins.discourse-subscriptions.products.show.plans.show"
|
||||
@models={{array model.product.id "new"}}
|
||||
@models={{array this.model.product.id "new"}}
|
||||
class="btn"
|
||||
>
|
||||
{{i18n "discourse_subscriptions.admin.plans.operations.add"}}
|
||||
@@ -99,7 +103,7 @@
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{{#each model.plans as |plan|}}
|
||||
{{#each this.model.plans as |plan|}}
|
||||
<tr>
|
||||
<td>{{plan.nickname}}</td>
|
||||
<td>{{plan.recurring.interval}}</td>
|
||||
@@ -112,7 +116,7 @@
|
||||
<td class="td-right">
|
||||
<LinkTo
|
||||
@route="adminPlugins.discourse-subscriptions.products.show.plans.show"
|
||||
@models={{array model.product.id plan.id}}
|
||||
@models={{array this.model.product.id plan.id}}
|
||||
class="btn no-text btn-icon"
|
||||
>
|
||||
{{d-icon "far-edit"}}
|
||||
@@ -137,7 +141,7 @@
|
||||
<div class="pull-right">
|
||||
<DButton @label="cancel" @action={{action "cancelProduct"}} @icon="times" />
|
||||
|
||||
{{#if model.product.isNew}}
|
||||
{{#if this.model.product.isNew}}
|
||||
<DButton
|
||||
@label="discourse_subscriptions.admin.products.operations.create"
|
||||
@action={{action "createProduct"}}
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
{{#if model.unconfigured}}
|
||||
{{#if this.model.unconfigured}}
|
||||
<p>{{i18n "discourse_subscriptions.admin.unconfigured"}}</p>
|
||||
<p>
|
||||
<a href="https://meta.discourse.org/t/discourse-subscriptions/140818/">
|
||||
@@ -53,7 +53,7 @@
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{{#each model.data as |subscription|}}
|
||||
{{#each this.model.data as |subscription|}}
|
||||
<tr>
|
||||
<td>
|
||||
{{#if subscription.metadataUserExists}}
|
||||
@@ -86,5 +86,5 @@
|
||||
</table>
|
||||
</LoadMore>
|
||||
|
||||
<ConditionalLoadingSpinner @condition={{loading}} />
|
||||
<ConditionalLoadingSpinner @condition={{this.loading}} />
|
||||
{{/if}}
|
||||
@@ -1,20 +1,23 @@
|
||||
<h2>{{i18n "discourse_subscriptions.title" site_name=siteSettings.title}}</h2>
|
||||
<h2>{{i18n
|
||||
"discourse_subscriptions.title"
|
||||
site_name=this.siteSettings.title
|
||||
}}</h2>
|
||||
|
||||
{{#if stripeConfigured}}
|
||||
{{#if this.stripeConfigured}}
|
||||
<div class="discourse-subscriptions-buttons">
|
||||
{{#if campaignEnabled}}
|
||||
{{#if this.campaignEnabled}}
|
||||
<DButton
|
||||
@label="discourse_subscriptions.campaign.refresh_campaign"
|
||||
@icon="sync-alt"
|
||||
@action={{action "triggerManualRefresh"}}
|
||||
/>
|
||||
{{else}}
|
||||
{{#unless campaignProductSet}}
|
||||
{{#unless this.campaignProductSet}}
|
||||
<DButton
|
||||
@label="discourse_subscriptions.campaign.one_click_campaign"
|
||||
@icon="plus-square"
|
||||
@action={{action "createOneClickCampaign"}}
|
||||
@isLoading={{loading}}
|
||||
@isLoading={{this.loading}}
|
||||
/>
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{#if (user-viewing-self model)}}
|
||||
{{#if (user-viewing-self this.model)}}
|
||||
<LinkTo @route="user.billing">
|
||||
{{d-icon "far-credit-card"}}
|
||||
{{i18n "discourse_subscriptions.navigation.billing"}}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{{#unless isLoggedIn}}
|
||||
{{#unless this.isLoggedIn}}
|
||||
<LoginRequired />
|
||||
{{/unless}}
|
||||
|
||||
<ProductList @products={{model}} @isLoggedIn={{isLoggedIn}} />
|
||||
<ProductList @products={{this.model}} @isLoggedIn={{this.isLoggedIn}} />
|
||||
@@ -1,33 +1,36 @@
|
||||
<div class="discourse-subscriptions-section-columns">
|
||||
<div class="section-column discourse-subscriptions-confirmation-billing">
|
||||
<h2>
|
||||
{{model.product.name}}
|
||||
{{this.model.product.name}}
|
||||
</h2>
|
||||
|
||||
<hr />
|
||||
|
||||
<p>
|
||||
{{html-safe model.product.description}}
|
||||
{{html-safe this.model.product.description}}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="section-column">
|
||||
{{#if canPurchase}}
|
||||
{{#if this.canPurchase}}
|
||||
<h2>
|
||||
{{i18n "discourse_subscriptions.subscribe.card.title"}}
|
||||
</h2>
|
||||
|
||||
<hr />
|
||||
|
||||
<PaymentOptions @plans={{model.plans}} @selectedPlan={{selectedPlan}} />
|
||||
<PaymentOptions
|
||||
@plans={{this.model.plans}}
|
||||
@selectedPlan={{this.selectedPlan}}
|
||||
/>
|
||||
|
||||
<hr />
|
||||
|
||||
<SubscribeCard @cardElement={{cardElement}} />
|
||||
<SubscribeCard @cardElement={{this.cardElement}} />
|
||||
|
||||
{{#if loading}}
|
||||
{{#if this.loading}}
|
||||
{{loading-spinner}}
|
||||
{{else if isAnonymous}}
|
||||
{{else if this.isAnonymous}}
|
||||
<LoginRequired />
|
||||
{{else}}
|
||||
<Input
|
||||
@@ -36,12 +39,12 @@
|
||||
placeholder={{i18n
|
||||
"discourse_subscriptions.subscribe.cardholder_name"
|
||||
}}
|
||||
@value={{cardholderName}}
|
||||
@value={{this.cardholderName}}
|
||||
class="subscribe-name"
|
||||
/>
|
||||
<div class="address-fields">
|
||||
<SubscribeCountrySelect
|
||||
@value={{cardholderAddress.country}}
|
||||
@value={{this.cardholderAddress.country}}
|
||||
@onChange={{action "changeCountry"}}
|
||||
/>
|
||||
<Input
|
||||
@@ -50,7 +53,7 @@
|
||||
placeholder={{i18n
|
||||
"discourse_subscriptions.subscribe.cardholder_address.postal_code"
|
||||
}}
|
||||
@value={{cardholderAddress.postalCode}}
|
||||
@value={{this.cardholderAddress.postalCode}}
|
||||
class="subscribe-address-postal-code"
|
||||
/>
|
||||
</div>
|
||||
@@ -60,7 +63,7 @@
|
||||
placeholder={{i18n
|
||||
"discourse_subscriptions.subscribe.cardholder_address.line1"
|
||||
}}
|
||||
@value={{cardholderAddress.line1}}
|
||||
@value={{this.cardholderAddress.line1}}
|
||||
class="subscribe-address-line1"
|
||||
/>
|
||||
<div class="address-fields">
|
||||
@@ -70,17 +73,17 @@
|
||||
placeholder={{i18n
|
||||
"discourse_subscriptions.subscribe.cardholder_address.city"
|
||||
}}
|
||||
@value={{cardholderAddress.city}}
|
||||
@value={{this.cardholderAddress.city}}
|
||||
class="subscribe-address-city"
|
||||
/>
|
||||
{{#if isCountryUS}}
|
||||
{{#if this.isCountryUS}}
|
||||
<SubscribeUsStateSelect
|
||||
@value={{cardholderAddress.state}}
|
||||
@value={{this.cardholderAddress.state}}
|
||||
@onChange={{action "changeState"}}
|
||||
/>
|
||||
{{else if isCountryCA}}
|
||||
{{else if this.isCountryCA}}
|
||||
<SubscribeCaProvinceSelect
|
||||
@value={{cardholderAddress.state}}
|
||||
@value={{this.cardholderAddress.state}}
|
||||
@onChange={{action "changeState"}}
|
||||
/>
|
||||
{{else}}
|
||||
@@ -90,7 +93,7 @@
|
||||
placeholder={{i18n
|
||||
"discourse_subscriptions.subscribe.cardholder_address.state"
|
||||
}}
|
||||
@value={{cardholderAddress.state}}
|
||||
@value={{this.cardholderAddress.state}}
|
||||
class="subscribe-address-state"
|
||||
/>
|
||||
{{/if}}
|
||||
@@ -100,12 +103,12 @@
|
||||
@type="text"
|
||||
name="promo_code"
|
||||
placeholder={{i18n "discourse_subscriptions.subscribe.promo_code"}}
|
||||
@value={{promoCode}}
|
||||
@value={{this.promoCode}}
|
||||
class="subscribe-promo-code"
|
||||
/>
|
||||
|
||||
<DButton
|
||||
@disabled={{loading}}
|
||||
@disabled={{this.loading}}
|
||||
@action={{action "stripePaymentHandler"}}
|
||||
class="btn btn-primary btn-payment"
|
||||
@label="discourse_subscriptions.plans.payment_button"
|
||||
@@ -116,7 +119,7 @@
|
||||
|
||||
<LinkTo
|
||||
@route="user.billing.subscriptions"
|
||||
@model={{currentUser.username}}
|
||||
@model={{this.currentUser.username}}
|
||||
class="btn btn-primary"
|
||||
>
|
||||
{{i18n "discourse_subscriptions.subscribe.go_to_billing"}}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<section class="user-secondary-navigation">
|
||||
<MobileNav
|
||||
@desktopClass="action-list nav-stacked"
|
||||
@currentPath={{router._router.currentPath}}
|
||||
@currentPath={{this.router._router.currentPath}}
|
||||
class="activity-nav"
|
||||
>
|
||||
<li>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{#if model}}
|
||||
{{#if this.model}}
|
||||
<table class="table discourse-subscriptions-user-table">
|
||||
<thead>
|
||||
<th>{{i18n "discourse_subscriptions.user.payments.id"}}</th>
|
||||
@@ -6,7 +6,7 @@
|
||||
<th>{{i18n "discourse_subscriptions.user.payments.created_at"}}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each model as |payment|}}
|
||||
{{#each this.model as |payment|}}
|
||||
<tr>
|
||||
<td>{{payment.id}}</td>
|
||||
<td>{{format-currency payment.currency payment.amountDollars}}</td>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<h3>{{i18n
|
||||
"discourse_subscriptions.user.subscriptions.update_card.heading"
|
||||
sub_id=model
|
||||
sub_id=this.model
|
||||
}}</h3>
|
||||
|
||||
<div class="form-vertical">
|
||||
<div class="control-group">
|
||||
<SubscribeCard @cardElement={{cardElement}} class="input-xxlarge" />
|
||||
<SubscribeCard @cardElement={{this.cardElement}} class="input-xxlarge" />
|
||||
</div>
|
||||
|
||||
<SaveControls
|
||||
@action={{action "updatePaymentMethod"}}
|
||||
@saved={{saved}}
|
||||
@saveDisabled={{loading}}
|
||||
@saved={{this.saved}}
|
||||
@saveDisabled={{this.loading}}
|
||||
/>
|
||||
</div>
|
||||
@@ -1,4 +1,4 @@
|
||||
{{#if model}}
|
||||
{{#if this.model}}
|
||||
<table class="table discourse-subscriptions-user-table">
|
||||
<thead>
|
||||
<th>{{i18n "discourse_subscriptions.user.subscriptions.id"}}</th>
|
||||
@@ -11,7 +11,7 @@
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each model as |subscription|}}
|
||||
{{#each this.model as |subscription|}}
|
||||
<tr>
|
||||
<td>{{subscription.id}}</td>
|
||||
<td>{{subscription.product.name}}</td>
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@discourse/lint-configs": "2.0.1",
|
||||
"@discourse/lint-configs": "2.2.1",
|
||||
"ember-template-lint": "6.0.0",
|
||||
"eslint": "9.14.0",
|
||||
"prettier": "2.8.8"
|
||||
|
||||
Generated
+241
-256
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user