Ghost/ghost/admin/app/controllers/pages.js
Kevin Ansfield fa0b1c607b
Deleted all Admin code relating to the old editor (#18580)
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
2023-10-12 13:17:39 +01:00

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