mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Hid members data in dashboard when signup access is "Nobody"
refs https://github.com/TryGhost/Team/issues/579 Members is essentially disabled when signup access is set to "Nobody" so it doesn't make sense to show members related charts and actions in the dashboard. - adds `showMembersData` property to the dashboard controller that returns `false` when members is disabled - wraps members related sections of the dashboard in conditionals
This commit is contained in:
parent
a271aa53fd
commit
139ba9413a
2 changed files with 78 additions and 70 deletions
|
@ -42,6 +42,10 @@ export default class DashboardController extends Controller {
|
|||
});
|
||||
}
|
||||
|
||||
get showMembersData() {
|
||||
return this.settings.get('membersSignupAccess') !== 'none';
|
||||
}
|
||||
|
||||
initialise() {
|
||||
this.loadEvents();
|
||||
this.loadTopMembers();
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{else}}
|
||||
{{else if this.showMembersData}}
|
||||
<section class="gh-dashboard-area charts">
|
||||
<div class="gh-dashboard-box mrr">
|
||||
<div class="flex items-center justify-between">
|
||||
|
@ -141,6 +141,7 @@
|
|||
<div class="gh-dashboard-container start-contents">
|
||||
<div class="gh-dashboard-box blogpost">
|
||||
<h2>Start creating content</h2>
|
||||
{{#if this.showMembersData}}
|
||||
<LinkTo @route="members">
|
||||
<span class="icon">{{svg-jar "members"}}</span>
|
||||
<div>
|
||||
|
@ -148,6 +149,7 @@
|
|||
<p>Add yourself or import members from CSV</p>
|
||||
</div>
|
||||
</LinkTo>
|
||||
{{/if}}
|
||||
<LinkTo @route="editor.new" @model="post">
|
||||
<span class="icon green">{{svg-jar "posts"}}</span>
|
||||
<div>
|
||||
|
@ -256,6 +258,7 @@
|
|||
</section>
|
||||
|
||||
<section class="gh-dashboard-area members-activity">
|
||||
{{#if this.showMembersData}}
|
||||
{{#if this.topMembersData}}
|
||||
<div class="gh-dashboard-box grey top-members">
|
||||
<div class="gh-dashboard-header-container">
|
||||
|
@ -325,6 +328,7 @@
|
|||
</div>
|
||||
</div>
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
|
||||
{{#unless (or whatsNewEntriesLoading whatsNewEntriesError)}}
|
||||
<div class="gh-dashboard-box whats-new">
|
||||
|
|
Loading…
Add table
Reference in a new issue