chore(stock): added stock vehicle thumbnails size variable; changed scenery timetable stock previews to 45

This commit is contained in:
2026-04-18 22:38:58 +02:00
parent 2b16213531
commit 88b02b20a5
3 changed files with 8 additions and 5 deletions
+3 -1
View File
@@ -8,6 +8,7 @@
:images="images"
:image-fallbacks="imagesFallbacks"
:show-previews="showPreviews"
:thumbnail-size="thumbnailSize"
/>
</li>
</ul>
@@ -25,7 +26,8 @@ export default defineComponent({
props: {
trainStockList: { type: Array as PropType<string[]>, required: true },
tractionOnly: { type: Boolean, required: false },
showPreviews: { type: Boolean }
showPreviews: { type: Boolean },
thumbnailSize: { type: Number }
},
data() {
+4 -3
View File
@@ -9,7 +9,7 @@
<img
v-for="(thumbnailImage, imageIndex) in images"
:src="`https://stacjownik.spythere.eu/static/thumbnails/${thumbnailImage}.png`"
height="70"
:height="thumbnailSize || 70"
loading="lazy"
:data-crosshair-cursor="showPreviews"
:data-tooltip-type="showPreviews ? 'VehiclePreviewTooltip' : ''"
@@ -28,7 +28,8 @@ const props = defineProps({
vehicleString: { type: String, required: true },
images: { type: Object as PropType<string[]>, required: true },
imageFallbacks: { type: Object as PropType<string[]>, required: true },
showPreviews: { type: Boolean }
showPreviews: { type: Boolean },
thumbnailSize: { type: Number }
});
const thumbRef = ref(null) as Ref<HTMLElement | null>;
@@ -67,7 +68,7 @@ function onImageLoad() {
max-width: 90%;
text-align: center;
color: #aaa;
font-size: 0.85em;
font-size: 0.8em;
margin: 0 auto;
padding: 0.25em 0;
}
@@ -210,7 +210,7 @@
</div>
<div class="item-stock-list" v-if="showStockThumbnails">
<StockList :trainStockList="row.train.stockList" />
<StockList :trainStockList="row.train.stockList" :thumbnailSize="45" />
</div>
</router-link>
</transition-group>