Ghost/ghost/admin/app/components/dashboard/dashboard-v5.js
James Morris e4891e3462 Moved the new dashboard over to a CSS Grid layout and cleaned up a ton of the code
refs: https://github.com/TryGhost/Team/issues/1507

- changed the layout over to use css grids instead of the random flex and divs
- cleaned up the based dashboard-v5 file so its rendering much cleaner components
- refactored and took out a ton of old css that wasn't needed anymore
- moved the dashboard-v5 css into it's own css file to keep things cleaner
- includes a few stylistic changes along the way
2022-04-12 16:04:20 +01:00

29 lines
703 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 hasPaidTiers() {
return this.dashboardStats.siteStatus?.hasPaidTiers;
}
get areNewslettersEnabled() {
return this.dashboardStats.siteStatus?.newslettersEnabled;
}
get areMembersEnabled() {
return this.dashboardStats.siteStatus?.membersEnabled;
}
}