mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-04 03:11:40 +00:00
Added vision and settings components and refactored the routes
This commit is contained in:
@@ -19,32 +19,12 @@
|
|||||||
<Icon type="ios-settings"/>
|
<Icon type="ios-settings"/>
|
||||||
<span v-if="!isCollapsed">Settings</span>
|
<span v-if="!isCollapsed">Settings</span>
|
||||||
</template>
|
</template>
|
||||||
<MenuItem name="/settings/color" to="/settings/system">System</MenuItem>
|
<MenuItem name="/settings/system" to="/settings/system">System</MenuItem>
|
||||||
<MenuItem name="/settings/brightness" to="/settings/camera">Cameras</MenuItem>
|
<MenuItem name="/settings/camera" to="/settings/camera">Cameras</MenuItem>
|
||||||
</Submenu>
|
</Submenu>
|
||||||
</Menu>
|
</Menu>
|
||||||
</Sider>
|
</Sider>
|
||||||
<Layout id="main-layout">
|
<router-view></router-view>
|
||||||
<Header id="main-header" v-if="$route.path.includes('vision')">
|
|
||||||
<Row type="flex" justify="start" align="middle" :gutter="10">
|
|
||||||
<Col span="12">
|
|
||||||
<chselect title="select a camera" :list="[1,2,3]"></chselect>
|
|
||||||
</Col>
|
|
||||||
<Col span="12">
|
|
||||||
<chselect title="select pipline" :list="[0,1,2,3,4,5,6,7,8,9]"></chselect>
|
|
||||||
</Col>
|
|
||||||
</Row>
|
|
||||||
</Header>
|
|
||||||
<Content id="main-content">
|
|
||||||
<row type="flex" justify="start" align="middle" :gutter="5" >
|
|
||||||
<Col span="12">
|
|
||||||
<router-view></router-view>
|
|
||||||
</Col>
|
|
||||||
<img src="./assets/logo.png">
|
|
||||||
</Col>
|
|
||||||
</row>
|
|
||||||
</Content>
|
|
||||||
</Layout>
|
|
||||||
</Layout>
|
</Layout>
|
||||||
</Layout>
|
</Layout>
|
||||||
</div>
|
</div>
|
||||||
@@ -114,7 +94,6 @@
|
|||||||
|
|
||||||
#camera, #main-layout {
|
#camera, #main-layout {
|
||||||
background-color: #272e35;
|
background-color: #272e35;
|
||||||
/* padding: 100px 30px 30px 30px; */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#main-nav {
|
#main-nav {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<h4>camera</h4>
|
<h4>Camera</h4>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
27
chameleon-client/src/components/Settings.vue
Normal file
27
chameleon-client/src/components/Settings.vue
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<template>
|
||||||
|
<Layout id="main-layout">
|
||||||
|
<Content id="main-content">
|
||||||
|
<row type="flex" justify="start" align="middle" :gutter="5" >
|
||||||
|
<Col span="12">
|
||||||
|
<router-view></router-view>
|
||||||
|
</Col>
|
||||||
|
</row>
|
||||||
|
</Content>
|
||||||
|
</Layout>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'Settings',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
45
chameleon-client/src/components/Vision.vue
Normal file
45
chameleon-client/src/components/Vision.vue
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<template>
|
||||||
|
<Layout id="main-layout">
|
||||||
|
<Header id="main-header">
|
||||||
|
<Row type="flex" justify="start" align="middle" :gutter="10">
|
||||||
|
<Col span="12">
|
||||||
|
<chselect title="select a camera" :list="[1,2,3]"></chselect>
|
||||||
|
</Col>
|
||||||
|
<Col span="12">
|
||||||
|
<chselect title="select pipline" :list="[0,1,2,3,4,5,6,7,8,9]"></chselect>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
</Header>
|
||||||
|
<Content id="main-content">
|
||||||
|
<row type="flex" justify="start" align="middle" :gutter="5" >
|
||||||
|
<Col span="12">
|
||||||
|
<router-view></router-view>
|
||||||
|
</Col>
|
||||||
|
<img src="../assets/logo.png">
|
||||||
|
</Col>
|
||||||
|
</row>
|
||||||
|
</Content>
|
||||||
|
</Layout>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Vue from "vue"
|
||||||
|
import chselect from './ch-select.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Vision',
|
||||||
|
components: {
|
||||||
|
chselect
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
import VueRouter from "vue-router";
|
import VueRouter from "vue-router";
|
||||||
|
import Vision from "./components/Vision.vue"
|
||||||
|
import Setting from "./components/Settings.vue"
|
||||||
import Input from "./components/InputTab.vue";
|
import Input from "./components/InputTab.vue";
|
||||||
import Threshold from "./components/ThresholdTab.vue";
|
import Threshold from "./components/ThresholdTab.vue";
|
||||||
import System from "./components/SystemTab.vue";
|
import System from "./components/SystemTab.vue";
|
||||||
@@ -7,15 +9,19 @@ import Contours from "./components/contourTab.vue";
|
|||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{ path: '/', redirect: '/vision/input'},
|
{ path: '/', redirect: '/vision/input'},
|
||||||
{ path: '/vision/input', component: Input, name:'input' },
|
{ path: '/vision', component: Vision, children: [
|
||||||
{ path: '/vision/threshold', component: Threshold ,name:'threshold'},
|
{ path: 'input', component: Input },
|
||||||
{path:'/settings/system', component: System },
|
{ path: 'threshold', component: Threshold },
|
||||||
{path:'/settings/camera', component: Camera},
|
{ path: 'contours', component: Contours }
|
||||||
{path:'/settings/contours', component: Contours}
|
]},
|
||||||
|
{ path: '/settings', component: Setting, children: [
|
||||||
|
{ path: 'system', component: System },
|
||||||
|
{ path: 'camera', component: Camera }
|
||||||
|
]}
|
||||||
]
|
]
|
||||||
|
|
||||||
const router = new VueRouter({
|
const router = new VueRouter({
|
||||||
routes // short for `routes: routes`
|
routes
|
||||||
})
|
})
|
||||||
|
|
||||||
export default router;
|
export default router;
|
||||||
Reference in New Issue
Block a user