Ghost/ghost/admin/app/components/dashboard/dashboard-v5.hbs
James Morris 8fe18d7e30 Dashboard consolidated graph (#2323)
* Basic work to combine the three line graphs for the new dashboard

refs: https://github.com/TryGhost/Team/issues/1467

- combined three line graphs into one main one at the top
- still working on this, so some code is a little rough

* Tidying up a few bits of consolidated graph in new dashboard

refs: https://github.com/TryGhost/Team/issues/1467

* Updated chart anchor component for removed member counts

no issue

* Updated chart paid members to not reload on days change

no refs

* Moved did-insert to top element in chart-anchor

* Fixed chart anchor to use filled member data

* Replaced chart anchor divs with buttons

* Tweaking up the paid graphs below anchor to improve visuals

refs: https://github.com/TryGhost/Team/issues/1467

* Fixed missing type attributes on buttons in chart anchor

* Updated MMR to MRR for the new consolidated graph

refs: https://github.com/TryGhost/Team/issues/1467

* Added real MRR to chart anchor

* Added open rate percentage data to chart email

Co-authored-by: Simon Backx <simon@ghost.org>
2022-04-01 14:53:55 +01:00

127 lines
5.9 KiB
Handlebars

<section {{did-insert this.onInsert}}>
{{#if this.isLoading }}
<GhLoadingSpinner />
{{else}}
{{#if this.areMembersEnabled}}
<section class="gh-dashboard5-section gh-dashboard5-anchor">
<article class="gh-dashboard5-box">
<Dashboard::V5::ChartAnchor @days={{this.days}} />
</article>
<div class="prototype-selection">
<PowerSelect
@selected={{this.selectedDaysOption}}
@options={{this.daysOptions}}
@searchEnabled={{false}}
@onChange={{this.onDaysChange}}
@triggerComponent="gh-power-select/trigger"
@triggerClass="gh-contentfilter-menu-trigger"
@dropdownClass="gh-contentfilter-menu-dropdown"
@matchTriggerWidth={{false}}
as |option|
>
{{#if option.name}}{{option.name}}{{else}}<span class="red">Unknown option</span>{{/if}}
</PowerSelect>
</div>
</section>
{{#if this.hasPaidTiers}}
<div class="gh-dashboard5-paid">
<section class="gh-dashboard5-section">
<div class="gh-dashboard5-growth">
<article class="gh-dashboard5-box">
<Dashboard::V5::ChartPaidMembers @days={{this.days}}/>
</article>
<article class="gh-dashboard5-box">
<Dashboard::V5::ChartPaidMix />
</article>
</div>
</section>
</div>
{{/if}}
{{#if this.areNewslettersEnabled}}
<section class="gh-dashboard5-split is-third">
<section class="gh-dashboard5-section gh-dashboard5-email">
<article class="gh-dashboard5-box">
<Dashboard::V5::ChartEmail />
</article>
</section>
<section class="gh-dashboard5-section gh-dashboard5-engagement">
<Dashboard::V5::ChartEngagement />
</section>
</section>
{{else}}
<section class="gh-dashboard5-section gh-dashboard5-engagement">
<Dashboard::V5::ChartEngagement />
</section>
{{/if}}
{{else}}
{{#if this.areNewslettersEnabled}}
<section class="gh-dashboard5-section gh-dashboard5-email">
<article class="gh-dashboard5-box">
<Dashboard::V5::ChartEmail />
</article>
</section>
{{/if}}
{{/if}}
<section class="gh-dashboard5-split">
<section class="gh-dashboard5-section gh-dashboard5-posts">
<article class="gh-dashboard5-box">
<Dashboard::V5::RecentPosts />
</article>
</section>
<section class="gh-dashboard5-section gh-dashboard5-activity">
<Dashboard::V5::RecentActivity />
</section>
</section>
<section class="gh-dashboard5-section">
<div class="gh-main-section gh-offers-help">
<div class="gh-main-section-block">
<div class="gh-main-section-content grey">
<a href="https://ghost.org/help" target="_blank" class="gh-offers-help-card" rel="noopener noreferrer">
<div class="gh-offers-help-content">
<div class="thumbnail" style="background-image: url(assets/img/marketing/offers-1.jpg);"></div>
<div class="text">
<h3>Do something cool in Ghost</h3>
<p>There is a lot of cool things you can do in Ghost and this is just one of them.</p>
</div>
</div>
<div class="gh-btn"><span>Read more</span></div>
</a>
<a href="https://ghost.org/help" target="_blank" class="gh-offers-help-card" rel="noopener noreferrer">
<div class="gh-offers-help-content">
<div class="thumbnail" style="background-image: url(assets/img/marketing/offers-3.jpg);"></div>
<div class="text">
<h3>Do something cool in Ghost</h3>
<p>There is a lot of cool things you can do in Ghost and this is just one of them.</p>
</div>
</div>
<div class="gh-btn"><span>Read more</span></div>
</a>
<a href="https://ghost.org/help" target="_blank" class="gh-offers-help-card" rel="noopener noreferrer">
<div class="gh-offers-help-content">
<div class="thumbnail" style="background-image: url(assets/img/marketing/offers-2.jpg)"></div>
<div class="text">
<h3>Do something cool in Ghost</h3>
<p>There is a lot of cool things you can do in Ghost and this is just one of them.</p>
</div>
</div>
<div class="gh-btn"><span>Read more</span></div>
</a>
</div>
</div>
</div>
</section>
{{/if}}
<Dashboard::V5::PrototypeControlPanel />
</section>