@shopbite-de/storefront 1.31.3 → 2.0.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/.github/workflows/ci.yaml +54 -0
- package/CLAUDE.md +23 -8
- package/app/app.vue +10 -6
- package/app/assets/css/main.css +100 -61
- package/app/components/AddToWishlist.vue +15 -25
- package/app/components/Address/Card.vue +6 -11
- package/app/components/Address/Detail.vue +23 -23
- package/app/components/Address/Fields.vue +175 -73
- package/app/components/Address/Form.vue +107 -106
- package/app/components/Cart/Bar.vue +6 -9
- package/app/components/Cart/Item.vue +48 -63
- package/app/components/Cart/QuickView.vue +38 -25
- package/app/components/Cart/Upsell.vue +24 -62
- package/app/components/Category/Breadcrumb.vue +29 -3
- package/app/components/Category/FilterGroup.vue +20 -41
- package/app/components/Category/Listing.vue +100 -130
- package/app/components/Category/SearchInput.vue +22 -19
- package/app/components/Checkout/DeliveryTimeSelect.vue +55 -77
- package/app/components/Checkout/LoginOrRegister.vue +28 -29
- package/app/components/Checkout/PaymentAndDelivery.vue +114 -86
- package/app/components/Checkout/Summary.vue +90 -60
- package/app/components/Checkout/VoucherInput.vue +40 -27
- package/app/components/Contact/Form.vue +164 -192
- package/app/components/DemoBanner.vue +5 -5
- package/app/components/Footer/StoreStatus.vue +2 -2
- package/app/components/Footer.vue +125 -57
- package/app/components/Header.vue +283 -18
- package/app/components/Home/Categories.vue +116 -0
- package/app/components/Home/Facts.vue +71 -0
- package/app/components/Home/Faq.vue +34 -16
- package/app/components/Home/Hero.vue +172 -0
- package/app/components/Home/Highlights.vue +29 -37
- package/app/components/Home/Restaurant.vue +102 -0
- package/app/components/Menu/BonCard.vue +180 -0
- package/app/components/Menu/CartPanel.vue +24 -0
- package/app/components/Menu/CategoryIndex.vue +54 -0
- package/app/components/Menu/OrderMode.vue +20 -0
- package/app/components/Menu/SectionHeader.vue +38 -0
- package/app/components/Navigation/MobileTop.vue +23 -15
- package/app/components/Order/Confirmation.vue +119 -0
- package/app/components/Order/Detail.vue +80 -88
- package/app/components/Product/CardSkeleton.vue +8 -12
- package/app/components/Product/Configurator.vue +8 -16
- package/app/components/Product/CrossSelling.vue +75 -83
- package/app/components/Product/DeselectIngredient.vue +17 -22
- package/app/components/Product/Detail.vue +35 -27
- package/app/components/Product/QuickView.vue +80 -51
- package/app/components/SalesChannelSwitch.vue +14 -28
- package/app/components/Sb/Button.vue +70 -0
- package/app/components/Sb/Checkbox.vue +73 -0
- package/app/components/Sb/Chip.vue +51 -0
- package/app/components/Sb/ChoiceGroup.vue +82 -0
- package/app/components/Sb/ConfirmDialog.vue +60 -0
- package/app/components/Sb/Field.vue +77 -0
- package/app/components/Sb/Icon.vue +66 -0
- package/app/components/Sb/IconButton.vue +55 -0
- package/app/components/Sb/Input.vue +23 -0
- package/app/components/Sb/SegmentedControl.vue +34 -0
- package/app/components/Sb/Select.vue +49 -0
- package/app/components/Sb/Sheet.vue +83 -0
- package/app/components/Sb/Stars.vue +60 -0
- package/app/components/Sb/StatusPill.vue +38 -0
- package/app/components/Sb/Stepper.vue +72 -0
- package/app/components/User/AccountHeader.vue +16 -0
- package/app/components/User/AuthPanel.vue +41 -0
- package/app/components/User/Detail.vue +32 -29
- package/app/components/User/LoginForm.vue +92 -98
- package/app/components/User/RegistrationForm.vue +285 -249
- package/app/components/Wishlist.vue +55 -155
- package/app/composables/useCartMutations.ts +9 -27
- package/app/composables/useCheckoutMethodGuard.ts +2 -24
- package/app/composables/useContactForm.ts +66 -0
- package/app/composables/useHomeMenuCategories.ts +41 -0
- package/app/composables/useNavigation.ts +10 -2
- package/app/composables/useOrderMode.ts +65 -0
- package/app/composables/useRegistrationForm.ts +161 -0
- package/app/composables/useRestaurantSchema.ts +1 -1
- package/app/composables/useShareLink.ts +3 -13
- package/app/composables/useSortingSelection.ts +13 -0
- package/app/composables/useThemePreset.ts +15 -0
- package/app/composables/useVoucherCode.ts +7 -16
- package/app/composables/useWishlistActions.ts +0 -51
- package/app/error.vue +31 -9
- package/app/layouts/account.vue +45 -50
- package/app/layouts/default.vue +2 -3
- package/app/layouts/listing.vue +3 -5
- package/app/pages/[...all].vue +8 -4
- package/app/pages/account/recover/password/index.vue +113 -80
- package/app/pages/anmelden.vue +11 -10
- package/app/pages/bestellung/[id]/erfolg.vue +1 -15
- package/app/pages/bestellung/[id]/fehler.vue +63 -51
- package/app/pages/bestellung/[id]/index.vue +3 -85
- package/app/pages/bestellung/kasse.vue +29 -0
- package/app/pages/bestellung.vue +8 -60
- package/app/pages/index.vue +12 -52
- package/app/pages/kontakt.vue +27 -7
- package/app/pages/konto/adressen.vue +106 -102
- package/app/pages/konto/bestellung/[id].vue +9 -43
- package/app/pages/konto/bestellungen.vue +55 -33
- package/app/pages/konto/index.vue +47 -62
- package/app/pages/konto/profil.vue +162 -100
- package/app/pages/maintenance.vue +8 -6
- package/app/pages/merkliste.vue +7 -8
- package/app/pages/passwort-vergessen.vue +92 -75
- package/app/pages/registrierung/bestaetigen.vue +20 -48
- package/app/pages/registrierung/index.vue +16 -7
- package/app/pages/suche.vue +94 -95
- package/app/plugins/theme-preset.ts +9 -0
- package/app/utils/highlight.ts +25 -0
- package/app/utils/product.ts +9 -0
- package/app/validation/registrationSchema.ts +1 -1
- package/modules/theme.ts +115 -0
- package/nuxt.config.ts +27 -15
- package/package.json +6 -8
- package/playwright.config.ts +11 -0
- package/server/api/listing/[categoryId].get.ts +3 -0
- package/shared/theme/presets.ts +303 -0
- package/test/a11y/presets.test.ts +225 -0
- package/test/nuxt/AccountPagesPreset.test.ts +191 -0
- package/test/nuxt/AuthPagesPreset.test.ts +87 -0
- package/test/nuxt/CartCheckoutPreset.test.ts +154 -0
- package/test/nuxt/CartItem.test.ts +18 -3
- package/test/nuxt/CartUpsell.test.ts +1 -2
- package/test/nuxt/CheckoutFormsPreset.test.ts +120 -0
- package/test/nuxt/CheckoutOnePage.test.ts +115 -0
- package/test/nuxt/CheckoutSummary.test.ts +6 -6
- package/test/nuxt/CheckoutVoucherInput.test.ts +20 -32
- package/test/nuxt/ContactFormPreset.test.ts +115 -0
- package/test/nuxt/FooterStoreStatus.test.ts +2 -2
- package/test/nuxt/HeaderFooterPreset.test.ts +134 -0
- package/test/nuxt/HomeFaq.test.ts +3 -2
- package/test/nuxt/MenuBonCard.test.ts +122 -0
- package/test/nuxt/OrderPagesPreset.test.ts +132 -0
- package/test/nuxt/PaymentAndDelivery.test.ts +0 -4
- package/test/nuxt/ProductCrossSelling.test.ts +2 -1
- package/test/nuxt/ProductDeselectIngredient.test.ts +5 -3
- package/test/nuxt/ProductSheetPreset.test.ts +105 -0
- package/test/nuxt/RegisterConfirmPage.test.ts +0 -8
- package/test/nuxt/RegistrationForm.test.ts +89 -270
- package/test/nuxt/SbBaseComponents.test.ts +170 -0
- package/test/nuxt/SbStars.test.ts +25 -0
- package/test/nuxt/useCartMutations.test.ts +3 -17
- package/test/nuxt/useCartUpsell.test.ts +1 -1
- package/test/nuxt/useCheckoutMethodGuard.test.ts +0 -27
- package/test/nuxt/useShareLink.test.ts +1 -9
- package/test/nuxt/useWishlistActions.test.ts +3 -26
- package/test/unit/highlight.spec.ts +31 -0
- package/test/unit/product.spec.ts +12 -0
- package/test/unit/themePresets.spec.ts +61 -0
- package/app/app.config.ts +0 -19
- package/app/components/AnimatedSection.vue +0 -74
- package/app/components/BottomNavi.vue +0 -70
- package/app/components/Category/Header.vue +0 -48
- package/app/components/Checkout/PaymentMethod.vue +0 -30
- package/app/components/Checkout/ShippingMethod.vue +0 -30
- package/app/components/Cta.vue +0 -30
- package/app/components/Feature/Card.vue +0 -121
- package/app/components/Features.vue +0 -42
- package/app/components/Footer/Contact.vue +0 -82
- package/app/components/Header/Body.vue +0 -82
- package/app/components/Header/Right.vue +0 -187
- package/app/components/Header/Title.vue +0 -10
- package/app/components/Hero.vue +0 -233
- package/app/components/Home/MenuCategories.vue +0 -148
- package/app/components/ImageGallery.vue +0 -63
- package/app/components/Loading.vue +0 -29
- package/app/components/Navigation/DesktopLeft.vue +0 -39
- package/app/components/Product/Card.vue +0 -177
- package/app/components/Product/CardCompact.vue +0 -72
- package/app/components/Product/CardDietBadges.vue +0 -43
- package/app/components/Product/CardIngredients.vue +0 -35
- package/app/components/Product/CardKitchen.vue +0 -34
- package/app/components/Product/SearchBar.vue +0 -95
- package/app/components/PublicAnnouncement.vue +0 -17
- package/app/pages/bestellung/bestaetigen.vue +0 -16
- package/app/pages/bestellung/warenkorb.vue +0 -49
- package/app/pages/bestellung/zahlung-versand.vue +0 -25
- package/test/nuxt/AddressFields.test.ts +0 -222
- package/test/nuxt/AnimatedSection.test.ts +0 -67
- package/test/nuxt/ContactForm.test.ts +0 -207
- package/test/nuxt/FooterContact.test.ts +0 -102
- package/test/nuxt/HeaderRight.test.ts +0 -142
- package/test/nuxt/Hero.test.ts +0 -126
- package/test/nuxt/HomeMenuCategories.test.ts +0 -94
- package/test/nuxt/LoginForm.test.ts +0 -159
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { Schemas } from "#shopware";
|
|
3
|
-
|
|
4
|
-
const props = defineProps<{
|
|
5
|
-
paymentMethod: Schemas["PaymentMethod"] | null;
|
|
6
|
-
}>();
|
|
7
|
-
|
|
8
|
-
const { paymentMethod } = toRefs(props);
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<template>
|
|
12
|
-
<div
|
|
13
|
-
v-if="paymentMethod !== null"
|
|
14
|
-
class="flex flex-row gap-8 p-6 border rounded-lg border-primary"
|
|
15
|
-
>
|
|
16
|
-
<NuxtImg
|
|
17
|
-
v-if="paymentMethod.media?.url"
|
|
18
|
-
:src="paymentMethod.media?.url"
|
|
19
|
-
width="50"
|
|
20
|
-
/>
|
|
21
|
-
<div>
|
|
22
|
-
<h3 class="text-base text-pretty font-semibold text-highlighted">
|
|
23
|
-
Zahlart
|
|
24
|
-
</h3>
|
|
25
|
-
<p class="text-[15px] text-pretty text-muted mt-1">
|
|
26
|
-
{{ paymentMethod.distinguishableName }}
|
|
27
|
-
</p>
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
</template>
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { Schemas } from "#shopware";
|
|
3
|
-
|
|
4
|
-
const props = defineProps<{
|
|
5
|
-
shippingMethod: Schemas["ShippingMethod"] | null;
|
|
6
|
-
}>();
|
|
7
|
-
|
|
8
|
-
const { shippingMethod } = toRefs(props);
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<template>
|
|
12
|
-
<div
|
|
13
|
-
v-if="shippingMethod !== null"
|
|
14
|
-
class="flex flex-row gap-8 p-6 border rounded-lg border-primary"
|
|
15
|
-
>
|
|
16
|
-
<NuxtImg
|
|
17
|
-
v-if="shippingMethod.media?.url"
|
|
18
|
-
:src="shippingMethod.media.url"
|
|
19
|
-
width="50"
|
|
20
|
-
/>
|
|
21
|
-
<div>
|
|
22
|
-
<h3 class="text-base text-pretty font-semibold text-highlighted">
|
|
23
|
-
Versandart
|
|
24
|
-
</h3>
|
|
25
|
-
<p class="text-[15px] text-pretty text-muted mt-1">
|
|
26
|
-
{{ shippingMethod.name }}
|
|
27
|
-
</p>
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
</template>
|
package/app/components/Cta.vue
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { ButtonProps } from "#ui/components/Button.vue";
|
|
3
|
-
|
|
4
|
-
defineProps<{
|
|
5
|
-
title: string;
|
|
6
|
-
description?: string | undefined;
|
|
7
|
-
backgroundImage?: string | undefined;
|
|
8
|
-
links?: ButtonProps[] | undefined;
|
|
9
|
-
}>();
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<template>
|
|
13
|
-
<div class="relative overflow-hidden">
|
|
14
|
-
<img
|
|
15
|
-
v-if="backgroundImage"
|
|
16
|
-
:src="backgroundImage"
|
|
17
|
-
loading="lazy"
|
|
18
|
-
decoding="async"
|
|
19
|
-
class="absolute inset-0 z-0 w-full h-full object-cover opacity-40"
|
|
20
|
-
alt=""
|
|
21
|
-
/>
|
|
22
|
-
<UPageCTA
|
|
23
|
-
variant="soft"
|
|
24
|
-
:title="title"
|
|
25
|
-
:description="description"
|
|
26
|
-
:links="links"
|
|
27
|
-
class="relative z-10"
|
|
28
|
-
/>
|
|
29
|
-
</div>
|
|
30
|
-
</template>
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
// Information card on the home page (#332): tinted icon, category label, a
|
|
3
|
-
// bold lead line, detail text and an optional action. `kind` fills the lead
|
|
4
|
-
// with live data; both live parts render on the client only, like the
|
|
5
|
-
// footer's store status (#275), with their height reserved.
|
|
6
|
-
export type FeatureCardProps = {
|
|
7
|
-
title: string;
|
|
8
|
-
description: string;
|
|
9
|
-
icon?: string;
|
|
10
|
-
kind?: "hours" | "delivery" | "reservation";
|
|
11
|
-
lead?: string;
|
|
12
|
-
link?: { label: string; to: string };
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const props = defineProps<FeatureCardProps>();
|
|
16
|
-
|
|
17
|
-
const { businessHours } = useBusinessHours();
|
|
18
|
-
const { status } = useStoreStatus();
|
|
19
|
-
const { deliveryTime } = useShopBiteConfig();
|
|
20
|
-
|
|
21
|
-
const isLive = computed(
|
|
22
|
-
() => props.kind === "hours" || props.kind === "delivery",
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
const lead = computed(() => {
|
|
26
|
-
if (props.kind === "hours") {
|
|
27
|
-
return businessHours.value
|
|
28
|
-
? formatTodayHours(businessHours.value, new Date())
|
|
29
|
-
: "";
|
|
30
|
-
}
|
|
31
|
-
if (props.kind === "delivery") {
|
|
32
|
-
return `In ca. ${deliveryTime.value} Minuten bei dir`;
|
|
33
|
-
}
|
|
34
|
-
return props.lead ?? "";
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
const statusLabel = computed(() => {
|
|
38
|
-
if (props.kind !== "hours" || !status.value) return "";
|
|
39
|
-
if (status.value.open) return `Geöffnet bis ${status.value.closesAt}`;
|
|
40
|
-
return status.value.nextOpening
|
|
41
|
-
? `Öffnet ${status.value.nextOpening}`
|
|
42
|
-
: "Geschlossen";
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
const isCallLink = computed(() => props.link?.to.startsWith("tel:") ?? false);
|
|
46
|
-
</script>
|
|
47
|
-
|
|
48
|
-
<template>
|
|
49
|
-
<div
|
|
50
|
-
class="flex h-full flex-col gap-3 rounded-2xl bg-default p-5 shadow-md ring ring-default"
|
|
51
|
-
>
|
|
52
|
-
<div class="flex items-center justify-between gap-3">
|
|
53
|
-
<span
|
|
54
|
-
class="flex size-11 shrink-0 items-center justify-center rounded-xl bg-primary/10 text-primary"
|
|
55
|
-
aria-hidden="true"
|
|
56
|
-
>
|
|
57
|
-
<UIcon v-if="icon" :name="icon" class="size-6" />
|
|
58
|
-
</span>
|
|
59
|
-
<ClientOnly v-if="kind === 'hours'">
|
|
60
|
-
<span
|
|
61
|
-
v-if="statusLabel"
|
|
62
|
-
class="inline-flex items-center gap-1.5 text-sm font-semibold"
|
|
63
|
-
:class="status?.open ? 'text-success' : 'text-muted'"
|
|
64
|
-
role="status"
|
|
65
|
-
>
|
|
66
|
-
<span
|
|
67
|
-
class="size-2 rounded-full"
|
|
68
|
-
:class="status?.open ? 'bg-success' : 'bg-dimmed'"
|
|
69
|
-
aria-hidden="true"
|
|
70
|
-
/>
|
|
71
|
-
{{ statusLabel }}
|
|
72
|
-
</span>
|
|
73
|
-
<template #fallback>
|
|
74
|
-
<span class="h-5" aria-hidden="true" />
|
|
75
|
-
</template>
|
|
76
|
-
</ClientOnly>
|
|
77
|
-
</div>
|
|
78
|
-
|
|
79
|
-
<div class="flex flex-col gap-1">
|
|
80
|
-
<span class="text-xs font-semibold tracking-wider text-muted uppercase">
|
|
81
|
-
{{ title }}
|
|
82
|
-
</span>
|
|
83
|
-
<ClientOnly v-if="isLive">
|
|
84
|
-
<span class="text-lg leading-6 font-bold text-highlighted">
|
|
85
|
-
{{ lead }}
|
|
86
|
-
</span>
|
|
87
|
-
<template #fallback>
|
|
88
|
-
<span class="block h-6" aria-hidden="true" />
|
|
89
|
-
</template>
|
|
90
|
-
</ClientOnly>
|
|
91
|
-
<span
|
|
92
|
-
v-else-if="lead"
|
|
93
|
-
class="text-lg leading-6 font-bold text-highlighted"
|
|
94
|
-
>
|
|
95
|
-
{{ lead }}
|
|
96
|
-
</span>
|
|
97
|
-
<p class="text-sm text-default">{{ description }}</p>
|
|
98
|
-
</div>
|
|
99
|
-
|
|
100
|
-
<div v-if="link" class="mt-auto pt-1">
|
|
101
|
-
<UButton
|
|
102
|
-
v-if="isCallLink"
|
|
103
|
-
:label="link.label"
|
|
104
|
-
:to="link.to"
|
|
105
|
-
icon="i-lucide-phone"
|
|
106
|
-
variant="subtle"
|
|
107
|
-
size="lg"
|
|
108
|
-
class="justify-center"
|
|
109
|
-
block
|
|
110
|
-
/>
|
|
111
|
-
<UButton
|
|
112
|
-
v-else
|
|
113
|
-
:label="link.label"
|
|
114
|
-
:to="link.to"
|
|
115
|
-
variant="link"
|
|
116
|
-
trailing-icon="i-lucide-arrow-right"
|
|
117
|
-
class="px-0"
|
|
118
|
-
/>
|
|
119
|
-
</div>
|
|
120
|
-
</div>
|
|
121
|
-
</template>
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { FeatureCardProps } from "~/components/Feature/Card.vue";
|
|
3
|
-
|
|
4
|
-
defineProps<{
|
|
5
|
-
title: string;
|
|
6
|
-
description: string;
|
|
7
|
-
headline?: string | undefined;
|
|
8
|
-
features: FeatureCardProps[];
|
|
9
|
-
}>();
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<template>
|
|
13
|
-
<AnimatedSection
|
|
14
|
-
animation="fade-up"
|
|
15
|
-
duration="duration-1000"
|
|
16
|
-
delay="delay-100"
|
|
17
|
-
>
|
|
18
|
-
<UPageSection
|
|
19
|
-
id="features"
|
|
20
|
-
:description="description"
|
|
21
|
-
:headline="headline"
|
|
22
|
-
class="relative overflow-hidden"
|
|
23
|
-
>
|
|
24
|
-
<template #title>
|
|
25
|
-
<MDC :value="title" class="*:leading-9" />
|
|
26
|
-
</template>
|
|
27
|
-
<div
|
|
28
|
-
class="absolute rounded-full -left-10 top-10 size-[300px] -z-10 bg-primary opacity-30 blur-[200px]"
|
|
29
|
-
/>
|
|
30
|
-
<div
|
|
31
|
-
class="absolute rounded-full -right-10 -bottom-10 size-[300px] -z-10 bg-primary opacity-30 blur-[200px]"
|
|
32
|
-
/>
|
|
33
|
-
<div class="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3">
|
|
34
|
-
<FeatureCard
|
|
35
|
-
v-for="(feature, index) in features"
|
|
36
|
-
:key="index"
|
|
37
|
-
v-bind="feature"
|
|
38
|
-
/>
|
|
39
|
-
</div>
|
|
40
|
-
</UPageSection>
|
|
41
|
-
</AnimatedSection>
|
|
42
|
-
</template>
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
const { site } = useRuntimeConfig().public;
|
|
3
|
-
const { businessHours, refresh } = useBusinessHours();
|
|
4
|
-
|
|
5
|
-
// Put the opening hours into the server-rendered HTML (local SEO, #290);
|
|
6
|
-
// app.vue refreshes them on mount for the open/closed toast.
|
|
7
|
-
onServerPrefetch(() => refresh());
|
|
8
|
-
|
|
9
|
-
const openingHours = computed(() =>
|
|
10
|
-
groupOpeningHours(businessHours.value ?? []),
|
|
11
|
-
);
|
|
12
|
-
|
|
13
|
-
const { street, postalCode, city } = site.address;
|
|
14
|
-
const locality = [postalCode, city].filter(Boolean).join(" ");
|
|
15
|
-
const hasContact = Boolean(
|
|
16
|
-
street || locality || site.telephone || site.googleBusinessProfileUrl,
|
|
17
|
-
);
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<template>
|
|
21
|
-
<div
|
|
22
|
-
v-if="hasContact || openingHours.length"
|
|
23
|
-
class="mb-10 grid gap-8 sm:grid-cols-2 xl:grid-cols-3"
|
|
24
|
-
>
|
|
25
|
-
<address v-if="hasContact" class="not-italic text-sm">
|
|
26
|
-
<p class="font-semibold">{{ site.name }}</p>
|
|
27
|
-
<div class="mt-6 space-y-1 text-muted">
|
|
28
|
-
<p v-if="street">{{ street }}</p>
|
|
29
|
-
<p v-if="locality">{{ locality }}</p>
|
|
30
|
-
</div>
|
|
31
|
-
<ul
|
|
32
|
-
v-if="site.telephone || site.googleBusinessProfileUrl"
|
|
33
|
-
class="mt-4 space-y-3"
|
|
34
|
-
>
|
|
35
|
-
<li v-if="site.telephone">
|
|
36
|
-
<ULink
|
|
37
|
-
:to="toTelHref(site.telephone)"
|
|
38
|
-
class="flex items-center gap-1.5 text-muted hover:text-default"
|
|
39
|
-
>
|
|
40
|
-
<UIcon name="i-lucide-phone" class="size-4 shrink-0" />
|
|
41
|
-
{{ site.telephone }}
|
|
42
|
-
</ULink>
|
|
43
|
-
</li>
|
|
44
|
-
<li v-if="site.googleBusinessProfileUrl">
|
|
45
|
-
<ULink
|
|
46
|
-
:to="site.googleBusinessProfileUrl"
|
|
47
|
-
target="_blank"
|
|
48
|
-
rel="noopener"
|
|
49
|
-
class="flex items-center gap-1.5 text-muted hover:text-default"
|
|
50
|
-
>
|
|
51
|
-
<UIcon name="i-simple-icons-google" class="size-4 shrink-0" />
|
|
52
|
-
Auf Google ansehen
|
|
53
|
-
</ULink>
|
|
54
|
-
</li>
|
|
55
|
-
</ul>
|
|
56
|
-
</address>
|
|
57
|
-
|
|
58
|
-
<div
|
|
59
|
-
v-if="openingHours.length"
|
|
60
|
-
id="oeffnungszeiten"
|
|
61
|
-
class="scroll-mt-24 text-sm"
|
|
62
|
-
>
|
|
63
|
-
<p class="font-semibold">Öffnungszeiten</p>
|
|
64
|
-
<FooterStoreStatus class="mt-6" />
|
|
65
|
-
<dl class="mt-4 grid grid-cols-[auto_1fr] gap-x-6 gap-y-2 text-muted">
|
|
66
|
-
<template v-for="row in openingHours" :key="row.days">
|
|
67
|
-
<dt class="font-medium text-default">{{ row.days }}</dt>
|
|
68
|
-
<dd>
|
|
69
|
-
<span v-if="row.intervals.length === 0">Ruhetag</span>
|
|
70
|
-
<span
|
|
71
|
-
v-for="interval in row.intervals"
|
|
72
|
-
:key="interval"
|
|
73
|
-
class="block"
|
|
74
|
-
>
|
|
75
|
-
{{ interval }}
|
|
76
|
-
</span>
|
|
77
|
-
</dd>
|
|
78
|
-
</template>
|
|
79
|
-
</dl>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
</template>
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { useUser } from "@shopware/composables";
|
|
3
|
-
|
|
4
|
-
const { mainMenu } = useNavigation(false);
|
|
5
|
-
const multiChannelEnabled =
|
|
6
|
-
useRuntimeConfig().public.shopBite.feature.multiChannel;
|
|
7
|
-
|
|
8
|
-
const { isLoggedIn, isGuestSession, logout } = useUser();
|
|
9
|
-
const toast = useToast();
|
|
10
|
-
|
|
11
|
-
const logoutHandler = () => {
|
|
12
|
-
logout();
|
|
13
|
-
toast.add({
|
|
14
|
-
title: "Tschüss!",
|
|
15
|
-
description: "Erfolgreich abgemeldet.",
|
|
16
|
-
color: "success",
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
<template>
|
|
22
|
-
<UNavigationMenu
|
|
23
|
-
color="primary"
|
|
24
|
-
:items="mainMenu"
|
|
25
|
-
orientation="vertical"
|
|
26
|
-
class="-mx-2.5"
|
|
27
|
-
/>
|
|
28
|
-
|
|
29
|
-
<USeparator class="my-4" />
|
|
30
|
-
|
|
31
|
-
<div class="flex flex-col gap-1">
|
|
32
|
-
<template v-if="isLoggedIn || isGuestSession">
|
|
33
|
-
<UButton
|
|
34
|
-
color="neutral"
|
|
35
|
-
variant="ghost"
|
|
36
|
-
to="/konto"
|
|
37
|
-
icon="i-lucide-user"
|
|
38
|
-
label="Mein Konto"
|
|
39
|
-
class="justify-start"
|
|
40
|
-
/>
|
|
41
|
-
<UButton
|
|
42
|
-
color="neutral"
|
|
43
|
-
variant="ghost"
|
|
44
|
-
to="/konto/bestellungen"
|
|
45
|
-
icon="i-lucide-pizza"
|
|
46
|
-
label="Bestellungen"
|
|
47
|
-
class="justify-start"
|
|
48
|
-
/>
|
|
49
|
-
<UButton
|
|
50
|
-
color="neutral"
|
|
51
|
-
variant="ghost"
|
|
52
|
-
icon="i-lucide-log-out"
|
|
53
|
-
label="Abmelden"
|
|
54
|
-
class="justify-start"
|
|
55
|
-
@click="logoutHandler"
|
|
56
|
-
/>
|
|
57
|
-
</template>
|
|
58
|
-
<template v-else>
|
|
59
|
-
<UButton
|
|
60
|
-
color="neutral"
|
|
61
|
-
variant="ghost"
|
|
62
|
-
to="/anmelden"
|
|
63
|
-
icon="i-lucide-user"
|
|
64
|
-
label="Anmelden"
|
|
65
|
-
class="justify-start"
|
|
66
|
-
/>
|
|
67
|
-
<UButton
|
|
68
|
-
color="neutral"
|
|
69
|
-
variant="ghost"
|
|
70
|
-
to="/registrierung"
|
|
71
|
-
icon="i-lucide-user-plus"
|
|
72
|
-
label="Registrieren"
|
|
73
|
-
class="justify-start"
|
|
74
|
-
/>
|
|
75
|
-
</template>
|
|
76
|
-
</div>
|
|
77
|
-
|
|
78
|
-
<div v-if="multiChannelEnabled" class="mt-4">
|
|
79
|
-
<USeparator class="mb-4" />
|
|
80
|
-
<LazySalesChannelSwitch />
|
|
81
|
-
</div>
|
|
82
|
-
</template>
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { useUser } from "@shopware/composables";
|
|
3
|
-
import type { DropdownMenuItem } from "@nuxt/ui";
|
|
4
|
-
import { useMediaQuery } from "@vueuse/core";
|
|
5
|
-
|
|
6
|
-
const {
|
|
7
|
-
open: cartQuickViewOpen,
|
|
8
|
-
mounted: cartQuickViewMounted,
|
|
9
|
-
show: openCartQuickView,
|
|
10
|
-
} = useCartQuickView();
|
|
11
|
-
// Bottom sheet on phones (also opened from the cart bar), side panel from
|
|
12
|
-
// the lg breakpoint (64rem); the drawer only renders on the client (#325).
|
|
13
|
-
const isDesktop = useMediaQuery("(min-width: 64rem)");
|
|
14
|
-
const cartDrawerDirection = computed(() =>
|
|
15
|
-
isDesktop.value ? "right" : "bottom",
|
|
16
|
-
);
|
|
17
|
-
|
|
18
|
-
const { count: cartCount } = useCart();
|
|
19
|
-
|
|
20
|
-
// The cart badge pops when a product goes into the cart (#325).
|
|
21
|
-
const { onCartItemAdded } = useProductEvents();
|
|
22
|
-
const cartPop = ref(0);
|
|
23
|
-
onCartItemAdded(() => {
|
|
24
|
-
cartPop.value++;
|
|
25
|
-
});
|
|
26
|
-
const { count: wishListCount } = useWishlist();
|
|
27
|
-
const { isCheckoutEnabled } = useShopBiteConfig();
|
|
28
|
-
const { isLoggedIn, isGuestSession, logout } = useUser();
|
|
29
|
-
const toast = useToast();
|
|
30
|
-
// Shop phone number from the site config; the button is hidden without one (#251).
|
|
31
|
-
const { site } = useRuntimeConfig().public;
|
|
32
|
-
|
|
33
|
-
const logoutHandler = () => {
|
|
34
|
-
logout();
|
|
35
|
-
toast.add({
|
|
36
|
-
title: "Tschüss!",
|
|
37
|
-
description: "Erfolreich abgemeldet.",
|
|
38
|
-
color: "success",
|
|
39
|
-
});
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
const dropDownMenu = computed<DropdownMenuItem[][]>(() => {
|
|
43
|
-
if (isLoggedIn.value) {
|
|
44
|
-
return [
|
|
45
|
-
[
|
|
46
|
-
{
|
|
47
|
-
label: "Mein Konto",
|
|
48
|
-
type: "label",
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
label: "Übersicht",
|
|
52
|
-
icon: "i-lucide-user",
|
|
53
|
-
to: "/konto",
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
label: "Bestellungen",
|
|
57
|
-
icon: "i-lucide-pizza",
|
|
58
|
-
to: "/konto/bestellungen",
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
label: "Adressen",
|
|
62
|
-
icon: "i-lucide-house",
|
|
63
|
-
to: "/konto/adressen",
|
|
64
|
-
},
|
|
65
|
-
],
|
|
66
|
-
[
|
|
67
|
-
{
|
|
68
|
-
label: "Abmelden",
|
|
69
|
-
icon: "i-lucide-log-out",
|
|
70
|
-
onSelect: () => logoutHandler(),
|
|
71
|
-
},
|
|
72
|
-
],
|
|
73
|
-
];
|
|
74
|
-
} else {
|
|
75
|
-
return [
|
|
76
|
-
[
|
|
77
|
-
{
|
|
78
|
-
label: "Mein Konto",
|
|
79
|
-
type: "label",
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
label: "Anmelden",
|
|
83
|
-
icon: "i-lucide-user",
|
|
84
|
-
to: "/anmelden",
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
label: "Registrieren",
|
|
88
|
-
icon: "i-lucide-user-plus",
|
|
89
|
-
to: "/registrierung",
|
|
90
|
-
},
|
|
91
|
-
],
|
|
92
|
-
];
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
</script>
|
|
96
|
-
|
|
97
|
-
<template>
|
|
98
|
-
<UButton
|
|
99
|
-
v-if="site.telephone"
|
|
100
|
-
color="neutral"
|
|
101
|
-
variant="ghost"
|
|
102
|
-
:to="toTelHref(site.telephone)"
|
|
103
|
-
icon="i-lucide-phone"
|
|
104
|
-
:aria-label="`Anrufen: ${site.telephone}`"
|
|
105
|
-
/>
|
|
106
|
-
<UDropdownMenu :items="dropDownMenu">
|
|
107
|
-
<UChip v-if="isLoggedIn || isGuestSession" size="3xl" text="✓">
|
|
108
|
-
<UButton
|
|
109
|
-
aria-label="Konto Dropdown öffnen"
|
|
110
|
-
icon="i-lucide-user"
|
|
111
|
-
color="neutral"
|
|
112
|
-
variant="outline"
|
|
113
|
-
/>
|
|
114
|
-
</UChip>
|
|
115
|
-
<UButton
|
|
116
|
-
v-else
|
|
117
|
-
aria-label="Konto Dropdown öffnen"
|
|
118
|
-
icon="i-lucide-user"
|
|
119
|
-
color="neutral"
|
|
120
|
-
variant="ghost"
|
|
121
|
-
/>
|
|
122
|
-
</UDropdownMenu>
|
|
123
|
-
<div>
|
|
124
|
-
<UChip :text="wishListCount" size="3xl">
|
|
125
|
-
<UButton
|
|
126
|
-
aria-label="Zur Merkliste"
|
|
127
|
-
color="neutral"
|
|
128
|
-
variant="ghost"
|
|
129
|
-
to="/merkliste"
|
|
130
|
-
icon="i-lucide-heart"
|
|
131
|
-
/>
|
|
132
|
-
</UChip>
|
|
133
|
-
</div>
|
|
134
|
-
<UChip
|
|
135
|
-
v-if="isCheckoutEnabled"
|
|
136
|
-
:key="cartPop"
|
|
137
|
-
:text="cartCount"
|
|
138
|
-
size="3xl"
|
|
139
|
-
:class="{ 'motion-safe:animate-cart-pop': cartPop > 0 }"
|
|
140
|
-
>
|
|
141
|
-
<UButton
|
|
142
|
-
aria-label="Zum Warenkorb"
|
|
143
|
-
aria-haspopup="dialog"
|
|
144
|
-
color="neutral"
|
|
145
|
-
variant="ghost"
|
|
146
|
-
icon="i-lucide-shopping-bag"
|
|
147
|
-
@click="openCartQuickView"
|
|
148
|
-
/>
|
|
149
|
-
</UChip>
|
|
150
|
-
<LazyUDrawer
|
|
151
|
-
v-if="cartQuickViewMounted"
|
|
152
|
-
v-model:open="cartQuickViewOpen"
|
|
153
|
-
title="Warenkorb"
|
|
154
|
-
:direction="cartDrawerDirection"
|
|
155
|
-
:ui="{
|
|
156
|
-
content:
|
|
157
|
-
cartDrawerDirection === 'right' ? 'w-full max-w-md' : 'max-h-[92vh]',
|
|
158
|
-
}"
|
|
159
|
-
>
|
|
160
|
-
<template #header>
|
|
161
|
-
<div class="flex h-full w-full items-center justify-between gap-2">
|
|
162
|
-
<h2
|
|
163
|
-
class="flex items-center gap-2 text-3xl md:text-4xl mb-3 pb-2 lg:mt-8"
|
|
164
|
-
>
|
|
165
|
-
<UIcon name="i-lucide-shopping-bag" class="size-8" color="primary" />
|
|
166
|
-
Warenkorb
|
|
167
|
-
</h2>
|
|
168
|
-
<!-- The sheet also closes by swiping the handle down, tapping the
|
|
169
|
-
overlay or pressing Escape; the button makes it obvious. -->
|
|
170
|
-
<UButton
|
|
171
|
-
icon="i-lucide-x"
|
|
172
|
-
color="neutral"
|
|
173
|
-
variant="ghost"
|
|
174
|
-
aria-label="Warenkorb schließen"
|
|
175
|
-
@click="cartQuickViewOpen = false"
|
|
176
|
-
/>
|
|
177
|
-
</div>
|
|
178
|
-
</template>
|
|
179
|
-
<template #body>
|
|
180
|
-
<LazyCartQuickView
|
|
181
|
-
:with-to-cart-button="true"
|
|
182
|
-
class="md:min-w-90"
|
|
183
|
-
@go-to-cart="cartQuickViewOpen = false"
|
|
184
|
-
/>
|
|
185
|
-
</template>
|
|
186
|
-
</LazyUDrawer>
|
|
187
|
-
</template>
|