Masa: {{ store.totalMass }}t | Długość:
@@ -234,14 +261,15 @@ export default defineComponent({
const chosenLoco = this.store.locoDataList.find((v) => v.type == vehicle.type) || null;
this.store.chosenVehicle = chosenLoco;
this.store.chosenLoco = chosenLoco;
-
// this.store.chosenCargo = null;
+ this.store.chosenLocoPower = vehicle.useType;
} else {
const chosenCar = this.store.carDataList.find((v) => v.type == vehicle.type) || null;
this.store.chosenVehicle = chosenCar;
this.store.chosenCar = chosenCar;
this.store.chosenCargo = vehicle.cargo || null;
+ this.store.chosenCarUseType = vehicle.useType;
}
if (this.store.swapVehicles) {
@@ -436,6 +464,16 @@ export default defineComponent({
margin: 1em 0;
outline: 1px solid white;
+ &[data-disabled='true'] {
+ opacity: 0.8;
+
+ user-select: none;
+ -moz-user-select: none;
+ -webkit-user-select: none;
+
+ pointer-events: none;
+ }
+
&.no-chosen-vehicle {
font-size: 1.05em;
padding: 0.5em;
@@ -454,16 +492,13 @@ export default defineComponent({
margin: 0.25em;
padding: 0.25em;
- border: 2px solid gray;
- border-radius: 0.25em;
-
&:focus-visible {
outline: 1px solid white;
}
img {
vertical-align: text-bottom;
- margin-right: 0.5em;
+ margin-right: 0.25em;
width: 1.1em;
height: 1.1em;
@@ -479,13 +514,11 @@ export default defineComponent({
ul {
position: relative;
- overflow-y: auto;
- overflow-x: hidden;
+ overflow: auto;
height: 50vh;
min-height: 500px;
margin-top: 1em;
- padding: 0.25em;
}
ul > li {
@@ -503,7 +536,7 @@ ul > li {
}
&.list-empty {
- outline: 1px solid white;
+ border: 1px solid white;
padding: 0.5em;
}
}
diff --git a/src/components/TrainImageSection.vue b/src/components/TrainImageSection.vue
index b302d1e..7c6c204 100644
--- a/src/components/TrainImageSection.vue
+++ b/src/components/TrainImageSection.vue
@@ -14,15 +14,14 @@
-
{{ store.chosenVehicle.type }}
+
{{ store.chosenVehicle.type }} •
+
{{
+ vehicleTypes[
+ isLocomotive(store.chosenVehicle) ? store.chosenVehicle.power : store.chosenVehicle.useType || 'loco-e'
+ ]
+ }}
-
{{
- vehicleTypes[
- isLocomotive(store.chosenVehicle) ? store.chosenVehicle.power : store.chosenVehicle.useType || 'loco-e'
- ]
- }}
-
{{ store.chosenVehicle.length }}m | {{ store.chosenVehicle.mass }}t |
{{ store.chosenVehicle.maxSpeed }} km/h
@@ -103,13 +102,12 @@ export default defineComponent({
grid-row: 2;
grid-column: 1;
- display: flex;
+ margin-top: 2em;
}
.train-image {
&__wrapper {
text-align: center;
-
}
&__content {
@@ -156,6 +154,7 @@ export default defineComponent({
.train-image__info {
margin: 1em 0;
font-size: 1.1em;
+ padding: 0 1em;
b {
font-size: 1.1em;
diff --git a/src/styles/global.scss b/src/styles/global.scss
index b581da2..70e3cc4 100644
--- a/src/styles/global.scss
+++ b/src/styles/global.scss
@@ -113,6 +113,18 @@ button.btn {
font-weight: bold;
transition: all 250ms;
border: none;
+
+ &:focus-visible {
+ outline: 1px solid white;
+ }
+ }
+
+ &--choice {
+ padding: 0.25em 0.3em;
+
+ &:focus-visible {
+ outline: 1px solid white;
+ }
}
}