mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
chore(stock): added stock vehicle thumbnails size variable; changed scenery timetable stock previews to 45
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user