Skip to content

Commit

Permalink
added version output to template, less console logging
Browse files Browse the repository at this point in the history
  • Loading branch information
magenbrot committed Oct 4, 2024
1 parent fbb7785 commit 7e7ca37
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_APP_VERSION=$npm_package_version
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ffpostcreator",
"version": "2024.10.02",
"version": "2024.10.04",
"private": true,
"type": "module",
"scripts": {
Expand Down
6 changes: 5 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
import LayoutStart from "./components/LayoutStart.vue";
import LayoutForm from "./components/LayoutForm.vue";
const version = import.meta.env.VITE_APP_VERSION
console.log('Version:', version)
export default {
components: {LayoutForm, LayoutStart},
data() {
return {
started: true, // set to false for introduction text
version: version
}
},
}
Expand All @@ -15,10 +19,10 @@ export default {
<template>
<div class="container" style="max-width: 900px;">


<section class="section pt-0">
<div class="tags mt-2 mb-1">
<a href="https://github.com/magenbrot/Feuerwehr-Beitrag-Generator" title="Quellcode ansehen" target="_blank" rel="me external" class="tag is-info is-rounded">Quellcode (github.com)</a>
Version {{version}}
</div>

<h1 class="title is-2">Feuerwehr Beitrag Generator</h1>
Expand Down
20 changes: 9 additions & 11 deletions src/components/LayoutForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ export default {
einheiten: '',
bericht: '',
tags: '#feuerwehr #einsatzbericht #einsatzinfo #firefighter #ehrenamt #werdau #landkreiszwickau #leitstelle #112',
link: '',
copycontent: ''
link: ''
}
},
methods: {
Expand All @@ -27,31 +26,30 @@ export default {
}
},
set_stichwort(e) {
console.log(e.target.innerText)
// console.log(e.target.innerText)
this.$data.stichwort = e.target.innerText;
},
set_datum_uhrzeit(e) {
console.log(e.target.innerText)
console.log(new moment().format("HH:mm"))
// console.log(e.target.innerText)
// console.log(new moment().format("HH:mm"))
this.$data.datum = new moment().format("YYYY-MM-DD");
this.$data.jahr = new moment().format("YYYY");
this.$data.uhrzeit = new moment().format("HH:mm");
},
set_dauer(e) {
console.log(e.target.innerText)
// console.log(e.target.innerText)
this.$data.dauer = e.target.innerText;
},
set_ort(e) {
console.log(e.target.innerText)
// console.log(e.target.innerText)
this.$data.ort = e.target.innerText + ", ";
},
set_einheiten(e) {
console.log(e.target.innerText)
// console.log(e.target.innerText)
if (this.$data.einheiten.length == 0) {
this.$data.einheiten = e.target.innerText;
Expand All @@ -60,12 +58,12 @@ export default {
}
},
set_bericht(e) {
console.log(e.target.innerText)
// console.log(e.target.innerText)
this.$data.bericht = e.target.innerText;
},
set_tags(e) {
console.log(e.target.innerText)
// console.log(e.target.innerText)
this.$data.tags = this.$data.tags + " " + e.target.innerText
},
Expand Down

0 comments on commit 7e7ca37

Please sign in to comment.