diff options
author | 2019-03-12 21:36:10 +0100 | |
---|---|---|
committer | 2019-03-12 21:37:33 +0100 | |
commit | 6fb07bcb716af76ec2e96345f37624d12d0d1af0 (patch) | |
tree | 276191a782dc1d44f78331e548e43ff71758baca /src/stores | |
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')
-rw-r--r-- | src/stores/FeaturesStore.js | 2 | ||||
-rw-r--r-- | src/stores/ServicesStore.js | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/stores/FeaturesStore.js b/src/stores/FeaturesStore.js index d2842083c..1c9044b07 100644 --- a/src/stores/FeaturesStore.js +++ b/src/stores/FeaturesStore.js | |||
@@ -8,6 +8,7 @@ import spellchecker from '../features/spellchecker'; | |||
8 | import serviceProxy from '../features/serviceProxy'; | 8 | import serviceProxy from '../features/serviceProxy'; |
9 | import basicAuth from '../features/basicAuth'; | 9 | import basicAuth from '../features/basicAuth'; |
10 | import shareFranz from '../features/shareFranz'; | 10 | import shareFranz from '../features/shareFranz'; |
11 | import announcements from '../features/announcements'; | ||
11 | 12 | ||
12 | import { DEFAULT_FEATURES_CONFIG } from '../config'; | 13 | import { DEFAULT_FEATURES_CONFIG } from '../config'; |
13 | 14 | ||
@@ -58,5 +59,6 @@ export default class FeaturesStore extends Store { | |||
58 | serviceProxy(this.stores, this.actions); | 59 | serviceProxy(this.stores, this.actions); |
59 | basicAuth(this.stores, this.actions); | 60 | basicAuth(this.stores, this.actions); |
60 | shareFranz(this.stores, this.actions); | 61 | shareFranz(this.stores, this.actions); |
62 | announcements(this.stores, this.actions); | ||
61 | } | 63 | } |
62 | } | 64 | } |
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 | ||