mirror of
https://github.com/Spythere/pojazdownik.git
synced 2026-05-03 05:18:10 +00:00
Nowe ikony; poprawki w działaniu listy i wyboru pojazdów
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -159,8 +159,8 @@ export default defineComponent({
|
||||
},
|
||||
|
||||
data: () => ({
|
||||
randomStockMass: 1500,
|
||||
randomStockLength: 650,
|
||||
randomStockMass: 650,
|
||||
randomStockLength: 350,
|
||||
chosenCarTypes: [] as string[],
|
||||
|
||||
cargoFillModeList: [
|
||||
|
||||
Reference in New Issue
Block a user