mirror of
https://github.com/flarum/framework.git
synced 2024-12-05 09:03:36 +08:00
18 lines
328 B
JavaScript
18 lines
328 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);
|
||
|
},
|
||
|
clearAlerts: function() {
|
||
|
this.get('alerts').clear();
|
||
|
}
|
||
|
}
|
||
|
});
|