@shopbite-de/storefront 1.18.0 → 1.18.1
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.
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { useUser } from "@shopware/composables";
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const { mainMenu } = useNavigation(false);
|
|
5
|
+
const multiChannelEnabled =
|
|
6
|
+
useRuntimeConfig().public.shopBite.feature.multiChannel;
|
|
5
7
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
);
|
|
8
|
+
const { isLoggedIn, isGuestSession, logout } = useUser();
|
|
9
|
+
const toast = useToast();
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
const logoutHandler = () => {
|
|
12
|
+
logout();
|
|
13
|
+
toast.add({
|
|
14
|
+
title: "Tschüss!",
|
|
15
|
+
description: "Erfolgreich abgemeldet.",
|
|
16
|
+
color: "success",
|
|
17
|
+
});
|
|
18
|
+
};
|
|
12
19
|
</script>
|
|
13
20
|
|
|
14
21
|
<template>
|
|
@@ -18,7 +25,58 @@ const { mainMenu } = useNavigation(false);
|
|
|
18
25
|
orientation="vertical"
|
|
19
26
|
class="-mx-2.5"
|
|
20
27
|
/>
|
|
21
|
-
|
|
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" />
|
|
22
80
|
<SalesChannelSwitch />
|
|
23
81
|
</div>
|
|
24
82
|
</template>
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { useNavigation } from "~/composables/useNavigation";
|
|
3
|
-
|
|
4
2
|
const { mainMenu } = useNavigation(false);
|
|
5
|
-
|
|
6
3
|
const loginSlide = ref(false);
|
|
7
4
|
</script>
|
|
8
5
|
|
|
@@ -13,6 +10,7 @@ const loginSlide = ref(false);
|
|
|
13
10
|
</template>
|
|
14
11
|
|
|
15
12
|
<UNavigationMenu color="primary" variant="pill" :items="mainMenu" />
|
|
13
|
+
<SalesChannelSwitch />
|
|
16
14
|
|
|
17
15
|
<template #right>
|
|
18
16
|
<HeaderRight />
|
|
@@ -8,9 +8,7 @@ const { apiClient } = useShopwareContext();
|
|
|
8
8
|
|
|
9
9
|
const config = useRuntimeConfig();
|
|
10
10
|
|
|
11
|
-
const isMultiChannel =
|
|
12
|
-
() => config.public.shopBite.feature.multiChannel === "true",
|
|
13
|
-
);
|
|
11
|
+
const isMultiChannel = useRuntimeConfig().public.shopBite.feature.multiChannel;
|
|
14
12
|
|
|
15
13
|
const storeUrl = computed(() => config.public.storeUrl);
|
|
16
14
|
|
package/nuxt.config.ts
CHANGED