diff --git a/ghost/admin/app/controllers/whatsnew.js b/ghost/admin/app/controllers/whatsnew.js index acc6b0c8f5..11c94a1576 100644 --- a/ghost/admin/app/controllers/whatsnew.js +++ b/ghost/admin/app/controllers/whatsnew.js @@ -1,17 +1,26 @@ import Controller from '@ember/controller'; -import {computed} from '@ember/object'; import {inject as service} from '@ember/service'; -/* eslint-disable ghost/ember/alias-model-in-controller */ -export default Controller.extend({ - config: service(), - upgradeStatus: service(), - whatsNew: service(), +export default class WhatsNewController extends Controller { + @service config; + @service upgradeStatus; + @service whatsNew; - queryParams: ['entry'], + queryParams = ['entry']; - copyrightYear: computed(function () { - let date = new Date(); + get copyrightYear() { + const date = new Date(); return date.getFullYear(); - }) -}); + } + + get showDatabaseWarning() { + const isProduction = !!this.config.get('environment').match?.(/production/i); + const isPro = !!this.config.get('hostSettings')?.siteId; + + if (isProduction && !isPro) { + return true; + } + + return false; + } +} diff --git a/ghost/admin/app/templates/whatsnew.hbs b/ghost/admin/app/templates/whatsnew.hbs index 9c5fd3a1b7..7494d38b3f 100644 --- a/ghost/admin/app/templates/whatsnew.hbs +++ b/ghost/admin/app/templates/whatsnew.hbs @@ -40,6 +40,7 @@ + {{#if this.upgradeStatus.message}}

@@ -47,6 +48,7 @@

{{/if}} + + + {{#if this.showDatabaseWarning}} +
+

+ Warning: MySQL 8 will be the required database in the next major release of Ghost. Make sure your database is up to date to ensure forwards compatibility. +

+
+ {{/if}} +