Aktualizacja 1.2.2

Aktualizacja 1.2.2
This commit is contained in:
Spythere
2022-12-31 22:10:52 +01:00
committed by GitHub
6 changed files with 1852 additions and 1763 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ export default defineComponent({
}), }),
async created() { async created() {
const stockData = await (await fetch('https://spythere.github.io/api/stockData.json')).json(); const stockData = await (await fetch('https://spythere.github.io/api/stockDataNew.json')).json();
this.store.stockData = stockData; this.store.stockData = stockData;
}, },
+4 -2
View File
@@ -3,18 +3,20 @@
<div class="train-image__wrapper"> <div class="train-image__wrapper">
<div class="train-image__content"> <div class="train-image__content">
<transition name="img-message-anim"> <transition name="img-message-anim">
<div class="empty-message" v-if="store.imageLoading">ŁADOWANIE OBRAZU...</div> <div class="empty-message" v-if="store.imageLoading && store.chosenVehicle?.imageSrc">ŁADOWANIE OBRAZU...</div>
</transition> </transition>
<div class="no-img" v-if="!store.chosenVehicle">PODGLĄD WYBRANEGO POJAZDU</div> <div class="no-img" v-if="!store.chosenVehicle">PODGLĄD WYBRANEGO POJAZDU</div>
<img <img
v-if="store.chosenVehicle" v-if="store.chosenVehicle && store.chosenVehicle.imageSrc"
:src="store.chosenVehicle.imageSrc" :src="store.chosenVehicle.imageSrc"
:alt="store.chosenVehicle.type" :alt="store.chosenVehicle.type"
@load="onImageLoad" @load="onImageLoad"
@click="onImageClick" @click="onImageClick"
/> />
<div class="empty-message" v-if="store.chosenVehicle && !store.chosenVehicle.imageSrc">Ten pojazd nie ma jeszcze podglądu!</div>
</div> </div>
<div class="train-image__info" v-if="store.chosenVehicle"> <div class="train-image__info" v-if="store.chosenVehicle">
+1 -1
View File
@@ -101,7 +101,7 @@ export interface IStock {
isLoco: boolean; isLoco: boolean;
supportersOnly: boolean; supportersOnly: boolean;
count: number; count: number;
imgSrc: string; imgSrc?: string;
} }
export interface IReadyStockList { export interface IReadyStockList {
+19 -19
View File
@@ -9,25 +9,25 @@ export default defineConfig({
vue(), vue(),
VitePWA({ VitePWA({
registerType: 'autoUpdate', registerType: 'autoUpdate',
// workbox: { workbox: {
// globPatterns: ['**/*.{js,css,html,png,svg,img}'], globPatterns: ['**/*.{js,css,html,png,svg,img}'],
// runtimeCaching: [ runtimeCaching: [
// { {
// urlPattern: new RegExp(`^https://spythere.github.io/api\/.*`), urlPattern: new RegExp(`^https://spythere.github.io/api\/.*`),
// handler: 'NetworkFirst', handler: 'NetworkFirst',
// options: { options: {
// cacheName: 'github-api-cache', cacheName: 'github-api-cache',
// expiration: { expiration: {
// maxEntries: 400, maxEntries: 2,
// maxAgeSeconds: 60 * 60 * 24 * 30, // <== 30 days maxAgeSeconds: 60 * 60 * 24 * 7, // <== 7 days
// }, },
// cacheableResponse: { cacheableResponse: {
// statuses: [0, 200], statuses: [0, 200],
// }, },
// }, },
// }, },
// ], ],
// }, },
devOptions: { devOptions: {
enabled: true, enabled: true,
}, },
+1826 -1739
View File
File diff suppressed because it is too large Load Diff