2017-10-12 18:42:10 +03:00
|
|
|
import EmberRouter from '@ember/routing/router';
|
2020-08-03 11:21:42 +03:00
|
|
|
import config from 'ghost-admin/config/environment';
|
2017-05-29 21:50:03 +03:00
|
|
|
import ghostPaths from 'ghost-admin/utils/ghost-paths';
|
2014-02-26 08:58:00 +04:00
|
|
|
|
2017-10-12 18:42:10 +03:00
|
|
|
const Router = EmberRouter.extend({
|
2015-10-05 09:07:44 +03:00
|
|
|
location: config.locationType, // use HTML5 History API instead of hash-tag based URLs
|
2019-03-06 20:15:44 +03:00
|
|
|
rootURL: ghostPaths().adminRoot // admin interface lives under sub-directory /ghost
|
2014-03-02 18:30:35 +04:00
|
|
|
});
|
|
|
|
|
2017-10-12 18:42:10 +03:00
|
|
|
Router.map(function () {
|
2019-03-21 12:33:14 +03:00
|
|
|
this.route('home', {path: '/'});
|
|
|
|
|
2015-05-27 23:10:47 +03:00
|
|
|
this.route('setup', function () {
|
2015-03-29 21:10:53 +03:00
|
|
|
this.route('one');
|
|
|
|
this.route('two');
|
|
|
|
this.route('three');
|
|
|
|
});
|
|
|
|
|
2014-03-10 07:44:08 +04:00
|
|
|
this.route('signin');
|
2014-06-01 23:30:50 +04:00
|
|
|
this.route('signout');
|
2014-10-25 01:09:50 +04:00
|
|
|
this.route('signup', {path: '/signup/:token'});
|
|
|
|
this.route('reset', {path: '/reset/:token'});
|
2021-01-18 12:02:44 +03:00
|
|
|
|
2019-03-05 20:34:00 +03:00
|
|
|
this.route('about');
|
2019-03-21 12:33:14 +03:00
|
|
|
this.route('site');
|
2021-01-21 12:11:51 +03:00
|
|
|
this.route('dashboard');
|
2021-01-28 17:25:05 +03:00
|
|
|
this.route('launch');
|
2020-05-22 05:44:37 +03:00
|
|
|
|
2021-03-23 14:59:52 +03:00
|
|
|
this.route('pro', function () {
|
|
|
|
this.route('pro-sub', {path: '/*sub'});
|
2020-05-22 05:44:37 +03:00
|
|
|
});
|
2014-10-25 01:09:50 +04:00
|
|
|
|
2019-06-18 13:47:21 +03:00
|
|
|
this.route('posts');
|
|
|
|
this.route('pages');
|
2014-10-25 01:09:50 +04:00
|
|
|
|
2015-05-25 21:17:10 +03:00
|
|
|
this.route('editor', function () {
|
2019-02-22 06:17:33 +03:00
|
|
|
this.route('new', {path: ':type'});
|
|
|
|
this.route('edit', {path: ':type/:post_id'});
|
2014-06-10 08:44:29 +04:00
|
|
|
});
|
2014-10-25 01:09:50 +04:00
|
|
|
|
2019-03-05 20:34:00 +03:00
|
|
|
this.route('staff', function () {
|
2015-11-23 16:48:08 +03:00
|
|
|
this.route('user', {path: ':user_slug'});
|
2013-07-11 23:02:18 +04:00
|
|
|
});
|
2015-06-18 13:59:08 +03:00
|
|
|
|
2019-12-09 20:44:16 +03:00
|
|
|
this.route('tags');
|
|
|
|
this.route('tag.new', {path: '/tags/new'});
|
|
|
|
this.route('tag', {path: '/tags/:tag_slug'});
|
2019-06-18 13:47:21 +03:00
|
|
|
|
2021-01-21 18:45:59 +03:00
|
|
|
this.route('settings');
|
2019-06-18 13:47:21 +03:00
|
|
|
this.route('settings.general', {path: '/settings/general'});
|
2021-03-29 14:49:09 +03:00
|
|
|
this.route('settings.members-access', {path: '/settings/members-access'});
|
2021-01-28 18:25:21 +03:00
|
|
|
this.route('settings.members-email', {path: '/settings/members-email'});
|
|
|
|
this.route('settings.members-payments', {path: '/settings/members-payments'});
|
2015-05-25 21:17:10 +03:00
|
|
|
this.route('settings.code-injection', {path: '/settings/code-injection'});
|
2021-04-08 15:38:42 +03:00
|
|
|
|
|
|
|
this.route('settings.products', {path: '/settings/products'});
|
2021-04-22 19:47:19 +03:00
|
|
|
this.route('settings.product.new', {path: '/settings/product/new'});
|
|
|
|
this.route('settings.product', {path: '/settings/product/:product_id'});
|
2021-04-08 15:38:42 +03:00
|
|
|
|
2021-01-22 14:24:45 +03:00
|
|
|
this.route('settings.theme', {path: '/settings/theme'}, function () {
|
|
|
|
this.route('uploadtheme');
|
2021-02-12 12:19:25 +03:00
|
|
|
this.route('install');
|
2021-01-22 14:24:45 +03:00
|
|
|
});
|
2021-01-28 18:25:21 +03:00
|
|
|
this.route('settings.navigation', {path: '/settings/navigation'});
|
|
|
|
this.route('settings.labs', {path: '/settings/labs'});
|
|
|
|
|
|
|
|
this.route('integrations', function () {
|
2018-10-18 02:18:29 +03:00
|
|
|
this.route('new');
|
|
|
|
});
|
2021-01-28 18:25:21 +03:00
|
|
|
this.route('integration', {path: '/integrations/:integration_id'}, function () {
|
2018-10-18 02:18:29 +03:00
|
|
|
this.route('webhooks.new', {path: 'webhooks/new'});
|
2018-10-19 19:34:53 +03:00
|
|
|
this.route('webhooks.edit', {path: 'webhooks/:webhook_id'});
|
2018-10-18 02:18:29 +03:00
|
|
|
});
|
2021-01-28 18:25:21 +03:00
|
|
|
this.route('integrations.slack', {path: '/integrations/slack'});
|
|
|
|
this.route('integrations.amp', {path: '/integrations/amp'});
|
|
|
|
this.route('integrations.firstpromoter', {path: '/integrations/firstpromoter'});
|
|
|
|
this.route('integrations.unsplash', {path: '/integrations/unsplash'});
|
|
|
|
this.route('integrations.zapier', {path: '/integrations/zapier'});
|
2014-06-24 03:52:10 +04:00
|
|
|
|
2020-05-28 15:35:53 +03:00
|
|
|
this.route('members', function () {
|
2019-10-04 12:33:10 +03:00
|
|
|
this.route('import');
|
|
|
|
});
|
2020-05-28 15:35:53 +03:00
|
|
|
this.route('member.new', {path: '/members/new'});
|
|
|
|
this.route('member', {path: '/members/:member_id'});
|
2020-05-19 18:18:14 +03:00
|
|
|
|
2014-10-25 01:09:50 +04:00
|
|
|
this.route('error404', {path: '/*path'});
|
2021-02-05 15:48:38 +03:00
|
|
|
|
2021-02-05 16:00:51 +03:00
|
|
|
this.route('designsandbox');
|
2014-02-26 08:58:00 +04:00
|
|
|
});
|
2014-02-27 08:45:45 +04:00
|
|
|
|
2017-10-12 18:42:10 +03:00
|
|
|
export default Router;
|