Sidebar.vue
1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<template>
<div class="sidebar">
<!-- Side bar -->
<v-navigation-drawer
app
dark
width="220"
permanent
>
<!-- Header -->
<v-list-item>
<v-list-item-content>
<v-list-item-title class="title nonselectable-text">
{{ title }}
</v-list-item-title>
<v-list-item-subtitle class="nonselectable-text">
{{ subtitle }}
</v-list-item-subtitle>
</v-list-item-content>
</v-list-item>
<v-divider></v-divider>
<!-- Sidebar Items -->
<v-list dense nav>
<v-list-item
v-for="(item, idx) in items"
:to="item.route"
:key="idx"
class="sidebar-link"
link
>
<v-list-item-icon>
<v-icon>{{ item.icon }}</v-icon>
</v-list-item-icon>
<v-list-item-content>
<v-list-item-title>{{ item.title }}</v-list-item-title>
</v-list-item-content>
</v-list-item>
</v-list>
<!-- Version -->
<div class="version-wrapper">
<div class="body-2">{{ version.main }}</div>
<div class="caption">{{ version.build }}</div>
</div>
</v-navigation-drawer>
</div>
</template>
<script>
export default {
name: 'Sidebar',
data: () => ({
title: 'Image Labeller',
subtitle: 'for KHU Capstone Design 1',
items: [
{ title: 'Main', icon: 'mdi-view-dashboard', route: '/main' },
{ title: 'Settings', icon: 'mdi-cog-outline', route: '/settings' }
],
version: {
main: 'v0.7.3-alpha',
build: 'build-2004080227'
}
})
}
</script>
<style lang="scss" scoped>
.sidebar {
.nonselectable-text {
user-select: none;
}
.sidebar-link {
-webkit-app-region: no-drag;
}
.version-wrapper {
position: absolute;
bottom: 10px;
right: 10px;
color: #aaa;
text-align: right;
}
}
</style>