diff --git a/.gitignore b/.gitignore
index c937749..3331163 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,7 @@ pnpm-debug.log*
*.njsproj
*.sln
*.sw?
-node_modules
\ No newline at end of file
+node_modules
+
+# Dev files
+stockInfoDev.json
\ No newline at end of file
diff --git a/package.json b/package.json
index df1029f..bbef498 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "pojazdownik",
- "version": "1.4.2",
+ "version": "1.4.3",
"private": true,
"scripts": {
"dev": "vite",
diff --git a/src/App.vue b/src/App.vue
index b42774d..5c35709 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -34,12 +34,12 @@
regulaminem symulatora Train Driver 2!
-
- Strona jest kompletna dla wersji 2022.2.2 symulatora TD2
+
+ Strona jest kompletna dla wersji {{ store.stockData.version }} symulatora TD2
©
Spythere
- {{ new Date().getUTCFullYear() }} | v{{ VERSION }}
+ {{ new Date().getUTCFullYear() }} | v{{ VERSION }}{{ !isOnProductionHost ? 'dev' : '' }}
@@ -69,13 +69,16 @@ 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)}`)
- ).json();
-
+ /* dev info testing */
+ // if (import.meta.env['VITE_STOCK_DEV'] == '1') {
+ // const data = await import('../stockInfoDev.json');
+ // this.store.stockData = data.default as any;
+ // }
+ const stockData = await (await fetch(`https://spythere.github.io/api/td2/data/stockInfo.json`)).json();
this.store.stockData = stockData;
// routing
diff --git a/src/constants/speedLimits.json b/src/constants/speedLimits.json
index a838c40..7da7436 100644
--- a/src/constants/speedLimits.json
+++ b/src/constants/speedLimits.json
@@ -7,6 +7,14 @@
"2000": 70
}
},
+ "EU07E": {
+ "passenger": {
+ "650": 125
+ },
+ "cargo": {
+ "2000": 70
+ }
+ },
"EP07": {
"passenger": {
"650": 125
@@ -51,3 +59,4 @@
}
}
+
diff --git a/src/types.ts b/src/types.ts
index c817477..711fc89 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -41,8 +41,10 @@ export interface IStockProps {
}
export interface IStockData {
+ version: string;
+
generator: {
- passenger: [];
+ passenger: any;
cargo: {
[key: string]: string[];
};