@@ -12,6 +12,18 @@ const status = ref('');
1212
1313let SQL = null ;
1414
15+ import { useRoute , useRouter } from ' vue-router'
16+
17+ const router = useRouter ()
18+ const route = useRoute ()
19+
20+ const drawer = ref (false )
21+
22+ const goToHome = () => {
23+ router .push (' /' )
24+ drawer .value = false
25+ }
26+
1527onMounted (async () => {
1628 try {
1729 SQL = await initSqlJs ({
@@ -62,32 +74,41 @@ const handleFileUpload = async (file) => {
6274
6375 reader .readAsArrayBuffer (file);
6476};
65-
66- const items = [
67- {
68- title: ' About' ,
69- value: ' about' ,
70- },
71- ];
72- const drawer = ref (false );
7377 </script >
7478
7579<template >
7680 <v-layout >
77- <v-app-bar color =" primary" >
81+ <v-app-bar color =" primary" v-if = " route.path === '/' " >
7882 <v-app-bar-nav-icon
79- variant =" text"
8083 @click.stop =" drawer = !drawer"
8184 ></v-app-bar-nav-icon >
8285
8386 <v-toolbar-title >OpenNumismat</v-toolbar-title >
8487 </v-app-bar >
88+ <v-app-bar color =" primary" v-else >
89+ <v-app-bar-nav-icon
90+ icon =" mdi-chevron-left"
91+ @click.stop =" goToHome()"
92+ ></v-app-bar-nav-icon >
93+
94+ <v-toolbar-title >About</v-toolbar-title >
95+ </v-app-bar >
8596
8697 <v-navigation-drawer v-model =" drawer" temporary >
87- <v-list :items =" items" ></v-list >
98+ <v-list >
99+ <v-list-item
100+ prepend-icon =" mdi-information"
101+ title =" About"
102+ value =" about"
103+ @click =" router.push('/about')"
104+ :active =" route.path === '/about'"
105+ ></v-list-item >
106+ </v-list >
88107 </v-navigation-drawer >
89108
90- <v-main >
109+ <router-view ></router-view >
110+
111+ <v-main v-if =" route.path !== '/about'" >
91112 <div v-if =" !selectedFile" class =" select-view" >
92113 <FileUploader :handleFile =" handleFileUpload" />
93114 <p >Your file not will be uploaded to the internet. You can disable internet connection.</p >
0 commit comments