Ghost/ghost/admin/app/components/dashboard/dashboard-v5.hbs
Simon Backx 7833da8365 Added latest newsletters to dashboard 5.0
refs https://github.com/TryGhost/Team/issues/1488

- Includes a new component that fetches the latest X newsletters.
- Displays these newsletters using design from old dashboard.
- Currently shows 10 newsletters, but we'll want to change that later.
- Temporary CSS class added.
2022-04-07 13:02:58 +02:00

97 lines
3.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 id="gh-dashboard5-anchor-selection" 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>
<div id="gh-dashboard5-anchor-globaldate">
March 31, 2022
</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-engagement">
<Dashboard::V5::ChartEngagement />
</section>
<section class="gh-dashboard5-section gh-dashboard5-email">
<article class="gh-dashboard5-box">
<Dashboard::V5::ChartEmail />
</article>
</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">
<article class="gh-dashboard5-box">
<Dashboard::V5::RecentActivity />
</article>
</section>
</section>
<section class="gh-dashboard5-section">
<Dashboard::V5::ResourceGeneral />
</section>
<Dashboard::V5::Resources::WhatsNew />
<Dashboard::V5::Resources::LatestNewsletters />
{{/if}}
<Dashboard::V5::PrototypeControlPanel />
</section>