You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
1.9 KiB
79 lines
1.9 KiB
<template>
|
|
<navbar @accountClick="$router.push('/admin')" />
|
|
|
|
<div class="central-view">
|
|
<sidebar>
|
|
<admin-sidebar-menu :sidebarItems="sidebarItems" @activeRouteChange="activeRouteChange" />
|
|
</sidebar>
|
|
|
|
<div class="main-view">
|
|
<router-view></router-view>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
import UploadScreen from '@/components/UploadScreen.vue'
|
|
import ActiveSchemaScreen from '@/components/ActiveSchemaScreen.vue'
|
|
import Navbar from '@/components/Navbar.vue'
|
|
import Sidebar from '@/components/Sidebar.vue'
|
|
import AdminSidebarMenu from '@/components/AdminSidebarMenu.vue'
|
|
export default {
|
|
name: "admin-view",
|
|
components: { UploadScreen, ActiveSchemaScreen, Navbar, Sidebar, AdminSidebarMenu },
|
|
data() {
|
|
return {
|
|
sidebarItems: [
|
|
{
|
|
title: "Active Schema",
|
|
icon: "fact_check",
|
|
active: true,
|
|
route: "active-schema",
|
|
},
|
|
{
|
|
title: "Review Data",
|
|
icon: "dashboard",
|
|
route: "review-data"
|
|
},
|
|
{
|
|
title: "Upload",
|
|
icon: "file_upload",
|
|
route: "upload",
|
|
},
|
|
|
|
]
|
|
}
|
|
},
|
|
methods: {
|
|
activeRouteChange(route) {
|
|
this.sidebarItems.forEach(item => {
|
|
if (item.route === route) {
|
|
item.active = true
|
|
}
|
|
else {
|
|
item.active = false
|
|
}
|
|
});
|
|
}
|
|
},
|
|
}
|
|
</script>
|
|
|
|
|
|
<style lang="css" scoped>
|
|
.central-view {
|
|
height: max(100vh, 100%);
|
|
margin: 0;
|
|
display: flex;
|
|
flex-direction: row;
|
|
flex: 1 0 100vh;
|
|
}
|
|
|
|
.main-view {
|
|
width: 70%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex: 1 0;
|
|
}
|
|
</style> |