Merge do wersji 1.4.3

This commit is contained in:
Spythere
2023-07-05 00:07:55 +02:00
committed by GitHub
5 changed files with 28 additions and 10 deletions
+4
View File
@@ -6,6 +6,7 @@ node_modules
# local env files # local env files
.env.local .env.local
.env.*.local .env.*.local
.env
# Log files # Log files
npm-debug.log* npm-debug.log*
@@ -22,3 +23,6 @@ pnpm-debug.log*
*.sln *.sln
*.sw? *.sw?
node_modules node_modules
# Dev files
stockInfoDev.json
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "pojazdownik", "name": "pojazdownik",
"version": "1.4.2", "version": "1.4.3",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
+10 -7
View File
@@ -34,12 +34,12 @@
regulaminem symulatora Train Driver 2</a regulaminem symulatora Train Driver 2</a
>! >!
</div> </div>
<div class="text--grayed" style="margin-bottom: 0.25em"> <div class="text--grayed" style="margin-bottom: 0.25em" v-if="store.stockData">
Strona jest kompletna dla wersji 2022.2.2 symulatora TD2 Strona jest kompletna dla wersji {{ store.stockData.version }} symulatora TD2
</div> </div>
&copy; &copy;
<a href="https://td2.info.pl/profile/?u=20777" target="_blank">Spythere</a> <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> </footer>
</div> </div>
</template> </template>
@@ -69,13 +69,16 @@ export default defineComponent({
data: () => ({ data: () => ({
VERSION: packageInfo.version, VERSION: packageInfo.version,
store: useStore(), store: useStore(),
isOnProductionHost: location.hostname == 'pojazdownik-td2.web.app',
}), }),
async created() { async created() {
const stockData = await ( /* dev info testing */
await fetch(`https://spythere.github.io/api/td2/data/stockInfo.json?t=${Math.floor(Date.now() / 60000)}`) // if (import.meta.env['VITE_STOCK_DEV'] == '1') {
).json(); // 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; this.store.stockData = stockData;
// routing // routing
+9
View File
@@ -7,6 +7,14 @@
"2000": 70 "2000": 70
} }
}, },
"EU07E": {
"passenger": {
"650": 125
},
"cargo": {
"2000": 70
}
},
"EP07": { "EP07": {
"passenger": { "passenger": {
"650": 125 "650": 125
@@ -51,3 +59,4 @@
} }
} }
+3 -1
View File
@@ -41,8 +41,10 @@ export interface IStockProps {
} }
export interface IStockData { export interface IStockData {
version: string;
generator: { generator: {
passenger: []; passenger: any;
cargo: { cargo: {
[key: string]: string[]; [key: string]: string[];
}; };