mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-18 16:01:40 +03:00
199 lines
11 KiB
Handlebars
199 lines
11 KiB
Handlebars
<section class="gh-canvas" {{scroll-top}}>
|
|
<div class="gh-dashboard">
|
|
{{#if (feature 'sourceAttribution')}}
|
|
<GhCanvasHeader class="gh-canvas-header sticky">
|
|
<h2 class="gh-canvas-title" data-test-screen-title>
|
|
Dashboard
|
|
</h2>
|
|
{{#unless this.isTotalMembersZero}}
|
|
<div class="gh-dashboard-select">
|
|
<div>
|
|
{{#if (feature 'webmentions')}}
|
|
{{!-- Mentions widget using a GhBasicDropdown component --}}
|
|
|
|
{{!-- <GhBasicDropdown @horizontalPosition="left" @verticalPosition="above" @calculatePosition={{this.userDropdownPosition}} as |dropdown|>
|
|
<dropdown.Trigger class="outline-0 pointer">
|
|
<a href="#" class="gh-dashboard-mentions-icon">
|
|
{{svg-jar "notification-bell"}}
|
|
</a>
|
|
</dropdown.Trigger>
|
|
|
|
<dropdown.Content class="">
|
|
<div class="gh-dashboard-mentions">
|
|
<div class="gh-dashboard-mentions-header">
|
|
<h2 class="gh-dashboard-mentions-heading">Mentions</h2>
|
|
<a href="" class="gh-dashboard-mentions-see-all">View all mentions →</a>
|
|
</div>
|
|
<div>
|
|
<a href="#" class="gh-dashboard-mention" rel="noreferrer noopener" target="_blank">
|
|
<div class="gh-dashboard-mention-content">
|
|
<img src="assets/img/orb-squircle.png" alt="{{mention.sourceSiteTitle}}" class="w5 h5 mr2 flex-shrink-0" />
|
|
<span class="gh-dashboard-mention-title">Lever News</span>
|
|
<span>mentioned</span>
|
|
<span class="gh-dashboard-mention-target">3 links</span>
|
|
</div>
|
|
<span class="gh-dashboard-mention-timestamp">{{moment-from-now mention.timestamp}}</span>
|
|
</a>
|
|
<a href="#" class="gh-dashboard-mention" rel="noreferrer noopener" target="_blank">
|
|
<div class="gh-dashboard-mention-content">
|
|
<img src="assets/img/orb-squircle.png" alt="{{mention.sourceSiteTitle}}" class="w5 h5 mr2 flex-shrink-0" />
|
|
<span class="gh-dashboard-mention-title">Lever News</span>
|
|
<span>mentioned</span>
|
|
<span class="gh-dashboard-mention-target">3 links</span>
|
|
</div>
|
|
<span class="gh-dashboard-mention-timestamp">{{moment-from-now mention.timestamp}}</span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</dropdown.Content>
|
|
</GhBasicDropdown> --}}
|
|
|
|
{{!-- Mentions widget using a popover component --}}
|
|
|
|
<a href="#" class="gh-dashboard-mentions-icon">
|
|
{{!-- State: No new mentions --}}
|
|
{{!-- {{svg-jar "notification-bell"}} --}}
|
|
|
|
{{!-- State: at least one new mention --}}
|
|
{{svg-jar "notification-bell-indicator"}}
|
|
</a>
|
|
<EmberPopover @tooltipClass="popover" @spacing={{30}} @arrowClass="popover-arrow" @side="down">
|
|
<div class="gh-dashboard-mentions">
|
|
<div class="gh-dashboard-mentions-header">
|
|
<h2 class="gh-dashboard-mentions-heading">Mentions</h2>
|
|
<a href="" class="gh-dashboard-mentions-see-all">View all mentions →</a>
|
|
</div>
|
|
<div>
|
|
<a href="#" class="gh-dashboard-mention" rel="noreferrer noopener" target="_blank">
|
|
<div class="gh-dashboard-mention-content">
|
|
<img src="assets/img/orb-squircle.png" alt="" role="none" class="w5 h5 mr2 flex-shrink-0" />
|
|
<span class="gh-dashboard-mention-title">Lever News</span>
|
|
<span>mentioned</span>
|
|
<span class="gh-dashboard-mention-target">3 links</span>
|
|
</div>
|
|
<span class="gh-dashboard-mention-timestamp">2 days ago</span>
|
|
</a>
|
|
<a href="#" class="gh-dashboard-mention" rel="noreferrer noopener" target="_blank">
|
|
<div class="gh-dashboard-mention-content">
|
|
<img src="assets/img/orb-squircle.png" alt="" role="none" class="w5 h5 mr2 flex-shrink-0" />
|
|
<span class="gh-dashboard-mention-title">Lever News</span>
|
|
<span>mentioned</span>
|
|
<span class="gh-dashboard-mention-target">3 links</span>
|
|
</div>
|
|
<span class="gh-dashboard-mention-timestamp">2 days ago</span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</EmberPopover>
|
|
{{/if}}
|
|
</div>
|
|
|
|
<PowerSelect
|
|
@selected={{this.selectedDaysOption}}
|
|
@options={{this.daysOptions}}
|
|
@searchEnabled={{false}}
|
|
@onChange={{this.onDaysChange}}
|
|
@triggerComponent={{component "gh-power-select/trigger"}}
|
|
@triggerClass="gh-contentfilter-menu-trigger"
|
|
@dropdownClass="gh-contentfilter-menu-dropdown is-narrow"
|
|
@matchTriggerWidth={{false}}
|
|
@horizontalPosition="right"
|
|
as |option|
|
|
>
|
|
{{#if option.name}}{{option.name}}{{else}}<span class="red">Unknown option</span>{{/if}}
|
|
</PowerSelect>
|
|
</div>
|
|
{{/unless}}
|
|
</GhCanvasHeader>
|
|
{{else}}
|
|
<div class="gh-dashboard-inner">
|
|
<GhCanvasHeader class="gh-canvas-header">
|
|
<h2 class="gh-canvas-title" data-test-screen-title>
|
|
Dashboard
|
|
</h2>
|
|
</GhCanvasHeader>
|
|
</div>
|
|
{{/if}}
|
|
<section class="gh-dashboard-layout">
|
|
{{#if this.isLoading }}
|
|
<GhLoadingSpinner />
|
|
{{else}}
|
|
{{#if this.areMembersEnabled}}
|
|
{{#if this.hasPaidTiers}}
|
|
<Dashboard::Charts::Overview />
|
|
{{/if}}
|
|
|
|
<div class="gh-dashboard-group {{if this.isTotalMembersZero 'is-zero'}}">
|
|
{{#if (feature 'sourceAttribution')}}
|
|
<Dashboard::Charts::AnchorAttribution />
|
|
{{else}}
|
|
<Dashboard::Charts::Anchor />
|
|
{{/if}}
|
|
{{#if (feature 'sourceAttribution')}}
|
|
{{#if this.hasPaidTiers}}
|
|
<section class="gh-dashboard-section">
|
|
<article class="gh-dashboard-box gh-dashboard-minicharts-attribution">
|
|
<Dashboard::Charts::PaidBreakdown />
|
|
<Dashboard::Charts::PaidMix />
|
|
</article>
|
|
</section>
|
|
{{/if}}
|
|
{{#unless this.membersUtils.isMembersInviteOnly}}
|
|
<Dashboard::Charts::Attribution />
|
|
{{/unless}}
|
|
{{/if}}
|
|
{{#if this.areNewslettersEnabled}}
|
|
<Dashboard::Charts::Engagement />
|
|
{{/if}}
|
|
|
|
{{#if this.isTotalMembersZero}}
|
|
<Dashboard::Parts::Zero />
|
|
{{/if}}
|
|
</div>
|
|
{{/if}}
|
|
|
|
<div class="gh-dashboard-recents-mentions">
|
|
<Dashboard::Charts::Recents />
|
|
</div>
|
|
|
|
<div class="gh-dashboard-split gh-dashboard-box is-secondary">
|
|
<Dashboard::Resources::Resources />
|
|
<Dashboard::Resources::Newsletter />
|
|
</div>
|
|
|
|
<Dashboard::Resources::ExploreFeed />
|
|
|
|
<div class="gh-dashboard-split gh-dashboard-box no-boarder">
|
|
<Dashboard::Resources::Community />
|
|
<Dashboard::Resources::WhatsNew />
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if (not (feature 'sourceAttribution'))}}
|
|
{{#unless this.isTotalMembersZero}}
|
|
<div class="gh-dashboard-select">
|
|
<PowerSelect
|
|
@selected={{this.selectedDaysOption}}
|
|
@options={{this.daysOptions}}
|
|
@searchEnabled={{false}}
|
|
@onChange={{this.onDaysChange}}
|
|
@triggerComponent={{component "gh-power-select/trigger"}}
|
|
@triggerClass="gh-contentfilter-menu-trigger"
|
|
@dropdownClass="gh-contentfilter-menu-dropdown is-narrow"
|
|
@matchTriggerWidth={{false}}
|
|
@horizontalPosition="right"
|
|
as |option|
|
|
>
|
|
{{#if option.name}}{{option.name}}{{else}}<span class="red">Unknown option</span>{{/if}}
|
|
</PowerSelect>
|
|
</div>
|
|
{{/unless}}
|
|
{{/if}}
|
|
</section>
|
|
|
|
{{#if (enable-developer-experiments)}}
|
|
<Dashboard::Prototype::ControlPanel />
|
|
{{/if}}
|
|
</div>
|
|
</section>
|