Consolidate SimpleAuth.AuthenticatedRouteMixin into AuthenticatedRoute

No issue
This commit is contained in:
Matt Enlow 2014-10-28 08:29:42 -06:00
parent 1c7450bd04
commit eb3a8af3d4
14 changed files with 29 additions and 13 deletions

View File

@ -0,0 +1,3 @@
var AuthenticatedRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin);
export default AuthenticatedRoute;

View File

@ -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 () {

View File

@ -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) {

View File

@ -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 () {

View File

@ -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 () {

View File

@ -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,

View File

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

View File

@ -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,

View File

@ -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 () {

View File

@ -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 () {

View File

@ -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());

View File

@ -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) {

View File

@ -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) {

View File

@ -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) {