Ghost/core/client/app.js
Jacob Gable 42a1d55858 Improve signin
Ref #2413

- Remove fixture and use actual API
- Store and send down actual logged in user data
- Refactor isLoggedIn to use computed property on application
- After signin, update user data in dependency container
- Add CSRF to all routes and controllers via initializer
- Update authenticated route to check for user.isLoggedIn
- Add notifications for signin error
- Add notifications.showAPIError helper
- Add plumbing for refreshless signup to doSignUp in admin controller
2014-05-15 09:18:43 -05:00

30 lines
885 B
JavaScript
Executable File

import Resolver from 'ember/resolver';
import initFixtures from 'ghost/fixtures/init';
import injectCurrentUser from 'ghost/initializers/current-user';
import injectCsrf from 'ghost/initializers/csrf';
import {registerNotifications, injectNotifications} from 'ghost/initializers/notifications';
import 'ghost/utils/link-view';
import 'ghost/utils/text-field';
var App = Ember.Application.extend({
/**
* These are debugging flags, they are useful during development
*/
LOG_ACTIVE_GENERATION: true,
LOG_MODULE_RESOLVER: true,
LOG_TRANSITIONS: true,
LOG_TRANSITIONS_INTERNAL: true,
LOG_VIEW_LOOKUPS: true,
modulePrefix: 'ghost',
Resolver: Resolver['default']
});
initFixtures();
App.initializer(injectCurrentUser);
App.initializer(injectCsrf);
App.initializer(registerNotifications);
App.initializer(injectNotifications);
export default App;