diff --git a/src/components/Global/StockList.vue b/src/components/Global/StockList.vue
index dbb0980..a2fbecc 100644
--- a/src/components/Global/StockList.vue
+++ b/src/components/Global/StockList.vue
@@ -118,7 +118,7 @@ export default defineComponent({
if (isLoco) {
if (/^\d?EN\d{2}/.test(stockName)) fallbackName = 'loco-ezt';
else if (/^SN\d{2}/.test(stockName)) fallbackName = 'loco-szt';
- else if (/^\d{1,}?E/.test(stockName)) fallbackName = 'loco-e';
+ else if (/^\d{0,}?E/.test(stockName)) fallbackName = 'loco-e';
else fallbackName = 'loco-s';
} else {
const isCarPassenger = /(\d{3}a|(Bau|Gor)\d{2}|304C)_/.test(stockName);
diff --git a/src/components/Tooltip/VehiclePreviewTooltip.vue b/src/components/Tooltip/VehiclePreviewTooltip.vue
index 95bce86..1d88c19 100644
--- a/src/components/Tooltip/VehiclePreviewTooltip.vue
+++ b/src/components/Tooltip/VehiclePreviewTooltip.vue
@@ -16,7 +16,9 @@
:src="`https://static.spythere.eu/images/${tooltipStore.content}--300px.jpg`"
/>
-
+
+
+
{{ tooltipStore.content.replace(/_/g, ' ') }}
@@ -38,6 +40,12 @@ export default defineComponent({
this.imageState = 'loading';
},
+ watch: {
+ 'tooltipStore.type'(prev, val) {
+ if (prev != val) this.imageState = 'loading';
+ }
+ },
+
methods: {
onImageLoad() {
this.imageState = 'loaded';
@@ -80,4 +88,8 @@ img {
color: #ccc;
text-wrap: wrap;
}
+
+.error-placeholder {
+ height: 176px;
+}
diff --git a/vite.config.ts b/vite.config.ts
index adf7a9e..58c5daa 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -34,10 +34,6 @@ export default defineConfig({
handler: 'CacheFirst',
options: {
cacheName: 'swdr-images-cache',
- expiration: {
- maxEntries: 100,
- maxAgeSeconds: 60 * 60 * 24 * 7 // <== 7 days
- },
cacheableResponse: {
statuses: [0, 200, 404]
}
@@ -48,10 +44,6 @@ export default defineConfig({
handler: 'CacheFirst',
options: {
cacheName: 'spythere-images-cache',
- expiration: {
- maxEntries: 100,
- maxAgeSeconds: 60 * 60 * 24 * 7 // <== 7 days
- },
cacheableResponse: {
statuses: [0, 200]
}