mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Added static Mentions widget behind the flag
refs https://github.com/TryGhost/Team/issues/2481
This commit is contained in:
parent
9db27cfd50
commit
3dc85b0397
3 changed files with 60 additions and 1 deletions
|
@ -11,6 +11,12 @@
|
|||
@label="Member activity" />
|
||||
</button>
|
||||
{{/if}}
|
||||
{{#if (feature 'webmentions')}}
|
||||
<button type="button" class="gh-dashboard-tab {{if this.mentionsTabSelected 'is-selected'}}" {{on "click" this.changeTabToMentions}}>
|
||||
<Dashboard::Parts::Metric
|
||||
@label="Mentions" />
|
||||
</button>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#if this.postsTabSelected}}
|
||||
<div class="gh-dashboard-recents-posts gh-dashboard-list {{unless this.areNewslettersEnabled 'is-single'}}">
|
||||
|
@ -65,7 +71,7 @@
|
|||
<LinkTo @route="posts" @query={{reset-query-params "posts"}}>View all posts →</LinkTo>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
{{else if this.activityTabSelected}}
|
||||
<div class="gh-dashboard-recents-activity gh-dashboard-list" data-test-dashboard-member-activity>
|
||||
<div class="gh-dashboard-list-header">
|
||||
<div class="gh-dashboard-list-title">Member</div>
|
||||
|
@ -132,6 +138,41 @@
|
|||
<LinkTo @route="members-activity" @query={{reset-query-params "members-activity"}}>View all member activity →</LinkTo>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
{{#if (feature 'webmentions')}}
|
||||
{{!-- Recent mentions --}}
|
||||
<div class="gh-dashboard-recents-mentions gh-dashboard-list">
|
||||
<div class="gh-dashboard-list-header">
|
||||
<div class="gh-dashboard-list-title">Publication</div>
|
||||
<div class="gh-dashboard-list-title">Mentioned</div>
|
||||
<div class="gh-dashboard-list-title">Time</div>
|
||||
</div>
|
||||
<div class="gh-dashboard-list-body">
|
||||
{{!-- TODO: Switch to LinkTo --}}
|
||||
<a href="#" class="gh-dashboard-list-item permalink">
|
||||
<div class="gh-dashboard-list-item-sub">
|
||||
<img src="https://blog.mozilla.org/wp-content/themes/foxtail/assets/images/favicons/apple-touch-icon.png" alt="Mozilla" class="w5 h5 mr2 flex-shrink-0" />
|
||||
<span class="gh-dashboard-list-text">Mozilla</span>
|
||||
</div>
|
||||
<div class="gh-dashboard-list-item-sub">
|
||||
<span class="gh-dashboard-list-subtext gh-dashboard-recent-mentioned">
|
||||
Norway’s Ambitious Plan to Designate 10 New National Parks
|
||||
</span>
|
||||
</div>
|
||||
<div class="gh-dashboard-list-item-sub gh-dashboard-list gh-dashboard-list-item-date">
|
||||
<span class="gh-dashboard-list-subtext">2 hours ago</span>
|
||||
</div>
|
||||
</a>
|
||||
{{!-- Empty state --}}
|
||||
{{!-- <div class="gh-dashboard-list-empty">
|
||||
<p>No mentions yet.</p>
|
||||
</div> --}}
|
||||
</div>
|
||||
<div class="gh-dashboard-list-footer">
|
||||
<LinkTo @route="posts" @query={{reset-query-params "posts"}}>View all mentions →</LinkTo>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</article>
|
||||
</section>
|
||||
|
|
|
@ -26,6 +26,11 @@ export default class Recents extends Component {
|
|||
this.selected = 'activity';
|
||||
}
|
||||
|
||||
@action
|
||||
changeTabToMentions() {
|
||||
this.selected = 'mentions';
|
||||
}
|
||||
|
||||
get postsTabSelected() {
|
||||
return (this.selected === 'posts');
|
||||
}
|
||||
|
@ -34,6 +39,10 @@ export default class Recents extends Component {
|
|||
return (this.selected === 'activity');
|
||||
}
|
||||
|
||||
get mentionsTabSelected() {
|
||||
return (this.selected === 'mentions');
|
||||
}
|
||||
|
||||
get areMembersEnabled() {
|
||||
return this.dashboardStats.siteStatus?.membersEnabled;
|
||||
}
|
||||
|
|
|
@ -1550,6 +1550,11 @@ Dashboard Recents */
|
|||
grid-template-columns: 25% 25% 35% 15%;
|
||||
}
|
||||
|
||||
.gh-dashboard-recents-mentions .gh-dashboard-list-header,
|
||||
.gh-dashboard-recents-mentions .gh-dashboard-list-item {
|
||||
grid-template-columns: 20% 65% 15%;
|
||||
}
|
||||
|
||||
.gh-dashboard-recents-activity .gh-dashboard-list-title:nth-child(2),
|
||||
.gh-dashboard-recents-activity .gh-dashboard-list-item .gh-dashboard-list-item-sub:nth-child(2) {
|
||||
margin-left: -4px; /* grid layout adjustments */
|
||||
|
@ -1569,6 +1574,10 @@ Dashboard Recents */
|
|||
padding: 0 32px 0 0;
|
||||
}
|
||||
|
||||
.gh-dashboard-recent-mentioned {
|
||||
color: var(--black);
|
||||
}
|
||||
|
||||
|
||||
/* ---------------------------------
|
||||
Dashboard Resources */
|
||||
|
|
Loading…
Add table
Reference in a new issue