mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Updated portal preview in edit/add tier
refs https://github.com/TryGhost/Team/issues/1757
This commit is contained in:
parent
71b599b632
commit
9e43fa9332
3 changed files with 61 additions and 15 deletions
|
@ -219,21 +219,47 @@
|
|||
<span class="amount">0</span>
|
||||
</div>
|
||||
{{else}}
|
||||
{{#if this.stripeYearlyAmount}}
|
||||
<div class="gh-portal-tier-price">
|
||||
<span class="currency-sign">{{currency-symbol this.currency}}</span>
|
||||
{{#if (eq this.previewCadence "monthly")}}
|
||||
<span class="amount">
|
||||
{{format-number this.stripeMonthlyAmount}}
|
||||
</span>
|
||||
<span class="billing-period">/month</span>
|
||||
{{else}}
|
||||
<span class="amount">
|
||||
{{format-number this.stripeYearlyAmount}}
|
||||
</span>
|
||||
<span class="billing-period">/year</span>
|
||||
{{#if (feature 'freeTrial')}}
|
||||
{{#if this.freeTrialEnabled}}
|
||||
<div class="gh-portal-tier-price">
|
||||
<span class="amount">{{ this.trialDays }} days free</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{#if this.stripeYearlyAmount}}
|
||||
{{#if (feature 'freeTrial')}}
|
||||
{{#unless this.freeTrialEnabled}}
|
||||
<div class="gh-portal-tier-price">
|
||||
<span class="currency-sign">{{currency-symbol this.currency}}</span>
|
||||
{{#if (eq this.previewCadence "monthly")}}
|
||||
<span class="amount">
|
||||
{{format-number this.stripeMonthlyAmount}}
|
||||
</span>
|
||||
<span class="billing-period">/month</span>
|
||||
{{else}}
|
||||
<span class="amount">
|
||||
{{format-number this.stripeYearlyAmount}}
|
||||
</span>
|
||||
<span class="billing-period">/year</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/unless}}
|
||||
{{else}}
|
||||
<div class="gh-portal-tier-price">
|
||||
<span class="currency-sign">{{currency-symbol this.currency}}</span>
|
||||
{{#if (eq this.previewCadence "monthly")}}
|
||||
<span class="amount">
|
||||
{{format-number this.stripeMonthlyAmount}}
|
||||
</span>
|
||||
<span class="billing-period">/month</span>
|
||||
{{else}}
|
||||
<span class="amount">
|
||||
{{format-number this.stripeYearlyAmount}}
|
||||
</span>
|
||||
<span class="billing-period">/year</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#if (and (eq this.previewCadence "yearly") (gt this.discountValue 0))}}
|
||||
<span class="gh-portal-discount-label">
|
||||
<span style="background-color: {{this.settings.accentColor}}"></span>
|
||||
|
@ -246,9 +272,19 @@
|
|||
<span class="billing-period">/year</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#if (feature 'freeTrial')}}
|
||||
{{#if this.freeTrialEnabled}}
|
||||
<span class="after-trial-amount">Then
|
||||
{{#if (eq this.previewCadence "yearly")}}
|
||||
{{currency-symbol this.currency}}{{ format-number this.stripeYearlyAmount }}/year
|
||||
{{else}}
|
||||
{{currency-symbol this.currency}}{{ format-number this.stripeMonthlyAmount }}/month
|
||||
{{/if}}
|
||||
</span>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<div class="gh-portal-tier-card-details">
|
||||
|
|
|
@ -82,6 +82,7 @@ export default class ModalTierPrice extends ModalBase {
|
|||
this.calculateDiscount();
|
||||
if (this.tier.get('trialDays')) {
|
||||
this.freeTrialEnabled = true;
|
||||
this.trialDays = this.tier.get('trialDays');
|
||||
}
|
||||
this.accentColorStyle = htmlSafe(`color: ${this.settings.get('accentColor')}`);
|
||||
}
|
||||
|
|
|
@ -759,6 +759,15 @@
|
|||
opacity: 0.35;
|
||||
}
|
||||
|
||||
.gh-tier-form-tierpreview .after-trial-amount {
|
||||
display: block;
|
||||
font-size: 1.5rem;
|
||||
font-weight: 500;
|
||||
color: #7f7f7f;
|
||||
margin-top: 12px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.gh-tier-setting-title {
|
||||
font-size: 1.3rem;
|
||||
font-weight: 600;
|
||||
|
|
Loading…
Add table
Reference in a new issue