2022-03-21 19:58:39 +03:00
|
|
|
import Component from '@glimmer/component';
|
2022-03-23 11:51:53 +03:00
|
|
|
import {action} from '@ember/object';
|
|
|
|
import {inject as service} from '@ember/service';
|
2022-03-21 19:58:39 +03:00
|
|
|
|
|
|
|
export default class DashboardDashboardV5Component extends Component {
|
2022-03-23 11:51:53 +03:00
|
|
|
@service dashboardStats;
|
|
|
|
|
2022-03-24 11:01:30 +03:00
|
|
|
@action
|
|
|
|
onInsert() {
|
2022-03-24 14:04:18 +03:00
|
|
|
this.dashboardStats.loadSiteStatus();
|
2022-03-23 18:38:16 +03:00
|
|
|
}
|
|
|
|
|
2022-03-24 14:04:18 +03:00
|
|
|
get isLoading() {
|
|
|
|
return this.dashboardStats.siteStatus === null;
|
|
|
|
}
|
|
|
|
|
2022-03-21 21:02:57 +03:00
|
|
|
get hasPaidTiers() {
|
2022-03-24 14:04:18 +03:00
|
|
|
return this.dashboardStats.siteStatus?.hasPaidTiers;
|
2022-03-21 21:02:57 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get areNewslettersEnabled() {
|
2022-03-24 14:04:18 +03:00
|
|
|
return this.dashboardStats.siteStatus?.newslettersEnabled;
|
2022-03-21 21:02:57 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get areMembersEnabled() {
|
2022-03-24 14:04:18 +03:00
|
|
|
return this.dashboardStats.siteStatus?.membersEnabled;
|
2022-03-21 21:02:57 +03:00
|
|
|
}
|
2022-03-21 19:58:39 +03:00
|
|
|
}
|