mirror of
https://github.com/flarum/framework.git
synced 2024-12-05 00:43:39 +08:00
29 lines
521 B
JavaScript
29 lines
521 B
JavaScript
import Ember from 'ember';
|
|
import ApplicationRouteMixin from 'simple-auth/mixins/application-route-mixin';
|
|
|
|
export default Ember.Route.extend(ApplicationRouteMixin, {
|
|
|
|
actions: {
|
|
|
|
login: function() {
|
|
return this.render('login', {
|
|
into: 'application',
|
|
outlet: 'modal'
|
|
});
|
|
},
|
|
|
|
doLogin: function() {
|
|
this.get('session').authenticate('authenticator:custom', {});
|
|
},
|
|
|
|
closeModal: function() {
|
|
return this.disconnectOutlet({
|
|
outlet: 'modal',
|
|
parentView: 'application'
|
|
});
|
|
}
|
|
|
|
}
|
|
|
|
});
|