added dotenv-webpack, vue.config.js + version to footer
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
"axios": "^0.22.0",
|
"axios": "^0.22.0",
|
||||||
"bootstrap": "^5.1.2",
|
"bootstrap": "^5.1.2",
|
||||||
"core-js": "^3.18.2",
|
"core-js": "^3.18.2",
|
||||||
|
"dotenv-webpack": "^7.0.3",
|
||||||
"echarts": "^5.2.1",
|
"echarts": "^5.2.1",
|
||||||
"jquery": "^3.6.0",
|
"jquery": "^3.6.0",
|
||||||
"luxon": "^2.0.2",
|
"luxon": "^2.0.2",
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="footer bg-secondary text-center pt-5 pb-4">
|
<div class="footer bg-secondary text-center pt-4 pb-4">
|
||||||
<div class="icons pb-4">
|
<div class="icons pb-4">
|
||||||
<a aria-label="Git Link" class="gitea text-white" href="https://git.harting.dev/CSGOWTF" target="_blank">
|
<a aria-label="Git Link" class="gitea text-white" href="https://git.harting.dev/CSGOWTF" target="_blank">
|
||||||
<!-- <i class="bi bi-github"></i>-->
|
<!-- <i class="bi bi-github"></i>-->
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
<p class="text-muted">For feedback open an <a class="text-decoration-none text-warning"
|
<p class="text-muted">For feedback open an <a class="text-decoration-none text-warning"
|
||||||
href="https://git.harting.dev/CSGOWTF/csgowtf/issues"
|
href="https://git.harting.dev/CSGOWTF/csgowtf/issues"
|
||||||
target="_blank">issue</a>.</p>
|
target="_blank">issue</a>.</p>
|
||||||
|
<p class="text-muted">Build-Version: <span class="text-white">{{ version }}</span></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -19,6 +20,10 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "Footer",
|
name: "Footer",
|
||||||
|
setup() {
|
||||||
|
const version = process.env.VUE_APP_VERSION
|
||||||
|
return {version}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
11
src/main.js
11
src/main.js
@@ -11,15 +11,16 @@ const app = createApp(App)
|
|||||||
app.use(store)
|
app.use(store)
|
||||||
app.use(router)
|
app.use(router)
|
||||||
|
|
||||||
if (process.env.TRACKING) {
|
if (process.env.VUE_APP_TRACKING) {
|
||||||
app.use(
|
app.use(
|
||||||
VueMatomo, {
|
VueMatomo, {
|
||||||
host: process.env.TRACK_URL,
|
host: process.env.VUE_APP_TRACK_URL,
|
||||||
siteId: process.env.TRACK_ID,
|
siteId: process.env.VUE_APP_TRACK_ID,
|
||||||
cookieDomain: process.env.TRACK_DOMAINS,
|
cookieDomain: process.env.VUE_APP_TRACK_DOMAINS,
|
||||||
domains: process.env.TRACK_DOMAINS,
|
domains: process.env.VUE_APP_TRACK_DOMAINS,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
app.mount('#app')
|
app.mount('#app')
|
||||||
|
|
||||||
|
10
vue.config.js
Normal file
10
vue.config.js
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
const Dotenv = require('dotenv-webpack');
|
||||||
|
process.env.VUE_APP_VERSION = require('./package.json').version
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
configureWebpack: {
|
||||||
|
plugins: [
|
||||||
|
new Dotenv()
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
21
yarn.lock
21
yarn.lock
@@ -4034,6 +4034,7 @@ __metadata:
|
|||||||
babel-eslint: ^10.1.0
|
babel-eslint: ^10.1.0
|
||||||
bootstrap: ^5.1.2
|
bootstrap: ^5.1.2
|
||||||
core-js: ^3.18.2
|
core-js: ^3.18.2
|
||||||
|
dotenv-webpack: ^7.0.3
|
||||||
echarts: ^5.2.1
|
echarts: ^5.2.1
|
||||||
eslint: ^6.8.0
|
eslint: ^6.8.0
|
||||||
eslint-plugin-vue: ^7.19.1
|
eslint-plugin-vue: ^7.19.1
|
||||||
@@ -4618,6 +4619,15 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"dotenv-defaults@npm:^2.0.2":
|
||||||
|
version: 2.0.2
|
||||||
|
resolution: "dotenv-defaults@npm:2.0.2"
|
||||||
|
dependencies:
|
||||||
|
dotenv: ^8.2.0
|
||||||
|
checksum: c005960bd048e2189c4799e729c41f362e415e6e0b54313d3f31e853a84b049bf770b25cb21c112c2805bb13a8376edc9de451fb514abf8546392d327c27f6e5
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"dotenv-expand@npm:^5.1.0":
|
"dotenv-expand@npm:^5.1.0":
|
||||||
version: 5.1.0
|
version: 5.1.0
|
||||||
resolution: "dotenv-expand@npm:5.1.0"
|
resolution: "dotenv-expand@npm:5.1.0"
|
||||||
@@ -4625,6 +4635,17 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"dotenv-webpack@npm:^7.0.3":
|
||||||
|
version: 7.0.3
|
||||||
|
resolution: "dotenv-webpack@npm:7.0.3"
|
||||||
|
dependencies:
|
||||||
|
dotenv-defaults: ^2.0.2
|
||||||
|
peerDependencies:
|
||||||
|
webpack: ^4 || ^5
|
||||||
|
checksum: d80dcbebe3b9e8f6251b3eb15647bb647bf358172ff21d2eaa4bb012afc9eaa7f4ba6c452f2dafd40afc96474e8c7ffbd21f0a2896eec244eff59a79e32c7716
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"dotenv@npm:^8.2.0":
|
"dotenv@npm:^8.2.0":
|
||||||
version: 8.6.0
|
version: 8.6.0
|
||||||
resolution: "dotenv@npm:8.6.0"
|
resolution: "dotenv@npm:8.6.0"
|
||||||
|
Reference in New Issue
Block a user