mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 10:21:36 +03:00
a85f5fae35
no issue - fix lint errors in lib/gh-koenig - fix ghost:base eslint errors - update ember plugin refs, remove ember-suave plugin refs - remove old jshint refs - add `lint:js` script - switch to `eslint-plugin-ghost` extending `plugin:ghost/ember`
32 lines
802 B
JavaScript
32 lines
802 B
JavaScript
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
|
import base from 'ghost-admin/mixins/editor-base-route';
|
|
|
|
export default AuthenticatedRoute.extend(base, {
|
|
titleToken: 'Editor',
|
|
|
|
model() {
|
|
return this.get('session.user').then(user => (
|
|
this.store.createRecord('post', {
|
|
author: user
|
|
})
|
|
));
|
|
},
|
|
|
|
renderTemplate(controller, model) {
|
|
this.render('editor/edit', {
|
|
controller,
|
|
model
|
|
});
|
|
},
|
|
|
|
actions: {
|
|
willTransition(transition) {
|
|
// decorate the transition object so the editor.edit route
|
|
// knows this was the previous active route
|
|
transition.data.fromNew = true;
|
|
|
|
this._super(...arguments);
|
|
}
|
|
}
|
|
});
|