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() {
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;
},
+4 -2
View File
@@ -3,18 +3,20 @@
<div class="train-image__wrapper">
<div class="train-image__content">
<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>
<div class="no-img" v-if="!store.chosenVehicle">PODGLĄD WYBRANEGO POJAZDU</div>
<img
v-if="store.chosenVehicle"
v-if="store.chosenVehicle && store.chosenVehicle.imageSrc"
:src="store.chosenVehicle.imageSrc"
:alt="store.chosenVehicle.type"
@load="onImageLoad"
@click="onImageClick"
/>
<div class="empty-message" v-if="store.chosenVehicle && !store.chosenVehicle.imageSrc">Ten pojazd nie ma jeszcze podglądu!</div>
</div>
<div class="train-image__info" v-if="store.chosenVehicle">
+1 -1
View File
@@ -48,7 +48,7 @@ export default defineComponent({
});
},
previewStock(stock: IStock) {
previewStock(stock: IStock) {
if (this.store.chosenVehicle?.imageSrc != stock.imgSrc) this.store.imageLoading = true;
if (stock.isLoco) {
+1 -1
View File
@@ -101,7 +101,7 @@ export interface IStock {
isLoco: boolean;
supportersOnly: boolean;
count: number;
imgSrc: string;
imgSrc?: string;
}
export interface IReadyStockList {
+19 -19
View File
@@ -9,25 +9,25 @@ export default defineConfig({
vue(),
VitePWA({
registerType: 'autoUpdate',
// workbox: {
// globPatterns: ['**/*.{js,css,html,png,svg,img}'],
// runtimeCaching: [
// {
// urlPattern: new RegExp(`^https://spythere.github.io/api\/.*`),
// handler: 'NetworkFirst',
// options: {
// cacheName: 'github-api-cache',
// expiration: {
// maxEntries: 400,
// maxAgeSeconds: 60 * 60 * 24 * 30, // <== 30 days
// },
// cacheableResponse: {
// statuses: [0, 200],
// },
// },
// },
// ],
// },
workbox: {
globPatterns: ['**/*.{js,css,html,png,svg,img}'],
runtimeCaching: [
{
urlPattern: new RegExp(`^https://spythere.github.io/api\/.*`),
handler: 'NetworkFirst',
options: {
cacheName: 'github-api-cache',
expiration: {
maxEntries: 2,
maxAgeSeconds: 60 * 60 * 24 * 7, // <== 7 days
},
cacheableResponse: {
statuses: [0, 200],
},
},
},
],
},
devOptions: {
enabled: true,
},
+1826 -1739
View File
File diff suppressed because it is too large Load Diff