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:
parent
0de195d052
commit
4f59aa8e25
1 changed files with 4 additions and 15 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue