diff options
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r-- | src/stores/ServicesStore.js | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index 19db05494..1d895d532 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -41,6 +41,7 @@ export default class ServicesStore extends Store { | |||
41 | this.actions.service.openWindow.listen(this._openWindow.bind(this)); | 41 | this.actions.service.openWindow.listen(this._openWindow.bind(this)); |
42 | this.actions.service.filter.listen(this._filter.bind(this)); | 42 | this.actions.service.filter.listen(this._filter.bind(this)); |
43 | this.actions.service.resetFilter.listen(this._resetFilter.bind(this)); | 43 | this.actions.service.resetFilter.listen(this._resetFilter.bind(this)); |
44 | this.actions.service.resetStatus.listen(this._resetStatus.bind(this)); | ||
44 | this.actions.service.reload.listen(this._reload.bind(this)); | 45 | this.actions.service.reload.listen(this._reload.bind(this)); |
45 | this.actions.service.reloadActive.listen(this._reloadActive.bind(this)); | 46 | this.actions.service.reloadActive.listen(this._reloadActive.bind(this)); |
46 | this.actions.service.reloadAll.listen(this._reloadAll.bind(this)); | 47 | this.actions.service.reloadAll.listen(this._reloadAll.bind(this)); |
@@ -144,12 +145,12 @@ export default class ServicesStore extends Store { | |||
144 | serviceData.name = data.name; | 145 | serviceData.name = data.name; |
145 | } | 146 | } |
146 | 147 | ||
147 | if (data.team) { | 148 | if (data.team && !data.customURL) { |
148 | serviceData.team = data.team; | 149 | serviceData.team = data.team; |
149 | } | 150 | } |
150 | 151 | ||
151 | if (data.team) { | 152 | if (data.team && data.customURL) { |
152 | serviceData.customUrl = data.customURL; | 153 | serviceData.customUrl = data.team; |
153 | } | 154 | } |
154 | 155 | ||
155 | this.actions.service.createService({ | 156 | this.actions.service.createService({ |
@@ -157,8 +158,6 @@ export default class ServicesStore extends Store { | |||
157 | serviceData, | 158 | serviceData, |
158 | redirect: false, | 159 | redirect: false, |
159 | }); | 160 | }); |
160 | |||
161 | return 'hello world'; | ||
162 | } | 161 | } |
163 | 162 | ||
164 | @action async _updateService({ serviceId, serviceData, redirect = true }) { | 163 | @action async _updateService({ serviceId, serviceData, redirect = true }) { |
@@ -295,9 +294,12 @@ export default class ServicesStore extends Store { | |||
295 | } | 294 | } |
296 | 295 | ||
297 | if (service.isNotificationEnabled) { | 296 | if (service.isNotificationEnabled) { |
297 | const title = typeof args[0].title === 'string' ? args[0].title : service.name; | ||
298 | options.body = typeof options.body === 'string' ? options.body : ''; | ||
299 | |||
298 | this.actions.app.notify({ | 300 | this.actions.app.notify({ |
299 | notificationId: args[0].notificationId, | 301 | notificationId: args[0].notificationId, |
300 | title: args[0].title, | 302 | title, |
301 | options, | 303 | options, |
302 | serviceId, | 304 | serviceId, |
303 | }); | 305 | }); |
@@ -338,6 +340,10 @@ export default class ServicesStore extends Store { | |||
338 | this.filterNeedle = null; | 340 | this.filterNeedle = null; |
339 | } | 341 | } |
340 | 342 | ||
343 | @action _resetStatus() { | ||
344 | this.actionStatus = []; | ||
345 | } | ||
346 | |||
341 | @action _reload({ serviceId }) { | 347 | @action _reload({ serviceId }) { |
342 | const service = this.one(serviceId); | 348 | const service = this.one(serviceId); |
343 | service.resetMessageCount(); | 349 | service.resetMessageCount(); |
@@ -383,7 +389,7 @@ export default class ServicesStore extends Store { | |||
383 | data.forEach((s) => { | 389 | data.forEach((s) => { |
384 | const service = s; | 390 | const service = s; |
385 | 391 | ||
386 | service.order = this.one(s.id).order; | 392 | service.order = services[s.id]; |
387 | }); | 393 | }); |
388 | }); | 394 | }); |
389 | 395 | ||