mirror of
https://github.com/flarum/framework.git
synced 2024-12-04 00:03:37 +08:00
18 lines
364 B
JavaScript
18 lines
364 B
JavaScript
import Ember from 'ember';
|
|
|
|
export default Ember.Controller.extend({
|
|
alerts: [],
|
|
|
|
actions: {
|
|
alert: function(message) {
|
|
this.get('alerts').pushObject(message);
|
|
},
|
|
dismissAlert: function(message) {
|
|
this.get('alerts').removeObject(message.constructor);
|
|
},
|
|
clearAlerts: function() {
|
|
this.get('alerts').clear();
|
|
}
|
|
}
|
|
});
|