diff --git a/.gitignore b/.gitignore index c937749..6999898 100644 --- a/.gitignore +++ b/.gitignore @@ -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 \ No newline at end of file +node_modules diff --git a/src/App.vue b/src/App.vue index b42774d..54bce06 100644 --- a/src/App.vue +++ b/src/App.vue @@ -39,7 +39,7 @@ © Spythere - {{ new Date().getUTCFullYear() }} | v{{ VERSION }} + {{ new Date().getUTCFullYear() }} | v{{ VERSION }}{{ !isOnProductionHost ? 'dev' : '' }} @@ -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;