Files
PhotonVision/New client/chameleon-client/src/App.vue

86 lines
1.6 KiB
Vue
Raw Normal View History

2019-09-20 09:59:16 +03:00
<template>
2019-09-20 20:56:24 +03:00
<v-app>
<v-app-bar app clipped-left dark>
<img class="imgClass" src="./assets/logo.png">
<v-toolbar-title id="title">Chameleon Vision</v-toolbar-title>
<div class="flex-grow-1"></div>
<v-toolbar-items>
<v-tabs dark height="64" slider-color="#4baf62">
<v-tab to="Vision">Vision</v-tab>
<v-tab to="Settings">Settings</v-tab>
</v-tabs>
</v-toolbar-items>
</v-app-bar>
<v-content>
<v-container fluid fill-height>
<v-layout>
<v-flex>
<router-view></router-view>
</v-flex>
</v-layout>
</v-container>
2019-09-20 09:59:16 +03:00
</v-content>
</v-app>
</template>
<script>
export default {
name: 'App',
2019-10-02 00:14:37 +03:00
2019-09-20 09:59:16 +03:00
components: {
2019-10-02 00:14:37 +03:00
2019-10-02 22:07:04 +03:00
},
methods:{
handleMessage(key,val){
switch(key){
default:{
this.$store.commit(key,value);
}
}
}
2019-09-20 09:59:16 +03:00
},
data: () => ({
2019-10-02 00:14:37 +03:00
2019-09-20 09:59:16 +03:00
}),
2019-10-02 22:07:04 +03:00
created(){
this.$options.sockets.onmessage = (data) =>{
try{
let message = JSON.parse(data.data);
for(let prop in message){
if(message.hasOwnProperty(prop)){
this.handleMessage(prop,message[prop]);
}
}
}
catch{
console.error('error: ' + data.data);
}
}
}
2019-09-20 09:59:16 +03:00
};
</script>
<style>
html{
2019-09-20 20:56:24 +03:00
overflow-y: hidden !important;
2019-09-20 09:59:16 +03:00
}
.imgClass{
width: auto;
height: 58px;
vertical-align: middle;
padding-right: 5px;
}
2019-09-20 20:56:24 +03:00
.tabClass{
color: #4baf62;
}
.container{
background-color: #212121;
padding: 0!important;
}
#title{
color:#4baf62;
}
span{
color: white;
}
2019-10-02 00:14:37 +03:00
</style>