mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 19:33:02 +03:00
Consolidate SimpleAuth.AuthenticatedRouteMixin into AuthenticatedRoute
No issue
This commit is contained in:
parent
1c7450bd04
commit
eb3a8af3d4
3
ghost/admin/routes/authenticated.js
Normal file
3
ghost/admin/routes/authenticated.js
Normal file
@ -0,0 +1,3 @@
|
||||
var AuthenticatedRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin);
|
||||
|
||||
export default AuthenticatedRoute;
|
@ -1,7 +1,8 @@
|
||||
import AuthenticatedRoute from 'ghost/routes/authenticated';
|
||||
import styleBody from 'ghost/mixins/style-body';
|
||||
import loadingIndicator from 'ghost/mixins/loading-indicator';
|
||||
|
||||
var DebugRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, styleBody, loadingIndicator, {
|
||||
var DebugRoute = AuthenticatedRoute.extend(styleBody, loadingIndicator, {
|
||||
classNames: ['settings'],
|
||||
|
||||
beforeModel: function () {
|
||||
|
@ -1,8 +1,9 @@
|
||||
import AuthenticatedRoute from 'ghost/routes/authenticated';
|
||||
import base from 'ghost/mixins/editor-route-base';
|
||||
import isNumber from 'ghost/utils/isNumber';
|
||||
import isFinite from 'ghost/utils/isFinite';
|
||||
|
||||
var EditorEditRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, base, {
|
||||
var EditorEditRoute = AuthenticatedRoute.extend(base, {
|
||||
classNames: ['editor'],
|
||||
|
||||
model: function (params) {
|
||||
|
@ -1,6 +1,7 @@
|
||||
import AuthenticatedRoute from 'ghost/routes/authenticated';
|
||||
import base from 'ghost/mixins/editor-route-base';
|
||||
|
||||
var EditorNewRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, base, {
|
||||
var EditorNewRoute = AuthenticatedRoute.extend(base, {
|
||||
classNames: ['editor'],
|
||||
|
||||
model: function () {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import AuthenticatedRoute from 'ghost/routes/authenticated';
|
||||
import styleBody from 'ghost/mixins/style-body';
|
||||
import ShortcutsRoute from 'ghost/mixins/shortcuts-route';
|
||||
import loadingIndicator from 'ghost/mixins/loading-indicator';
|
||||
@ -12,7 +13,7 @@ paginationSettings = {
|
||||
page: 1
|
||||
};
|
||||
|
||||
PostsRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, ShortcutsRoute, styleBody, loadingIndicator, PaginationRouteMixin, {
|
||||
PostsRoute = AuthenticatedRoute.extend(ShortcutsRoute, styleBody, loadingIndicator, PaginationRouteMixin, {
|
||||
classNames: ['manage'],
|
||||
|
||||
model: function () {
|
||||
|
@ -1,9 +1,10 @@
|
||||
import AuthenticatedRoute from 'ghost/routes/authenticated';
|
||||
import loadingIndicator from 'ghost/mixins/loading-indicator';
|
||||
import ShortcutsRoute from 'ghost/mixins/shortcuts-route';
|
||||
import isNumber from 'ghost/utils/isNumber';
|
||||
import isFinite from 'ghost/utils/isFinite';
|
||||
|
||||
var PostsPostRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, loadingIndicator, ShortcutsRoute, {
|
||||
var PostsPostRoute = AuthenticatedRoute.extend(loadingIndicator, ShortcutsRoute, {
|
||||
model: function (params) {
|
||||
var self = this,
|
||||
post,
|
||||
|
@ -1,7 +1,8 @@
|
||||
import AuthenticatedRoute from 'ghost/routes/authenticated';
|
||||
import styleBody from 'ghost/mixins/style-body';
|
||||
import loadingIndicator from 'ghost/mixins/loading-indicator';
|
||||
|
||||
var SettingsRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, styleBody, loadingIndicator, {
|
||||
var SettingsRoute = AuthenticatedRoute.extend(styleBody, loadingIndicator, {
|
||||
classNames: ['settings']
|
||||
});
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
import AuthenticatedRoute from 'ghost/routes/authenticated';
|
||||
import loadingIndicator from 'ghost/mixins/loading-indicator';
|
||||
import styleBody from 'ghost/mixins/style-body';
|
||||
|
||||
var SettingsAboutRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, styleBody, loadingIndicator, {
|
||||
var SettingsAboutRoute = AuthenticatedRoute.extend(styleBody, loadingIndicator, {
|
||||
classNames: ['settings-view-about'],
|
||||
|
||||
cachedConfig: false,
|
||||
|
@ -1,7 +1,8 @@
|
||||
import AuthenticatedRoute from 'ghost/routes/authenticated';
|
||||
import CurrentUserSettings from 'ghost/mixins/current-user-settings';
|
||||
import styleBody from 'ghost/mixins/style-body';
|
||||
|
||||
var AppsRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, styleBody, CurrentUserSettings, {
|
||||
var AppsRoute = AuthenticatedRoute.extend(styleBody, CurrentUserSettings, {
|
||||
classNames: ['settings-view-apps'],
|
||||
|
||||
beforeModel: function () {
|
||||
|
@ -1,8 +1,9 @@
|
||||
import AuthenticatedRoute from 'ghost/routes/authenticated';
|
||||
import loadingIndicator from 'ghost/mixins/loading-indicator';
|
||||
import CurrentUserSettings from 'ghost/mixins/current-user-settings';
|
||||
import styleBody from 'ghost/mixins/style-body';
|
||||
|
||||
var SettingsGeneralRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, styleBody, loadingIndicator, CurrentUserSettings, {
|
||||
var SettingsGeneralRoute = AuthenticatedRoute.extend(styleBody, loadingIndicator, CurrentUserSettings, {
|
||||
classNames: ['settings-view-general'],
|
||||
|
||||
beforeModel: function () {
|
||||
|
@ -1,6 +1,7 @@
|
||||
import AuthenticatedRoute from 'ghost/routes/authenticated';
|
||||
import CurrentUserSettings from 'ghost/mixins/current-user-settings';
|
||||
|
||||
var UsersRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, CurrentUserSettings, {
|
||||
var UsersRoute = AuthenticatedRoute.extend(CurrentUserSettings, {
|
||||
beforeModel: function () {
|
||||
return this.currentUser()
|
||||
.then(this.transitionAuthor());
|
||||
|
@ -1,3 +1,4 @@
|
||||
import AuthenticatedRoute from 'ghost/routes/authenticated';
|
||||
import PaginationRouteMixin from 'ghost/mixins/pagination-route';
|
||||
import styleBody from 'ghost/mixins/style-body';
|
||||
|
||||
@ -10,7 +11,7 @@ paginationSettings = {
|
||||
status: 'active'
|
||||
};
|
||||
|
||||
UsersIndexRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, styleBody, PaginationRouteMixin, {
|
||||
UsersIndexRoute = AuthenticatedRoute.extend(styleBody, PaginationRouteMixin, {
|
||||
classNames: ['settings-view-users'],
|
||||
|
||||
setupController: function (controller, model) {
|
||||
|
@ -1,6 +1,7 @@
|
||||
import AuthenticatedRoute from 'ghost/routes/authenticated';
|
||||
import styleBody from 'ghost/mixins/style-body';
|
||||
|
||||
var SettingsUserRoute = Ember.Route.extend(styleBody, {
|
||||
var SettingsUserRoute = AuthenticatedRoute.extend(styleBody, {
|
||||
classNames: ['settings-view-user'],
|
||||
|
||||
model: function (params) {
|
||||
|
@ -1,7 +1,8 @@
|
||||
import AuthenticatedRoute from 'ghost/routes/authenticated';
|
||||
import styleBody from 'ghost/mixins/style-body';
|
||||
import loadingIndicator from 'ghost/mixins/loading-indicator';
|
||||
|
||||
var SignoutRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, styleBody, loadingIndicator, {
|
||||
var SignoutRoute = AuthenticatedRoute.extend(styleBody, loadingIndicator, {
|
||||
classNames: ['ghost-signout'],
|
||||
|
||||
afterModel: function (model, transition) {
|
||||
|
Loading…
Reference in New Issue
Block a user