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