mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-02 08:13:34 +03:00
71d830e1c9
ref
https://linear.app/tryghost/issue/PA-71/remove-cache-bust-from-projs-in-admin
ref
15ed2eb245
- This cache buster was added in March to mitigate a client side error in pro.js,
to effectively force browsers to redownload the fixed version of the file.
- It's not needed anymore, as the error has been fixed for a few months
now, so we can safely remove it.
48 lines
1.3 KiB
JavaScript
48 lines
1.3 KiB
JavaScript
import Controller from '@ember/controller';
|
|
import {inject} from 'ghost-admin/decorators/inject';
|
|
import {inject as service} from '@ember/service';
|
|
|
|
export default class ApplicationController extends Controller {
|
|
@service billing;
|
|
@service explore;
|
|
@service router;
|
|
@service session;
|
|
@service settings;
|
|
@service ui;
|
|
@service upgradeStatus;
|
|
|
|
@inject config;
|
|
|
|
get showBilling() {
|
|
return this.config.hostSettings?.billing?.enabled;
|
|
}
|
|
|
|
get showScriptExtension() {
|
|
const {session} = this;
|
|
|
|
if (!session.isAuthenticated || !session.user) {
|
|
return false;
|
|
}
|
|
|
|
return this.config.clientExtensions?.script;
|
|
}
|
|
|
|
get showNavMenu() {
|
|
let {router, session, ui} = this;
|
|
|
|
// if we're in fullscreen mode don't show the nav menu
|
|
if (ui.isFullScreen) {
|
|
return false;
|
|
}
|
|
|
|
// we need to defer showing the navigation menu until the session.user
|
|
// is populated so that gh-user-can-admin has the correct data
|
|
if (!session.isAuthenticated || !session.user) {
|
|
return false;
|
|
}
|
|
|
|
return (router.currentRouteName !== 'error404' || session.isAuthenticated)
|
|
&& !router.currentRouteName.match(/(signin|signup|setup|reset)/);
|
|
}
|
|
}
|