Renamed vuex settings to globalSettings
This commit is contained in:
parent
56e43ae77f
commit
e1d562fef4
5 changed files with 13 additions and 13 deletions
|
|
@ -7,7 +7,7 @@
|
||||||
<div uk-spinner="ratio: 4.5" ></div>
|
<div uk-spinner="ratio: 4.5" ></div>
|
||||||
</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
|
Stream preview disabled
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -59,7 +59,7 @@ export default {
|
||||||
// 'ready' changed, so do something
|
// 'ready' changed, so do something
|
||||||
console.log(oldValue)
|
console.log(oldValue)
|
||||||
console.log(newValue)
|
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() {
|
handleDoneResize: function() {
|
||||||
// Recalculate size
|
// Recalculate size
|
||||||
this.recalculateSize();
|
this.recalculateSize();
|
||||||
if (this.$store.state.settings.autoGpuPreview == true && this.GpuPreviewActive == true) {
|
if (this.$store.state.globalSettings.autoGpuPreview == true && this.GpuPreviewActive == true) {
|
||||||
// Reload preview
|
// Reload preview
|
||||||
this.$root.$emit('globalTogglePreview', true)
|
this.$root.$emit('globalTogglePreview', true)
|
||||||
}
|
}
|
||||||
|
|
@ -133,7 +133,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate payload if tracking window position
|
// 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
|
// Recalculate frame dimensions and position
|
||||||
this.recalculateSize()
|
this.recalculateSize()
|
||||||
// Copy data into payload array
|
// Copy data into payload array
|
||||||
|
|
@ -165,7 +165,7 @@ export default {
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
showStream: function () {
|
showStream: function () {
|
||||||
return this.$store.getters.ready && !this.$store.state.settings.disableStream
|
return this.$store.getters.ready && !this.$store.state.globalSettings.disableStream
|
||||||
},
|
},
|
||||||
streamImgUri: function () {
|
streamImgUri: function () {
|
||||||
return this.$store.getters.uri + "/stream"
|
return this.$store.getters.uri + "/stream"
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ export default {
|
||||||
|
|
||||||
disableStream: {
|
disableStream: {
|
||||||
get() {
|
get() {
|
||||||
return this.$store.state.settings.disableStream;
|
return this.$store.state.globalSettings.disableStream;
|
||||||
},
|
},
|
||||||
set(value) {
|
set(value) {
|
||||||
this.$store.commit("changeSetting", ['disableStream', value]);
|
this.$store.commit("changeSetting", ['disableStream', value]);
|
||||||
|
|
@ -34,7 +34,7 @@ export default {
|
||||||
|
|
||||||
autoGpuPreview: {
|
autoGpuPreview: {
|
||||||
get() {
|
get() {
|
||||||
return this.$store.state.settings.autoGpuPreview;
|
return this.$store.state.globalSettings.autoGpuPreview;
|
||||||
},
|
},
|
||||||
set(value) {
|
set(value) {
|
||||||
this.$store.commit("changeSetting", ['autoGpuPreview', value]);
|
this.$store.commit("changeSetting", ['autoGpuPreview', value]);
|
||||||
|
|
@ -44,7 +44,7 @@ export default {
|
||||||
|
|
||||||
trackWindow: {
|
trackWindow: {
|
||||||
get() {
|
get() {
|
||||||
return this.$store.state.settings.trackWindow;
|
return this.$store.state.globalSettings.trackWindow;
|
||||||
},
|
},
|
||||||
set(value) {
|
set(value) {
|
||||||
this.$store.commit("changeSetting", ['trackWindow', value]);
|
this.$store.commit("changeSetting", ['trackWindow', value]);
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ export default {
|
||||||
// Gallery tab
|
// Gallery tab
|
||||||
UIkit.util.on('#galleryDisplayTab', 'shown', function(event, area) {
|
UIkit.util.on('#galleryDisplayTab', 'shown', function(event, area) {
|
||||||
console.log("Gallery tab entered")
|
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('globalTogglePreview', false)
|
||||||
}
|
}
|
||||||
context.$root.$emit('globalUpdateCaptureList');
|
context.$root.$emit('globalUpdateCaptureList');
|
||||||
|
|
@ -43,7 +43,7 @@ export default {
|
||||||
UIkit.util.on('#streamDisplayTab', 'shown', function(event, area) {
|
UIkit.util.on('#streamDisplayTab', 'shown', function(event, area) {
|
||||||
console.log("Stream tab entered")
|
console.log("Stream tab entered")
|
||||||
UIkit.update()
|
UIkit.update()
|
||||||
if (context.$store.state.settings.trackWindow == true) {
|
if (context.$store.state.globalSettings.trackWindow == true) {
|
||||||
context.$root.$emit('globalTogglePreview', true)
|
context.$root.$emit('globalTogglePreview', true)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ Vue.mixin({
|
||||||
.finally(function() {
|
.finally(function() {
|
||||||
// Reenable the GPU preview, if it was active before the modal
|
// Reenable the GPU preview, if it was active before the modal
|
||||||
console.log("Re-enabling GPU preview")
|
console.log("Re-enabling GPU preview")
|
||||||
if (context.$store.state.settings.autoGpuPreview) {
|
if (context.$store.state.globalSettings.autoGpuPreview) {
|
||||||
console.log("Re-enabling preview")
|
console.log("Re-enabling preview")
|
||||||
context.$root.$emit('globalTogglePreview', true)
|
context.$root.$emit('globalTogglePreview', true)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ export default new Vuex.Store({
|
||||||
error: '',
|
error: '',
|
||||||
apiConfig: {},
|
apiConfig: {},
|
||||||
apiState: {},
|
apiState: {},
|
||||||
settings: {
|
globalSettings: {
|
||||||
disableStream: false,
|
disableStream: false,
|
||||||
autoGpuPreview: false,
|
autoGpuPreview: false,
|
||||||
trackWindow: true
|
trackWindow: true
|
||||||
|
|
@ -44,7 +44,7 @@ export default new Vuex.Store({
|
||||||
state.apiState = stateData;
|
state.apiState = stateData;
|
||||||
},
|
},
|
||||||
changeSetting(state, [key, value]) {
|
changeSetting(state, [key, value]) {
|
||||||
state.settings[key] = value;
|
state.globalSettings[key] = value;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue