From e1d562fef40b1ef1140369a3ed0ecf61cd259eb7 Mon Sep 17 00:00:00 2001 From: Joel Collins Date: Wed, 8 May 2019 17:56:11 +0100 Subject: [PATCH] Renamed vuex settings to globalSettings --- src/components/paneDisplayComponents/streamDisplay.vue | 10 +++++----- .../paneSettingsComponents/streamSettings.vue | 6 +++--- src/components/panelDisplay.vue | 4 ++-- src/main.js | 2 +- src/store.js | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/components/paneDisplayComponents/streamDisplay.vue b/src/components/paneDisplayComponents/streamDisplay.vue index 59e7e6ec..8ccbb654 100644 --- a/src/components/paneDisplayComponents/streamDisplay.vue +++ b/src/components/paneDisplayComponents/streamDisplay.vue @@ -7,7 +7,7 @@
-
+
Stream preview disabled
@@ -59,7 +59,7 @@ export default { // 'ready' changed, so do something console.log(oldValue) console.log(newValue) - this.previewRequest(this.$store.state.settings.autoGpuPreview) + this.previewRequest(this.$store.state.globalSettings.autoGpuPreview) } ) }, @@ -94,7 +94,7 @@ export default { handleDoneResize: function() { // Recalculate size this.recalculateSize(); - if (this.$store.state.settings.autoGpuPreview == true && this.GpuPreviewActive == true) { + if (this.$store.state.globalSettings.autoGpuPreview == true && this.GpuPreviewActive == true) { // Reload preview this.$root.$emit('globalTogglePreview', true) } @@ -133,7 +133,7 @@ export default { } // Generate payload if tracking window position - if (this.$store.state.settings.trackWindow == true && state == true) { + if (this.$store.state.globalSettings.trackWindow == true && state == true) { // Recalculate frame dimensions and position this.recalculateSize() // Copy data into payload array @@ -165,7 +165,7 @@ export default { computed: { showStream: function () { - return this.$store.getters.ready && !this.$store.state.settings.disableStream + return this.$store.getters.ready && !this.$store.state.globalSettings.disableStream }, streamImgUri: function () { return this.$store.getters.uri + "/stream" diff --git a/src/components/paneSettingsComponents/streamSettings.vue b/src/components/paneSettingsComponents/streamSettings.vue index aa342530..058f324c 100644 --- a/src/components/paneSettingsComponents/streamSettings.vue +++ b/src/components/paneSettingsComponents/streamSettings.vue @@ -25,7 +25,7 @@ export default { disableStream: { get() { - return this.$store.state.settings.disableStream; + return this.$store.state.globalSettings.disableStream; }, set(value) { this.$store.commit("changeSetting", ['disableStream', value]); @@ -34,7 +34,7 @@ export default { autoGpuPreview: { get() { - return this.$store.state.settings.autoGpuPreview; + return this.$store.state.globalSettings.autoGpuPreview; }, set(value) { this.$store.commit("changeSetting", ['autoGpuPreview', value]); @@ -44,7 +44,7 @@ export default { trackWindow: { get() { - return this.$store.state.settings.trackWindow; + return this.$store.state.globalSettings.trackWindow; }, set(value) { this.$store.commit("changeSetting", ['trackWindow', value]); diff --git a/src/components/panelDisplay.vue b/src/components/panelDisplay.vue index 14789957..66b705af 100644 --- a/src/components/panelDisplay.vue +++ b/src/components/panelDisplay.vue @@ -33,7 +33,7 @@ export default { // Gallery tab UIkit.util.on('#galleryDisplayTab', 'shown', function(event, area) { console.log("Gallery tab entered") - if (context.$store.state.settings.trackWindow == true) { + if (context.$store.state.globalSettings.trackWindow == true) { context.$root.$emit('globalTogglePreview', false) } context.$root.$emit('globalUpdateCaptureList'); @@ -43,7 +43,7 @@ export default { UIkit.util.on('#streamDisplayTab', 'shown', function(event, area) { console.log("Stream tab entered") UIkit.update() - if (context.$store.state.settings.trackWindow == true) { + if (context.$store.state.globalSettings.trackWindow == true) { context.$root.$emit('globalTogglePreview', true) } }); diff --git a/src/main.js b/src/main.js index ce48f9cc..9d85dc14 100644 --- a/src/main.js +++ b/src/main.js @@ -27,7 +27,7 @@ Vue.mixin({ .finally(function() { // Reenable the GPU preview, if it was active before the modal console.log("Re-enabling GPU preview") - if (context.$store.state.settings.autoGpuPreview) { + if (context.$store.state.globalSettings.autoGpuPreview) { console.log("Re-enabling preview") context.$root.$emit('globalTogglePreview', true) } diff --git a/src/store.js b/src/store.js index 061a0acd..a46ea57e 100644 --- a/src/store.js +++ b/src/store.js @@ -15,7 +15,7 @@ export default new Vuex.Store({ error: '', apiConfig: {}, apiState: {}, - settings: { + globalSettings: { disableStream: false, autoGpuPreview: false, trackWindow: true @@ -44,7 +44,7 @@ export default new Vuex.Store({ state.apiState = stateData; }, changeSetting(state, [key, value]) { - state.settings[key] = value; + state.globalSettings[key] = value; } },