0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-15 03:01:37 -05:00

Refactored application controller to Octane patterns

refs https://github.com/TryGhost/Ghost/issues/14101

- migrated to full native class syntax
This commit is contained in:
Kevin Ansfield 2022-10-07 17:56:55 +01:00
parent 0de195d052
commit 4f59aa8e25

View file

@ -1,30 +1,19 @@
import classic from 'ember-classic-decorator';
import {computed} from '@ember/object';
import {reads} from '@ember/object/computed';
import {inject as service} from '@ember/service';
/* eslint-disable ghost/ember/alias-model-in-controller */
import Controller from '@ember/controller';
import {inject as service} from '@ember/service';
@classic
export default class ApplicationController extends Controller {
@service billing;
@service explore;
@service config;
@service dropdown;
@service feature;
@service router;
@service session;
@service settings;
@service ui;
@reads('config.hostSettings.billing.enabled')
showBilling;
get showBilling() {
return this.config.hostSettings?.billing?.enabled;
}
@computed(
'router.currentRouteName',
'session.{isAuthenticated,user}',
'ui.isFullScreen'
)
get showNavMenu() {
let {router, session, ui} = this;