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
+5 -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,7 @@ pnpm-debug.log*
*.njsproj
*.sln
*.sw?
node_modules
node_modules
# Dev files
stockInfoDev.json
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "pojazdownik",
"version": "1.4.2",
"version": "1.4.3",
"private": true,
"scripts": {
"dev": "vite",
+10 -7
View File
@@ -34,12 +34,12 @@
regulaminem symulatora Train Driver 2</a
>!
</div>
<div class="text--grayed" style="margin-bottom: 0.25em">
Strona jest kompletna dla wersji 2022.2.2 symulatora TD2
<div class="text--grayed" style="margin-bottom: 0.25em" v-if="store.stockData">
Strona jest kompletna dla wersji {{ store.stockData.version }} symulatora TD2
</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,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
+9
View File
@@ -7,6 +7,14 @@
"2000": 70
}
},
"EU07E": {
"passenger": {
"650": 125
},
"cargo": {
"2000": 70
}
},
"EP07": {
"passenger": {
"650": 125
@@ -51,3 +59,4 @@
}
}
+3 -1
View File
@@ -41,8 +41,10 @@ export interface IStockProps {
}
export interface IStockData {
version: string;
generator: {
passenger: [];
passenger: any;
cargo: {
[key: string]: string[];
};