mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
Added percent class to newsletter open rate on Dashboard
This commit is contained in:
parent
6dd07c1421
commit
b053f1d284
@ -183,6 +183,7 @@ export default class DashboardController extends Controller {
|
||||
const percentGrowth = rangeStartOpenRate !== 0 ? ((rangeEndOpenRate - rangeStartOpenRate) / rangeStartOpenRate) * 100 : 0;
|
||||
this.newsletterOpenRatesData = {
|
||||
percentGrowth: percentGrowth.toFixed(1),
|
||||
percentClass: (percentGrowth > 0 ? 'positive' : (percentGrowth < 0 ? 'negative' : '')),
|
||||
current: rangeEndOpenRate,
|
||||
options: {
|
||||
rangeInDays: 30
|
||||
|
@ -122,7 +122,7 @@
|
||||
|
||||
<div class="data-container">
|
||||
<div class="data">{{this.newsletterOpenRatesData.current}}%</div>
|
||||
<div class="growth {{this.mrrStatsData.percentClass}}">{{this.newsletterOpenRatesData.percentGrowth}}%</div>
|
||||
<div class="growth {{this.newsletterOpenRatesData.percentClass}}">{{this.newsletterOpenRatesData.percentGrowth}}%</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="gh-dashboard-chart small">
|
||||
|
Loading…
Reference in New Issue
Block a user