diff --git a/src/App.vue b/src/App.vue index a706c30..f37cefd 100644 --- a/src/App.vue +++ b/src/App.vue @@ -70,7 +70,7 @@ export default defineComponent({ async created() { const stockData = await ( - await fetch(`https://spythere.github.io/api/stockDataNew.json?t=${Math.floor(Date.now() / 60000)}`) + await fetch(`https://spythere.github.io/api/td2/data/stockData.json?t=${Math.floor(Date.now() / 60000)}`) ).json(); this.store.stockData = stockData; diff --git a/src/components/TrainImageSection.vue b/src/components/TrainImageSection.vue index cca95d4..b905b1a 100644 --- a/src/components/TrainImageSection.vue +++ b/src/components/TrainImageSection.vue @@ -3,20 +3,22 @@
-
ŁADOWANIE OBRAZU...
+
+ ŁADOWANIE OBRAZU... +
PODGLĄD WYBRANEGO POJAZDU
-
Ten pojazd nie ma jeszcze podglądu!
+
@@ -81,6 +83,8 @@ export default defineComponent({ watch: { chosenVehicle(vehicle: Vehicle, prevVehicle: Vehicle) { + console.log(vehicle); + if (vehicle && vehicle.type != prevVehicle?.type) { this.store.imageLoading = true; } @@ -101,7 +105,7 @@ export default defineComponent({ if (!chosenVehicle) return; - this.store.vehiclePreviewSrc = chosenVehicle.imageSrc.replace('300', '800'); + this.store.vehiclePreviewSrc = `https://spythere.github.io/api/td2/images/${chosenVehicle.type}--800px.jpg`; }, }, });