Skip to content

Commit

Permalink
feat: Add build date in about
Browse files Browse the repository at this point in the history
  • Loading branch information
artonge committed Aug 27, 2024
1 parent 80bc1af commit 579dc70
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions env.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/// <reference types="vite/client" />
declare const BUILD_DATE: string;
16 changes: 12 additions & 4 deletions src/views/AboutView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { useWeatherModelsStore, type ModelInfo } from "@/stores/weatherModels"
const store = useWeatherModelsStore()
const { models } = storeToRefs(store)
const buildDate = BUILD_DATE
let drag = false
</script>
Expand All @@ -20,7 +21,7 @@ let drag = false
</RouterLink>
</header>
<main>
<div class="about-models">
<div class="about-section about-models">
<h3>Models</h3>
<div>
<draggable
Expand All @@ -45,6 +46,9 @@ let drag = false
</button>
</div>
</div>
<div class="about-section build-date">
<h3>Build date</h3> {{ buildDate }}
</div>
</main>
</template>
<style scoped lang="scss">
Expand All @@ -63,8 +67,10 @@ header {
}
main {
height: calc(100dvh - 80px);
display: flex;
flex-direction: column;
gap: 20px;
height: calc(100dvh - 80px);
padding: 20px 50px;
box-sizing: border-box;
overflow: scroll;
Expand All @@ -73,16 +79,18 @@ main {
padding: 10px;
}
.about-models {
.about-section {
display: flex;
gap: 16px;
align-items: start;
gap: 16px;
height: fit-content;
h3 {
margin: 0;
}
}
.about-models {
&-restore-button {
display: flex;
align-items: center;
Expand Down
3 changes: 3 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ export default defineConfig({
},
})
],
define: {
BUILD_DATE: JSON.stringify(new Date().toDateString())
},
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
Expand Down

0 comments on commit 579dc70

Please sign in to comment.