From 4d997d79e1ecf37af4d7d0a574910c466b3c86ca Mon Sep 17 00:00:00 2001 From: Spythere Date: Mon, 15 Aug 2022 00:05:11 +0200 Subject: [PATCH] Drobne poprawki --- src/components/ListSection.vue | 47 ++++++++++++------------- src/components/cards/RandomizerCard.vue | 10 +++--- src/components/cards/RealStockCard.vue | 7 ++-- src/store.ts | 2 +- src/styles/global.scss | 2 ++ src/types.ts | 2 +- src/utils/vehicleUtils.ts | 7 +++- 7 files changed, 40 insertions(+), 37 deletions(-) diff --git a/src/components/ListSection.vue b/src/components/ListSection.vue index 61c4a56..fb10c00 100644 --- a/src/components/ListSection.vue +++ b/src/components/ListSection.vue @@ -72,25 +72,24 @@ -
- +
+
- {{ store.chosenRealStock.number }} {{ store.chosenRealStock.name }} + {{ store.chosenRealStock.number }} {{ store.chosenRealStock.name }} + + | -
- Masa: {{ store.totalMass }}t | Długość: + + Masa: {{ store.totalMass }}t - Długość: {{ store.totalLength }}m - | Vmax pociągu: {{ store.maxStockSpeed }} km/h -
+ - Vmax pociągu: {{ store.maxStockSpeed }} km/h +
@@ -348,12 +347,12 @@ export default defineComponent({ }, downloadStock() { - if (this.stockHasWarnings()) { - alert('Jazda tym pociągiem jest niezgodna z regulaminem symulatora! Zmień parametry zestawienia!'); - return; - } + if (this.store.stockList.length == 0) return alert('Lista pojazdów jest pusta!'); - const fileName = prompt('Nazwij plik:', 'pociag'); + if (this.stockHasWarnings()) + return alert('Jazda tym pociągiem jest niezgodna z regulaminem symulatora! Zmień parametry zestawienia!'); + + const fileName = prompt('Nazwij plik:', `${this.store.chosenRealStockName || this.store.stockList[0].type}`); if (!fileName) return; @@ -398,13 +397,12 @@ export default defineComponent({