Nowe ikony; poprawki w działaniu listy i wyboru pojazdów

This commit is contained in:
2022-07-31 23:53:41 +02:00
parent 0ccd4f6460
commit f59f9fdd35
34 changed files with 78 additions and 10 deletions
+8 -3
View File
@@ -10,7 +10,7 @@
v-model="store.chosenLoco"
@focus="onVehicleSelect('loco')"
@input="onVehicleSelect('loco')"
@keydown.enter="addVehicle"
@keydown.enter="addOrSwitchVehicle"
@keydown.backspace="removeVehicle"
>
<option :value="null" disabled>Wybierz pojazd trakcyjny</option>
@@ -28,7 +28,7 @@
v-model="store.chosenCar"
@focus="onVehicleSelect('car')"
@input="onVehicleSelect('car')"
@keydown.enter="addVehicle"
@keydown.enter="addOrSwitchVehicle"
@keydown.backspace="removeVehicle"
>
<option :value="null" disabled>Wybierz wagon</option>
@@ -53,7 +53,7 @@
v-model="store.chosenCargo"
@focus="onVehicleSelect('car')"
@input="onVehicleSelect('car')"
@keydown.enter="addVehicle"
@keydown.enter="addOrSwitchVehicle"
@keydown.backspace="removeVehicle"
>
<option :value="null" v-if="!store.chosenCar || !store.chosenCar.loadable">brak dostępnych ładunków</option>
@@ -161,6 +161,11 @@ export default defineComponent({
});
},
addOrSwitchVehicle() {
if (this.store.chosenStockListIndex == -1) this.addVehicle();
else this.switchVehicles();
},
removeVehicle() {
if (this.store.stockList.length == 0) return;
+6
View File
@@ -434,6 +434,7 @@ export default defineComponent({
flex-wrap: wrap;
margin: 1em 0;
outline: 1px solid white;
&.no-chosen-vehicle {
font-size: 1.05em;
@@ -500,6 +501,11 @@ ul > li {
&:focus-visible {
outline: 1px solid white;
}
&.list-empty {
outline: 1px solid white;
padding: 0.5em;
}
}
li > .stock-info {
+2 -2
View File
@@ -159,8 +159,8 @@ export default defineComponent({
},
data: () => ({
randomStockMass: 1500,
randomStockLength: 650,
randomStockMass: 650,
randomStockLength: 350,
chosenCarTypes: [] as string[],
cargoFillModeList: [