mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 07:09:48 +03:00
fa0b1c607b
no issue - removed labs flag - removed main editor component and all associated components - switched usage of `<KoenigBasicHtmlInput>` and `<KoenigBasicHtmlTextarea>` over to use plain `textarea`, the only uses were in settings modals that have been replaced in AdminX - cleaned up unused editor CSS
44 lines
865 B
JavaScript
44 lines
865 B
JavaScript
import PostsController from './posts';
|
|
import {action} from '@ember/object';
|
|
import {inject as service} from '@ember/service';
|
|
|
|
const TYPES = [{
|
|
name: 'All pages',
|
|
value: null
|
|
}, {
|
|
name: 'Draft pages',
|
|
value: 'draft'
|
|
}, {
|
|
name: 'Published pages',
|
|
value: 'published'
|
|
}, {
|
|
name: 'Scheduled pages',
|
|
value: 'scheduled'
|
|
}, {
|
|
name: 'Featured pages',
|
|
value: 'featured'
|
|
}];
|
|
|
|
const ORDERS = [{
|
|
name: 'Newest first',
|
|
value: null
|
|
}, {
|
|
name: 'Oldest first',
|
|
value: 'published_at asc'
|
|
}, {
|
|
name: 'Recently updated',
|
|
value: 'updated_at desc'
|
|
}];
|
|
|
|
export default class PagesController extends PostsController {
|
|
@service router;
|
|
|
|
availableTypes = TYPES;
|
|
availableOrders = ORDERS;
|
|
|
|
@action
|
|
openEditor(page) {
|
|
this.router.transitionTo('lexical-editor.edit', 'page', page.get('id'));
|
|
}
|
|
}
|