aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/ServicesStore.js
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2019-04-13 20:58:37 +0200
committerLibravatar Stefan Malzner <stefan@adlk.io>2019-04-13 20:58:37 +0200
commit8e623e84cf21068561217a509c0761d524dfbc29 (patch)
treea83f307c3ce087169e3a1d55418fa78a71b7b4dc /src/stores/ServicesStore.js
parentUse store reactions (diff)
parentMerge branch 'feature/announcements' into develop (diff)
downloadferdium-app-8e623e84cf21068561217a509c0761d524dfbc29.tar.gz
ferdium-app-8e623e84cf21068561217a509c0761d524dfbc29.tar.zst
ferdium-app-8e623e84cf21068561217a509c0761d524dfbc29.zip
Merge branch 'develop' into chore/streamline-dashboard
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r--src/stores/ServicesStore.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js
index 0ec6bf550..d04fdd0c5 100644
--- a/src/stores/ServicesStore.js
+++ b/src/stores/ServicesStore.js
@@ -36,6 +36,7 @@ export default class ServicesStore extends Store {
36 36
37 // Register action handlers 37 // Register action handlers
38 this.actions.service.setActive.listen(this._setActive.bind(this)); 38 this.actions.service.setActive.listen(this._setActive.bind(this));
39 this.actions.service.blurActive.listen(this._blurActive.bind(this));
39 this.actions.service.setActiveNext.listen(this._setActiveNext.bind(this)); 40 this.actions.service.setActiveNext.listen(this._setActiveNext.bind(this));
40 this.actions.service.setActivePrev.listen(this._setActivePrev.bind(this)); 41 this.actions.service.setActivePrev.listen(this._setActivePrev.bind(this));
41 this.actions.service.showAddServiceInterface.listen(this._showAddServiceInterface.bind(this)); 42 this.actions.service.showAddServiceInterface.listen(this._showAddServiceInterface.bind(this));
@@ -301,6 +302,11 @@ export default class ServicesStore extends Store {
301 this._focusActiveService(); 302 this._focusActiveService();
302 } 303 }
303 304
305 @action _blurActive() {
306 if (!this.active) return;
307 this.active.isActive = false;
308 }
309
304 @action _setActiveNext() { 310 @action _setActiveNext() {
305 const nextIndex = this._wrapIndex(this.allDisplayed.findIndex(service => service.isActive), 1, this.allDisplayed.length); 311 const nextIndex = this._wrapIndex(this.allDisplayed.findIndex(service => service.isActive), 1, this.allDisplayed.length);
306 312