Files
PhotonVision/photon-client/src/views/SettingsView.vue

91 lines
2.1 KiB
Vue
Raw Normal View History

2019-09-20 20:56:24 +03:00
<template>
<div>
<v-row
class="pa-3"
no-gutters
>
<v-col
cols="12"
style="max-width: 1400px"
>
<v-card
v-for="item in tabList"
:key="item.name"
dark
class="mb-3 pr-6 pb-3"
style="background-color: #006492;"
>
<v-card-title>{{ item.name }}</v-card-title>
<component
:is="item"
class="ml-5"
/>
</v-card>
</v-col>
</v-row>
<v-snackbar
v-model="snack"
top
:color="snackbar.color"
>
<span>{{ snackbar.text }}</span>
</v-snackbar>
</div>
2019-09-20 20:56:24 +03:00
</template>
<script>
import Networking from './SettingsViews/Networking'
import Lighting from "./SettingsViews/Lighting";
import cvImage from '../components/common/cv-image'
import Stats from "./SettingsViews/Stats";
import DeviceControl from "./SettingsViews/DeviceControl";
2019-09-20 20:56:24 +03:00
export default {
2019-09-22 00:14:12 +03:00
name: 'SettingsTab',
2019-10-29 23:58:06 +02:00
components: {
cvImage,
// General,
2019-09-28 21:42:04 +03:00
},
2019-09-20 20:56:24 +03:00
data() {
return {
2019-10-29 23:58:06 +02:00
selectedTab: 0,
snack: false,
calibrationInProgress: false,
snackbar: {
color: "accent",
text: ""
},
2019-09-28 21:42:04 +03:00
}
},
2019-10-29 23:58:06 +02:00
computed: {
selectedComponent: {
get() {
return this.tabList[this.selectedTab];
2019-09-28 21:42:04 +03:00
}
2019-10-02 22:07:04 +03:00
},
settings: {
get() {
return this.$store.state.settings;
}
},
tabList: {
get() {
return [Stats, DeviceControl, Networking].concat(this.$store.state.settings.lighting.supported ? Lighting : []);
}
}
},
2019-09-20 20:56:24 +03:00
}
</script>
<style scoped>
2019-10-29 23:58:06 +02:00
.videoClass {
2019-10-02 23:37:35 +03:00
text-align: center;
}
2019-10-29 23:58:06 +02:00
.videoClass img {
padding-top: 10px;
2019-10-02 23:37:35 +03:00
height: auto !important;
vertical-align: middle;
}
</style>