diff options
author | Dominik Guzei <dominik.guzei@gmail.com> | 2019-03-12 21:36:10 +0100 |
---|---|---|
committer | Dominik Guzei <dominik.guzei@gmail.com> | 2019-03-12 21:37:33 +0100 |
commit | 6fb07bcb716af76ec2e96345f37624d12d0d1af0 (patch) | |
tree | 276191a782dc1d44f78331e548e43ff71758baca /src/stores/ServicesStore.js | |
parent | refactor server api even more (diff) | |
download | ferdium-app-6fb07bcb716af76ec2e96345f37624d12d0d1af0.tar.gz ferdium-app-6fb07bcb716af76ec2e96345f37624d12d0d1af0.tar.zst ferdium-app-6fb07bcb716af76ec2e96345f37624d12d0d1af0.zip |
implements basic release announcement feature
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r-- | src/stores/ServicesStore.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index 69e616f0c..88b0331bf 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -35,6 +35,7 @@ export default class ServicesStore extends Store { | |||
35 | 35 | ||
36 | // Register action handlers | 36 | // Register action handlers |
37 | this.actions.service.setActive.listen(this._setActive.bind(this)); | 37 | this.actions.service.setActive.listen(this._setActive.bind(this)); |
38 | this.actions.service.blurActive.listen(this._blurActive.bind(this)); | ||
38 | this.actions.service.setActiveNext.listen(this._setActiveNext.bind(this)); | 39 | this.actions.service.setActiveNext.listen(this._setActiveNext.bind(this)); |
39 | this.actions.service.setActivePrev.listen(this._setActivePrev.bind(this)); | 40 | this.actions.service.setActivePrev.listen(this._setActivePrev.bind(this)); |
40 | this.actions.service.showAddServiceInterface.listen(this._showAddServiceInterface.bind(this)); | 41 | this.actions.service.showAddServiceInterface.listen(this._showAddServiceInterface.bind(this)); |
@@ -298,6 +299,11 @@ export default class ServicesStore extends Store { | |||
298 | this._focusActiveService(); | 299 | this._focusActiveService(); |
299 | } | 300 | } |
300 | 301 | ||
302 | @action _blurActive() { | ||
303 | if (!this.active) return; | ||
304 | this.active.isActive = false; | ||
305 | } | ||
306 | |||
301 | @action _setActiveNext() { | 307 | @action _setActiveNext() { |
302 | const nextIndex = this._wrapIndex(this.allDisplayed.findIndex(service => service.isActive), 1, this.allDisplayed.length); | 308 | const nextIndex = this._wrapIndex(this.allDisplayed.findIndex(service => service.isActive), 1, this.allDisplayed.length); |
303 | 309 | ||