Renamed appSettings to streamSettings
This commit is contained in:
parent
af19fb7f25
commit
f8758fe2ff
3 changed files with 82 additions and 59 deletions
|
|
@ -3,8 +3,8 @@
|
||||||
|
|
||||||
<ul uk-accordion="multiple: true">
|
<ul uk-accordion="multiple: true">
|
||||||
<li>
|
<li>
|
||||||
<a class="uk-accordion-title" href="#">App settings</a>
|
<a class="uk-accordion-title" href="#">Stream settings</a>
|
||||||
<div class="uk-accordion-content"><appSettings/></div>
|
<div class="uk-accordion-content"><streamSettings/></div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li v-if="$store.getters.ready">
|
<li v-if="$store.getters.ready">
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import appSettings from './paneSettingsComponents/appSettings.vue'
|
import streamSettings from './paneSettingsComponents/streamSettings.vue'
|
||||||
import microscopeSettings from './paneSettingsComponents/microscopeSettings.vue'
|
import microscopeSettings from './paneSettingsComponents/microscopeSettings.vue'
|
||||||
|
|
||||||
// Export main app
|
// Export main app
|
||||||
|
|
@ -26,7 +26,7 @@ export default {
|
||||||
name: 'paneSettings',
|
name: 'paneSettings',
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
appSettings,
|
streamSettings,
|
||||||
microscopeSettings
|
microscopeSettings
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,55 +0,0 @@
|
||||||
<template>
|
|
||||||
<div id="appSettings">
|
|
||||||
|
|
||||||
<p><label><input v-model="disableStream" class="uk-checkbox" type="checkbox"> Disable stream</label></p>
|
|
||||||
|
|
||||||
<div class="uk-child-width-1-2" uk-grid>
|
|
||||||
<p><label v-bind:class="{'uk-disabled': !this.$store.getters.ready}"><input v-model="autoGpuPreview" class="uk-checkbox" type="checkbox"> GPU preview</label></p>
|
|
||||||
<p><label><input v-model="trackWindow" class="uk-checkbox" type="checkbox"> Track window</label></p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
// Export main app
|
|
||||||
export default {
|
|
||||||
name: 'appSettings',
|
|
||||||
|
|
||||||
computed: {
|
|
||||||
disableStream: {
|
|
||||||
get() {
|
|
||||||
return this.$store.state.settings.disableStream;
|
|
||||||
},
|
|
||||||
set(value) {
|
|
||||||
this.$store.commit("changeSetting", ['disableStream', value]);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
autoGpuPreview: {
|
|
||||||
get() {
|
|
||||||
return this.$store.state.settings.autoGpuPreview;
|
|
||||||
},
|
|
||||||
set(value) {
|
|
||||||
this.$store.commit("changeSetting", ['autoGpuPreview', value]);
|
|
||||||
this.$root.$emit('globalTogglePreview', value)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
trackWindow: {
|
|
||||||
get() {
|
|
||||||
return this.$store.state.settings.trackWindow;
|
|
||||||
},
|
|
||||||
set(value) {
|
|
||||||
this.$store.commit("changeSetting", ['trackWindow', value]);
|
|
||||||
if (this.$store.state.settings.autoGpuPreview == true) {
|
|
||||||
this.$root.$emit('globalTogglePreview', true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="less">
|
|
||||||
</style>
|
|
||||||
78
src/components/paneSettingsComponents/streamSettings.vue
Normal file
78
src/components/paneSettingsComponents/streamSettings.vue
Normal file
|
|
@ -0,0 +1,78 @@
|
||||||
|
<template>
|
||||||
|
<div id="appSettings">
|
||||||
|
|
||||||
|
<p><label><input v-model="localMode" class="uk-checkbox" type="checkbox"><b> Local mode</b></label></p>
|
||||||
|
|
||||||
|
<p><label v-bind:class="disableIfLocalMode"><input v-model="disableStream" class="uk-checkbox" type="checkbox"> Disable live stream</label></p>
|
||||||
|
|
||||||
|
<div class="uk-child-width-1-2" uk-grid>
|
||||||
|
<p><label v-bind:class="[{'uk-disabled': !this.$store.getters.ready}, disableIfLocalMode]"><input v-model="autoGpuPreview" class="uk-checkbox" type="checkbox"> GPU preview</label></p>
|
||||||
|
<p><label v-bind:class="[{'uk-disabled': !this.$store.getters.ready}, disableIfLocalMode]"><input v-model="trackWindow" class="uk-checkbox" type="checkbox"> Track window</label></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
// Export main app
|
||||||
|
export default {
|
||||||
|
name: 'appSettings',
|
||||||
|
|
||||||
|
data: function () {
|
||||||
|
return {
|
||||||
|
isLocalMode: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
localMode: {
|
||||||
|
get() {
|
||||||
|
return this.isLocalMode
|
||||||
|
},
|
||||||
|
set(value) {
|
||||||
|
this.isLocalMode = value;
|
||||||
|
this.trackWindow = value;
|
||||||
|
this.disableStream = value;
|
||||||
|
this.autoGpuPreview = value;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
disableStream: {
|
||||||
|
get() {
|
||||||
|
return this.$store.state.settings.disableStream;
|
||||||
|
},
|
||||||
|
set(value) {
|
||||||
|
this.$store.commit("changeSetting", ['disableStream', value]);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
autoGpuPreview: {
|
||||||
|
get() {
|
||||||
|
return this.$store.state.settings.autoGpuPreview;
|
||||||
|
},
|
||||||
|
set(value) {
|
||||||
|
this.$store.commit("changeSetting", ['autoGpuPreview', value]);
|
||||||
|
this.$root.$emit('globalTogglePreview', value)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
trackWindow: {
|
||||||
|
get() {
|
||||||
|
return this.$store.state.settings.trackWindow;
|
||||||
|
},
|
||||||
|
set(value) {
|
||||||
|
this.$store.commit("changeSetting", ['trackWindow', value]);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
disableIfLocalMode: function () {
|
||||||
|
return {'uk-disabled': this.localMode}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
</style>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue