Ghost/ghost/admin/app/services/upgrade-status.js
Kevin Ansfield 9adbcd1fd0 Match service/controller import to ember-modules-codemod style for consistency
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.
2017-10-30 09:38:01 +00:00

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'}
);
}
});