mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-29 13:52:10 +03:00
Wired free trial offer UI in offers list
refs https://github.com/TryGhost/Team/issues/1726 - refines UI for a trial offer in offer list
This commit is contained in:
parent
b8acc9ef19
commit
7130fc2833
@ -44,7 +44,11 @@ export default class MembersController extends Controller {
|
||||
const price = offer.cadence === 'month' ? tier.monthlyPrice : tier.yearlyPrice;
|
||||
offer.finalCurrency = offer.currency || tier.currency;
|
||||
offer.originalPrice = price;
|
||||
offer.updatedPrice = offer.type === 'fixed' ? (price - offer.amount) : (price - ((price * offer.amount) / 100));
|
||||
if (offer.type !== 'trial') {
|
||||
offer.updatedPrice = offer.type === 'fixed' ? (price - offer.amount) : (price - ((price * offer.amount) / 100));
|
||||
} else {
|
||||
offer.updatedPrice = offer.originalPrice;
|
||||
}
|
||||
return offer;
|
||||
});
|
||||
}
|
||||
|
@ -64,17 +64,23 @@
|
||||
{{#if (feature 'freeTrial')}}
|
||||
{{#if (eq offer.type 'trial')}}
|
||||
<span class="pink">{{svg-jar "offer"}}</span>
|
||||
<span class="pink fw6"><span class="ttu">21</span> DAYS FREE</span>
|
||||
<span class="pink fw6"><span class="ttu">{{offer.amount}}</span> DAYS FREE</span>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
<span class="dib ml1 midgrey ttc"> –
|
||||
{{if (eq offer.duration 'once') "First-payment" "Repeating"}}
|
||||
</span>
|
||||
{{#if (not (eq offer.type 'trial'))}}
|
||||
<span class="dib ml1 midgrey ttc"> –
|
||||
{{if (eq offer.duration 'once') "First-payment" "Repeating"}}
|
||||
</span>
|
||||
{{/if}}
|
||||
</span>
|
||||
</LinkTo>
|
||||
<LinkTo @route="offer" @model={{offer}} class="gh-list-data">
|
||||
<span>{{currency-symbol offer.finalCurrency}}{{gh-price-amount offer.updatedPrice}}</span>
|
||||
<span class="midgrey strike ml2">{{currency-symbol offer.finalCurrency}}{{gh-price-amount offer.originalPrice}}</span>
|
||||
{{#if (eq offer.type 'trial')}}
|
||||
<span>{{currency-symbol offer.finalCurrency}}{{gh-price-amount offer.originalPrice}}</span>
|
||||
{{else}}
|
||||
<span>{{currency-symbol offer.finalCurrency}}{{gh-price-amount offer.updatedPrice}}</span>
|
||||
<span class="midgrey strike ml2">{{currency-symbol offer.finalCurrency}}{{gh-price-amount offer.originalPrice}}</span>
|
||||
{{/if}}
|
||||
</LinkTo>
|
||||
<LinkTo @route="offer" @model={{offer}} class="gh-list-data">
|
||||
<span class="midgrey">{{offer.redemptionCount}}</span>
|
||||
|
Loading…
Reference in New Issue
Block a user