Renamed vuex settings to globalSettings

This commit is contained in:
Joel Collins 2019-05-08 17:56:11 +01:00
parent 56e43ae77f
commit e1d562fef4
5 changed files with 13 additions and 13 deletions

View file

@ -7,7 +7,7 @@
<div uk-spinner="ratio: 4.5" ></div>
</div>
<div v-else-if="$store.state.settings.disableStream" class="uk-position-center position-relative text-center">
<div v-else-if="$store.state.globalSettings.disableStream" class="uk-position-center position-relative text-center">
Stream preview disabled
</div>
@ -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"

View file

@ -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]);

View file

@ -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)
}
});

View file

@ -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)
}

View file

@ -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;
}
},