Skip to content

Commit 5aff67c

Browse files
committed
Menu with Vuetify
1 parent 71785ee commit 5aff67c

4 files changed

Lines changed: 87 additions & 28 deletions

File tree

frontend/package-lock.json

Lines changed: 36 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212
"preview": "vite preview"
1313
},
1414
"dependencies": {
15+
"@mdi/font": "^7.4.47",
1516
"sql.js": "^1.13.0",
16-
"vue": "^3.5.25"
17+
"vue": "^3.5.25",
18+
"vuetify": "^3.11.4"
1719
},
1820
"devDependencies": {
1921
"@vitejs/plugin-vue": "^6.0.2",

frontend/src/App.vue

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -62,46 +62,54 @@ const handleFileUpload = async (file) => {
6262
6363
reader.readAsArrayBuffer(file);
6464
};
65+
66+
const items = [
67+
{
68+
title: 'About',
69+
value: 'about',
70+
},
71+
];
72+
const drawer = ref(false);
6573
</script>
6674

6775
<template>
68-
<main>
69-
<div v-if="!selectedFile" class="select-view">
70-
<FileUploader :handleFile="handleFileUpload" />
71-
<p>Your file not will be uploaded to the internet. You can disable internet connection.</p>
72-
</div>
73-
<div v-else class="file-view">
74-
<CoinList :file_name="selectedFile.name" :coins_list="coinsList" />
75-
</div>
76-
<div v-if="status" class="status">{{ status }}</div>
77-
</main>
76+
<v-layout>
77+
<v-app-bar color="primary">
78+
<v-app-bar-nav-icon
79+
variant="text"
80+
@click.stop="drawer = !drawer"
81+
></v-app-bar-nav-icon>
82+
83+
<v-toolbar-title>OpenNumismat</v-toolbar-title>
84+
</v-app-bar>
85+
86+
<v-navigation-drawer v-model="drawer" temporary>
87+
<v-list :items="items"></v-list>
88+
</v-navigation-drawer>
89+
90+
<v-main>
91+
<div v-if="!selectedFile" class="select-view">
92+
<FileUploader :handleFile="handleFileUpload" />
93+
<p>Your file not will be uploaded to the internet. You can disable internet connection.</p>
94+
</div>
95+
<div v-else class="file-view">
96+
<CoinList :file_name="selectedFile.name" :coins_list="coinsList" />
97+
</div>
98+
<div v-if="status" class="status">{{ status }}</div>
99+
</v-main>
100+
</v-layout>
78101
</template>
79102

80103
<style scoped>
81104
header {
82105
line-height: 1.5;
83106
}
84107
85-
.logo {
86-
display: block;
87-
margin: 0 auto 2rem;
88-
}
89-
90108
@media (min-width: 1024px) {
91109
header {
92110
display: flex;
93111
place-items: center;
94112
padding-right: calc(var(--section-gap) / 2);
95113
}
96-
97-
.logo {
98-
margin: 0 2rem 0 0;
99-
}
100-
101-
header .wrapper {
102-
display: flex;
103-
place-items: flex-start;
104-
flex-wrap: wrap;
105-
}
106114
}
107115
</style>

frontend/src/main.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
import './assets/main.css'
2+
import '@mdi/font/css/materialdesignicons.css'
23

34
import { createApp } from 'vue'
5+
6+
// Vuetify
7+
import 'vuetify/styles'
8+
import { createVuetify } from 'vuetify'
9+
import * as components from 'vuetify/components'
10+
import * as directives from 'vuetify/directives'
11+
12+
// Components
413
import App from './App.vue'
514

6-
createApp(App).mount('#app')
15+
const vuetify = createVuetify({
16+
components,
17+
directives,
18+
})
19+
20+
createApp(App).use(vuetify).mount('#app')

0 commit comments

Comments
 (0)