From 8e0cf04562bb2df3b98b8ce5701a7d8deb2e0f7e Mon Sep 17 00:00:00 2001 From: Spythere Date: Tue, 3 Jan 2023 19:21:54 +0100 Subject: [PATCH] =?UTF-8?q?update:=20pobieranie=20zdj=C4=99=C4=87=20z=20AP?= =?UTF-8?q?I=20(gh)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 2 +- src/components/TrainImageSection.vue | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) 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`; }, }, });