mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 07:09:48 +03:00
9adbcd1fd0
no issue Automated tools, code generators, and editor integrations are increasingly standardising on the import style used in `ember-modules-codemod`. Our import style differed a little with regards to service/controller injection imports which meant we were starting to see inconsistent naming.
23 lines
695 B
JavaScript
23 lines
695 B
JavaScript
import Service, {inject as service} from '@ember/service';
|
|
|
|
export default Service.extend({
|
|
isRequired: false,
|
|
|
|
notifications: service(),
|
|
|
|
maintenanceAlert() {
|
|
this.get('notifications').showAlert(
|
|
'Sorry, Ghost is currently undergoing maintenance, please wait a moment then try again.',
|
|
{type: 'error', key: 'api-error.under-maintenance'}
|
|
);
|
|
},
|
|
|
|
requireUpgrade() {
|
|
this.set('isRequired', true);
|
|
this.get('notifications').showAlert(
|
|
'Ghost has been upgraded, please copy any unsaved data and refresh the page to continue.',
|
|
{type: 'error', key: 'api-error.upgrade-required'}
|
|
);
|
|
}
|
|
});
|