diff --git a/ghost/admin/app/components/modals/settings/about.js b/ghost/admin/app/components/modals/settings/about.js index b209d51dd9..079d82e7a2 100644 --- a/ghost/admin/app/components/modals/settings/about.js +++ b/ghost/admin/app/components/modals/settings/about.js @@ -12,4 +12,43 @@ export default class AboutModal extends Component { this.isTesting = config.environment === 'test'; } } + + get copyrightYear() { + const date = new Date(); + return date.getFullYear(); + } + + get linkToGitHubReleases() { + // Don't link to GitHub Releases if the version contains the + // pre-release identifier + return !this.config.get('version').includes('-pre.'); + } + + get showSystemInfo() { + const isPro = !!this.config.get('hostSettings')?.siteId; + + // Don't show any system info for Pro + if (isPro) { + return false; + } + + return true; + } + + get showDatabaseWarning() { + const isProduction = !!this.config.get('environment').match?.(/production/i); + const database = this.config.get('database'); + + // Show a warning if we're in production and not using MySQL 8 + if (isProduction && database !== 'mysql8') { + return true; + } + + // Show a warning if we're in development and using MySQL 5 + if (!isProduction && database === 'mysql5') { + return true; + } + + return false; + } } diff --git a/ghost/admin/app/controllers/whatsnew.js b/ghost/admin/app/controllers/whatsnew.js index 7527fc4027..d494842f9f 100644 --- a/ghost/admin/app/controllers/whatsnew.js +++ b/ghost/admin/app/controllers/whatsnew.js @@ -2,48 +2,5 @@ import Controller from '@ember/controller'; import {inject as service} from '@ember/service'; export default class WhatsNewController extends Controller { - @service config; - @service upgradeStatus; @service whatsNew; - - queryParams = ['entry']; - - get copyrightYear() { - const date = new Date(); - return date.getFullYear(); - } - - get linkToGitHubReleases() { - // Don't link to GitHub Releases if the version contains the - // pre-release identifier - return !this.config.get('version').includes('-pre.'); - } - - get showSystemInfo() { - const isPro = !!this.config.get('hostSettings')?.siteId; - - // Don't show any system info for Pro - if (isPro) { - return false; - } - - return true; - } - - get showDatabaseWarning() { - const isProduction = !!this.config.get('environment').match?.(/production/i); - const database = this.config.get('database'); - - // Show a warning if we're in production and not using MySQL 8 - if (isProduction && database !== 'mysql8') { - return true; - } - - // Show a warning if we're in development and using MySQL 5 - if (!isProduction && database === 'mysql5') { - return true; - } - - return false; - } }