@shopbite-de/storefront 1.9.1 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +1 -0
- package/.github/workflows/build.yaml +1 -1
- package/.nuxtrc +1 -0
- package/app/components/ImageGallery.vue +4 -8
- package/app/error.vue +1 -1
- package/app/middleware/secure-key.global.ts +46 -0
- package/app/pages/maintenance.vue +11 -0
- package/content/index.yml +7 -7
- package/nuxt.config.ts +1 -0
- package/package.json +4 -4
package/.env.example
CHANGED
|
@@ -12,6 +12,7 @@ NUXT_SHOPWARE_ADMIN_CLIENT_ID=your_client_id
|
|
|
12
12
|
NUXT_SHOPWARE_ADMIN_CLIENT_SECRET=your_client_secret
|
|
13
13
|
|
|
14
14
|
NUXT_PUBLIC_SHOP_BITE_FEATURE_MULTI_CHANNEL=false
|
|
15
|
+
NUXT_PUBLIC_SHOP_BITE_FEATURE_SECURE_KEY=
|
|
15
16
|
|
|
16
17
|
OPENAPI_ACCESS_KEY=key
|
|
17
18
|
OPENAPI_JSON_URL="https://shopware.shopbite.net"
|
package/.nuxtrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
setups.@nuxt/test-utils="3.23.0"
|
|
@@ -28,19 +28,15 @@ defineProps<{
|
|
|
28
28
|
<template #body>
|
|
29
29
|
<UCarousel
|
|
30
30
|
v-slot="{ item, index }"
|
|
31
|
-
:items="images"
|
|
32
|
-
class="mx-auto w-full"
|
|
33
|
-
auto-height
|
|
34
31
|
arrows
|
|
35
|
-
|
|
32
|
+
:items="images"
|
|
33
|
+
class="w-full max-w-2xl mx-auto"
|
|
36
34
|
>
|
|
37
35
|
<img
|
|
38
|
-
v-if="item"
|
|
39
|
-
:loading="index === 0 ? 'eager' : 'lazy'"
|
|
40
|
-
:fetchpriority="index === 0 ? 'high' : 'low'"
|
|
41
36
|
:src="item.image"
|
|
42
37
|
:alt="item.alt"
|
|
43
|
-
|
|
38
|
+
:fetchpriority="index === 0 ? 'high' : 'auto'"
|
|
39
|
+
class="rounded-lg"
|
|
44
40
|
>
|
|
45
41
|
</UCarousel>
|
|
46
42
|
</template>
|
package/app/error.vue
CHANGED
|
@@ -30,7 +30,7 @@ useSeoMeta({
|
|
|
30
30
|
<h3 class="max-w-lg whitespace-pre-line pb-8 pt-5 text-3xl">
|
|
31
31
|
{{ error.statusCode }}
|
|
32
32
|
</h3>
|
|
33
|
-
<NuxtLink to="" class="button">Zurück zur
|
|
33
|
+
<NuxtLink to="/" class="button">Zurück zur Startseite</NuxtLink>
|
|
34
34
|
</div>
|
|
35
35
|
</NuxtLayout>
|
|
36
36
|
</template>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { defineNuxtRouteMiddleware, navigateTo, useCookie } from "#app";
|
|
2
|
+
|
|
3
|
+
export default defineNuxtRouteMiddleware((to) => {
|
|
4
|
+
// Normalize query param (can be string | string[] | undefined)
|
|
5
|
+
const q = to.query.secureKey as string | string[] | undefined;
|
|
6
|
+
const providedSecureKey = Array.isArray(q) ? q[0] : q;
|
|
7
|
+
|
|
8
|
+
// Read secure key from public runtime config
|
|
9
|
+
const definedSecureKey = useRuntimeConfig().public?.shopBite?.feature
|
|
10
|
+
?.secureKey as string | undefined;
|
|
11
|
+
|
|
12
|
+
if (!definedSecureKey) return;
|
|
13
|
+
|
|
14
|
+
// Cookie used to persist successful auth
|
|
15
|
+
const cookie = useCookie<string | null>("store_secure_key", {
|
|
16
|
+
sameSite: "lax",
|
|
17
|
+
secure: process.env.NODE_ENV === "production",
|
|
18
|
+
path: "/",
|
|
19
|
+
maxAge: 60 * 60 * 24 * 30, // 30 days
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// If a key is provided in the URL, always persist it and strip it from the URL
|
|
23
|
+
if (providedSecureKey) {
|
|
24
|
+
cookie.value = providedSecureKey;
|
|
25
|
+
|
|
26
|
+
// Strip auth-related query params from URL
|
|
27
|
+
const { path, query, hash } = to;
|
|
28
|
+
const {
|
|
29
|
+
secureKey: _s,
|
|
30
|
+
key: _k,
|
|
31
|
+
token: _t,
|
|
32
|
+
...rest
|
|
33
|
+
} = query as typeof to.query;
|
|
34
|
+
|
|
35
|
+
// Navigate once to clean the URL; middleware will re-run after this
|
|
36
|
+
return navigateTo({ path, query: rest, hash }, { replace: true });
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// When feature is enabled, enforce that cookie matches configured key
|
|
40
|
+
if (cookie.value === definedSecureKey) return;
|
|
41
|
+
|
|
42
|
+
if (to.path === "/maintenance") return;
|
|
43
|
+
|
|
44
|
+
// Not authorized — redirect to maintenance
|
|
45
|
+
return navigateTo("/maintenance");
|
|
46
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="min-h-screen flex items-center justify-center p-6 text-center">
|
|
3
|
+
<div>
|
|
4
|
+
<h1 class="text-3xl font-semibold mb-3">Wartungsmodus</h1>
|
|
5
|
+
<p class="text-gray-600">
|
|
6
|
+
Der Shop ist vorübergehend nicht verfügbar. Bitte versuchen Sie es
|
|
7
|
+
später erneut.
|
|
8
|
+
</p>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
package/content/index.yml
CHANGED
|
@@ -5,7 +5,7 @@ seo:
|
|
|
5
5
|
title: ShopBite
|
|
6
6
|
description: Reduziere Kosten und steigere deinen Umsatz
|
|
7
7
|
hero:
|
|
8
|
-
backgroundVideo: https://shopware.shopbite.de/media/10/59/96/1762465181/background.mp4
|
|
8
|
+
backgroundVideo: https://shopware.shopbite.de/media/10/59/96/1762465181/background.mp4
|
|
9
9
|
headline: SHOPBITE
|
|
10
10
|
usps:
|
|
11
11
|
- title: 4.5 ⭐
|
|
@@ -68,17 +68,17 @@ gallery:
|
|
|
68
68
|
variant: subtle
|
|
69
69
|
trailingIcon: i-lucide-phone
|
|
70
70
|
images:
|
|
71
|
-
- image: https://shopware.shopbite.de/media/71/2a/1a/1762465670/restaurant1.webp
|
|
71
|
+
- image: https://shopware.shopbite.de/media/71/2a/1a/1762465670/restaurant1.webp
|
|
72
72
|
alt: La Fattoria Restaurant Innenbereich 1
|
|
73
|
-
- image: https://shopware.shopbite.de/media/61/ea/77/1762465670/restaurant2.webp
|
|
73
|
+
- image: https://shopware.shopbite.de/media/61/ea/77/1762465670/restaurant2.webp
|
|
74
74
|
alt: La Fattoria Restaurant Innenbereich 2
|
|
75
|
-
- image: https://shopware.shopbite.de/media/6d/ac/ca/1762465670/restaurant3.webp
|
|
75
|
+
- image: https://shopware.shopbite.de/media/6d/ac/ca/1762465670/restaurant3.webp
|
|
76
76
|
alt: La Fattoria Restaurant Innenbereich 3
|
|
77
|
-
- image: https://shopware.shopbite.de/media/af/d6/da/1762465670/restaurant4.webp
|
|
77
|
+
- image: https://shopware.shopbite.de/media/af/d6/da/1762465670/restaurant4.webp
|
|
78
78
|
alt: La Fattoria Restaurant Innenbereich 4
|
|
79
|
-
- image: https://shopware.shopbite.de/media/6a/ff/e2/1762465670/restaurant5.webp
|
|
79
|
+
- image: https://shopware.shopbite.de/media/6a/ff/e2/1762465670/restaurant5.webp
|
|
80
80
|
alt: La Fattoria Restaurant Innenbereich 5
|
|
81
|
-
- image: https://shopware.shopbite.de/media/80/76/d0/1762465670/restaurant6.webp
|
|
81
|
+
- image: https://shopware.shopbite.de/media/80/76/d0/1762465670/restaurant6.webp
|
|
82
82
|
alt: La Fattoria Restaurant Innenbereich 6
|
|
83
83
|
|
|
84
84
|
cta:
|
package/nuxt.config.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopbite-de/storefront",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"main": "nuxt.config.ts",
|
|
5
5
|
"description": "Shopware storefront for food delivery shops",
|
|
6
6
|
"keywords": [
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@heroicons/vue": "^2.2.0",
|
|
19
19
|
"@iconify-json/lucide": "^1.2.73",
|
|
20
20
|
"@iconify-json/simple-icons": "^1.2.59",
|
|
21
|
-
"@nuxt/content": "3.
|
|
21
|
+
"@nuxt/content": "3.11.2",
|
|
22
22
|
"@nuxt/image": "^2.0.0",
|
|
23
23
|
"@nuxt/scripts": "0.13.2",
|
|
24
24
|
"@nuxt/ui": "^4.1.0",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"@vue/compiler-dom": "^3.5.26",
|
|
50
50
|
"@vue/server-renderer": "^3.5.26",
|
|
51
51
|
"@vue/test-utils": "^2.4.6",
|
|
52
|
-
"eslint": "^
|
|
52
|
+
"eslint": "^10.0.0",
|
|
53
53
|
"happy-dom": "^20.0.10",
|
|
54
|
-
"jsdom": "^
|
|
54
|
+
"jsdom": "^28.0.0",
|
|
55
55
|
"playwright-core": "^1.56.1",
|
|
56
56
|
"prettier": "^3.6.2",
|
|
57
57
|
"tailwindcss": "^4.1.18",
|