Skip to content

Commit 579dc70

Browse files
committed
feat: Add build date in about
1 parent 80bc1af commit 579dc70

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

env.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/// <reference types="vite/client" />
2+
declare const BUILD_DATE: string;

src/views/AboutView.vue

+12-4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { useWeatherModelsStore, type ModelInfo } from "@/stores/weatherModels"
1010
1111
const store = useWeatherModelsStore()
1212
const { models } = storeToRefs(store)
13+
const buildDate = BUILD_DATE
1314
1415
let drag = false
1516
</script>
@@ -20,7 +21,7 @@ let drag = false
2021
</RouterLink>
2122
</header>
2223
<main>
23-
<div class="about-models">
24+
<div class="about-section about-models">
2425
<h3>Models</h3>
2526
<div>
2627
<draggable
@@ -45,6 +46,9 @@ let drag = false
4546
</button>
4647
</div>
4748
</div>
49+
<div class="about-section build-date">
50+
<h3>Build date</h3> {{ buildDate }}
51+
</div>
4852
</main>
4953
</template>
5054
<style scoped lang="scss">
@@ -63,8 +67,10 @@ header {
6367
}
6468
6569
main {
66-
height: calc(100dvh - 80px);
6770
display: flex;
71+
flex-direction: column;
72+
gap: 20px;
73+
height: calc(100dvh - 80px);
6874
padding: 20px 50px;
6975
box-sizing: border-box;
7076
overflow: scroll;
@@ -73,16 +79,18 @@ main {
7379
padding: 10px;
7480
}
7581
76-
.about-models {
82+
.about-section {
7783
display: flex;
78-
gap: 16px;
7984
align-items: start;
85+
gap: 16px;
8086
height: fit-content;
8187
8288
h3 {
8389
margin: 0;
8490
}
91+
}
8592
93+
.about-models {
8694
&-restore-button {
8795
display: flex;
8896
align-items: center;

vite.config.ts

+3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ export default defineConfig({
4242
},
4343
})
4444
],
45+
define: {
46+
BUILD_DATE: JSON.stringify(new Date().toDateString())
47+
},
4548
resolve: {
4649
alias: {
4750
'@': fileURLToPath(new URL('./src', import.meta.url)),

0 commit comments

Comments
 (0)