mirror of
https://github.com/flarum/core.git
synced 2025-08-05 07:57:46 +02:00
Move alerts to their own controller
This commit is contained in:
@@ -15,20 +15,9 @@ export default Ember.Controller.extend({
|
||||
searchQuery: '',
|
||||
searchActive: false,
|
||||
|
||||
alerts: [],
|
||||
|
||||
actions: {
|
||||
search: function(query) {
|
||||
this.transitionToRoute('index', {queryParams: {searchQuery: query, sort: query ? 'relevance' : 'recent'}});
|
||||
},
|
||||
alert: function(message) {
|
||||
this.get('alerts').pushObject(message);
|
||||
},
|
||||
dismissAlert: function(message) {
|
||||
this.get('alerts').removeObject(message);
|
||||
},
|
||||
clearAlerts: function() {
|
||||
this.get('alerts').clear();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user