env & dev suffix

This commit is contained in:
2023-07-04 23:01:05 +02:00
parent 1fa3d4c3a1
commit 105aeddde1
2 changed files with 7 additions and 3 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ node_modules
# local env files
.env.local
.env.*.local
.env
# Log files
npm-debug.log*
@@ -21,4 +22,4 @@ pnpm-debug.log*
*.njsproj
*.sln
*.sw?
node_modules
node_modules
+5 -2
View File
@@ -39,7 +39,7 @@
</div>
&copy;
<a href="https://td2.info.pl/profile/?u=20777" target="_blank">Spythere</a>
{{ new Date().getUTCFullYear() }} | v{{ VERSION }}
{{ new Date().getUTCFullYear() }} | v{{ VERSION }}{{ !isOnProductionHost ? 'dev' : '' }}
</footer>
</div>
</template>
@@ -69,11 +69,14 @@ export default defineComponent({
data: () => ({
VERSION: packageInfo.version,
store: useStore(),
isOnProductionHost: location.hostname == 'pojazdownik-td2.web.app',
}),
async created() {
const stockData = await (
await fetch(`https://spythere.github.io/api/td2/data/stockInfo.json?t=${Math.floor(Date.now() / 60000)}`)
await fetch(
`https://spythere.github.io/api/td2/data/stockInfo${import.meta.env['VITE_STOCK_DEV'] == '1' ? 'Dev' : ''}.json`
)
).json();
this.store.stockData = stockData;