mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-03 08:25:06 +03:00
f9231afa2a
refs: https://github.com/TryGhost/Team/issues/1594 - this much more matches the style of the design - it now covers the anchor and engagement charts - has better fake data for all charts under the notice - tweaked things for this in dark mode
37 lines
910 B
JavaScript
37 lines
910 B
JavaScript
import Component from '@glimmer/component';
|
|
import {action} from '@ember/object';
|
|
import {inject as service} from '@ember/service';
|
|
|
|
export default class DashboardDashboardV5Component extends Component {
|
|
@service dashboardStats;
|
|
|
|
@action
|
|
onInsert() {
|
|
this.dashboardStats.loadSiteStatus();
|
|
}
|
|
|
|
get isLoading() {
|
|
return this.dashboardStats.siteStatus === null;
|
|
}
|
|
|
|
get totalMembers() {
|
|
return this.dashboardStats.memberCounts?.total ?? 0;
|
|
}
|
|
|
|
get isTotalMembersZero() {
|
|
return this.dashboardStats.memberCounts && this.totalMembers === 0;
|
|
}
|
|
|
|
get hasPaidTiers() {
|
|
return this.dashboardStats.siteStatus?.hasPaidTiers;
|
|
}
|
|
|
|
get areNewslettersEnabled() {
|
|
return this.dashboardStats.siteStatus?.newslettersEnabled;
|
|
}
|
|
|
|
get areMembersEnabled() {
|
|
return this.dashboardStats.siteStatus?.membersEnabled;
|
|
}
|
|
}
|