@shopware/cms-base-layer 1.4.1 → 1.5.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.
- package/README.md +11 -11
- package/components/SwContactForm.vue +6 -6
- package/components/SwListingProductPrice.vue +2 -1
- package/components/SwNewsletterForm.vue +4 -4
- package/components/SwProductAddToCart.vue +2 -1
- package/components/SwProductCard.vue +2 -1
- package/components/SwProductReviews.vue +20 -5
- package/components/SwSlider.vue +5 -3
- package/components/public/cms/block/CmsBlockHtml.vue +17 -0
- package/components/public/cms/block/CmsBlockTextTeaserSection.vue +4 -4
- package/components/public/cms/block/CmsBlockTextTwoColumn.vue +3 -5
- package/components/public/cms/element/CmsElementCrossSelling.vue +1 -1
- package/components/public/cms/element/CmsElementHtml.vue +24 -0
- package/components/public/cms/element/CmsElementProductDescriptionReviews.vue +20 -6
- package/components/public/cms/element/CmsElementYoutubeVideo.vue +8 -2
- package/components/public/cms/section/CmsSectionSidebar.vue +0 -8
- package/nuxt.config.ts +3 -1
- package/package.json +16 -16
package/README.md
CHANGED
|
@@ -36,6 +36,9 @@ pnpm install -D @shopware/cms-base-layer
|
|
|
36
36
|
|
|
37
37
|
# bun
|
|
38
38
|
bun install -D @shopware/cms-base-layer
|
|
39
|
+
|
|
40
|
+
# deno
|
|
41
|
+
deno install --dev @shopware/cms-base-layer
|
|
39
42
|
```
|
|
40
43
|
|
|
41
44
|
<!-- /automd -->
|
|
@@ -129,21 +132,18 @@ No additional packages needed to be installed.
|
|
|
129
132
|
|
|
130
133
|
Full changelog for stable version is available [here](https://github.com/shopware/frontends/blob/main/packages/cms-base-layer/CHANGELOG.md)
|
|
131
134
|
|
|
132
|
-
### Latest changes: 1.
|
|
135
|
+
### Latest changes: 1.5.1
|
|
133
136
|
|
|
134
137
|
### Patch Changes
|
|
135
138
|
|
|
136
|
-
- [#
|
|
137
|
-
|
|
138
|
-
- SwNewsletterForm
|
|
139
|
-
- SwContactForm
|
|
139
|
+
- [#1879](https://github.com/shopware/frontends/pull/1879) [`eaf170b`](https://github.com/shopware/frontends/commit/eaf170bd037a278b3d2e155c4d69de8e5fd9516d) Thanks [@acuriouspotion](https://github.com/acuriouspotion)! - Fix youtube player control display and usage of advanced privacy mode setting.
|
|
140
140
|
|
|
141
|
-
- [#
|
|
141
|
+
- [#1862](https://github.com/shopware/frontends/pull/1862) [`20fd2c6`](https://github.com/shopware/frontends/commit/20fd2c615738f93a3947c69f351fc5d37ea89ebf) Thanks [@aheartforspinach](https://github.com/aheartforspinach)! - Fix CmsSectionSidebar.vue when used on a landing page by removing useCategory and related code
|
|
142
142
|
|
|
143
|
-
- [#
|
|
143
|
+
- [#1884](https://github.com/shopware/frontends/pull/1884) [`3004b97`](https://github.com/shopware/frontends/commit/3004b973913b90cdf4b255ffb3f9cee265241666) Thanks [@MorennMcFly](https://github.com/MorennMcFly)! - Fix cms blocks TextTeaserSection and TextTwoColumn responsivity so the elements stack from md breakpoint and under.
|
|
144
144
|
|
|
145
|
-
- [#
|
|
145
|
+
- [#1863](https://github.com/shopware/frontends/pull/1863) [`f8c5cd5`](https://github.com/shopware/frontends/commit/f8c5cd5c9aa8b65d394c831e3ac548b4743c53a6) Thanks [@aheartforspinach](https://github.com/aheartforspinach)! - move `CmsBlockHtml.vue` to block folder (instead of element), remove `CmsBlockHtml.md`
|
|
146
146
|
|
|
147
|
-
- Updated dependencies [[`
|
|
148
|
-
- @shopware/
|
|
149
|
-
- @shopware/
|
|
147
|
+
- Updated dependencies [[`ab040bb`](https://github.com/shopware/frontends/commit/ab040bb6cc05541001a983c26d5cb6dbf3192394), [`c8fa438`](https://github.com/shopware/frontends/commit/c8fa438b38de6dbc43a2895f2d1906907447c384)]:
|
|
148
|
+
- @shopware/composables@1.9.1
|
|
149
|
+
- @shopware/helpers@1.5.0
|
|
@@ -213,7 +213,7 @@ const invokeSubmit = async () => {
|
|
|
213
213
|
v-if="$v.firstName.$error"
|
|
214
214
|
class="pt-1 text-sm text-red-600 focus:ring-brand-primary border-gray-300"
|
|
215
215
|
>
|
|
216
|
-
{{ $v.firstName.$errors[0]
|
|
216
|
+
{{ $v.firstName.$errors[0]?.$message ?? '' }}
|
|
217
217
|
</span>
|
|
218
218
|
</div>
|
|
219
219
|
<div class="col-span-4">
|
|
@@ -237,7 +237,7 @@ const invokeSubmit = async () => {
|
|
|
237
237
|
v-if="$v.lastName.$error"
|
|
238
238
|
class="pt-1 text-sm text-red-600 focus:ring-brand-primary border-gray-300"
|
|
239
239
|
>
|
|
240
|
-
{{ $v.lastName.$errors[0]
|
|
240
|
+
{{ $v.lastName.$errors[0]?.$message ?? '' }}
|
|
241
241
|
</span>
|
|
242
242
|
</div>
|
|
243
243
|
<div class="col-span-6">
|
|
@@ -261,7 +261,7 @@ const invokeSubmit = async () => {
|
|
|
261
261
|
v-if="$v.email.$error"
|
|
262
262
|
class="pt-1 text-sm text-red-600 focus:ring-brand-primary border-gray-300"
|
|
263
263
|
>
|
|
264
|
-
{{ $v.email.$errors[0]
|
|
264
|
+
{{ $v.email.$errors[0]?.$message ?? '' }}
|
|
265
265
|
</span>
|
|
266
266
|
</div>
|
|
267
267
|
<div class="col-span-6">
|
|
@@ -285,7 +285,7 @@ const invokeSubmit = async () => {
|
|
|
285
285
|
v-if="$v.phone.$error"
|
|
286
286
|
class="pt-1 text-sm text-red-600 focus:ring-brand-primary border-gray-300"
|
|
287
287
|
>
|
|
288
|
-
{{ $v.phone.$errors[0]
|
|
288
|
+
{{ $v.phone.$errors[0]?.$message ?? '' }}
|
|
289
289
|
</span>
|
|
290
290
|
</div>
|
|
291
291
|
<div class="col-span-12">
|
|
@@ -309,7 +309,7 @@ const invokeSubmit = async () => {
|
|
|
309
309
|
v-if="$v.subject.$error"
|
|
310
310
|
class="pt-1 text-sm text-red-600 focus:ring-brand-primary border-gray-300"
|
|
311
311
|
>
|
|
312
|
-
{{ $v.subject.$errors[0]
|
|
312
|
+
{{ $v.subject.$errors[0]?.$message ?? '' }}
|
|
313
313
|
</span>
|
|
314
314
|
</div>
|
|
315
315
|
<div class="col-span-12">
|
|
@@ -334,7 +334,7 @@ const invokeSubmit = async () => {
|
|
|
334
334
|
v-if="$v.comment.$error"
|
|
335
335
|
class="pt-1 text-sm text-red-600 focus:ring-brand-primary border-gray-300"
|
|
336
336
|
>
|
|
337
|
-
{{ $v.comment.$errors[0]
|
|
337
|
+
{{ $v.comment.$errors[0]?.$message || '' }}
|
|
338
338
|
</span>
|
|
339
339
|
</div>
|
|
340
340
|
<div class="col-span-12">
|
|
@@ -12,6 +12,7 @@ type Translations = {
|
|
|
12
12
|
listing: {
|
|
13
13
|
variantsFrom: string;
|
|
14
14
|
previously: string;
|
|
15
|
+
from: string;
|
|
15
16
|
to: string;
|
|
16
17
|
};
|
|
17
18
|
};
|
|
@@ -78,7 +79,7 @@ const {
|
|
|
78
79
|
<template v-if="regulationPrice">
|
|
79
80
|
<div class="flex gap-2 justify-end text-gray-500 text-3.5 mb-2">
|
|
80
81
|
{{ translations.listing.previously }}
|
|
81
|
-
<
|
|
82
|
+
<SwSharedPrice :value="regulationPrice" />
|
|
82
83
|
</div>
|
|
83
84
|
</template>
|
|
84
85
|
<template v-if="!regulationPrice">
|
|
@@ -79,7 +79,7 @@ const { newsletterSubscribe, newsletterUnsubscribe } = useNewsletter();
|
|
|
79
79
|
|
|
80
80
|
const getFormTitle = computed(() => getConfigValue("title"));
|
|
81
81
|
const state = reactive({
|
|
82
|
-
option: subscriptionOptions[0]
|
|
82
|
+
option: subscriptionOptions[0]?.value ?? "",
|
|
83
83
|
salutationId: "",
|
|
84
84
|
firstName: "",
|
|
85
85
|
lastName: "",
|
|
@@ -216,7 +216,7 @@ const invokeSubmit = async () => {
|
|
|
216
216
|
v-if="$v.email?.$error"
|
|
217
217
|
class="pt-1 text-sm text-red-600 focus:ring-brand-primary border-gray-300"
|
|
218
218
|
>
|
|
219
|
-
{{ $v.email?.$errors[0]
|
|
219
|
+
{{ $v.email?.$errors[0]?.$message || '' }}
|
|
220
220
|
</span>
|
|
221
221
|
</div>
|
|
222
222
|
<div v-if="state.option === 'subscribe'" class="col-span-4">
|
|
@@ -260,7 +260,7 @@ const invokeSubmit = async () => {
|
|
|
260
260
|
v-if="$v.firstName?.$error"
|
|
261
261
|
class="pt-1 text-sm text-red-600 focus:ring-brand-primary border-gray-300"
|
|
262
262
|
>
|
|
263
|
-
{{ $v.firstName?.$errors[0]
|
|
263
|
+
{{ $v.firstName?.$errors[0]?.$message || '' }}
|
|
264
264
|
</span>
|
|
265
265
|
</div>
|
|
266
266
|
<div v-if="state.option === 'subscribe'" class="col-span-4">
|
|
@@ -284,7 +284,7 @@ const invokeSubmit = async () => {
|
|
|
284
284
|
v-if="$v.lastName?.$error"
|
|
285
285
|
class="pt-1 text-sm text-red-600 focus:ring-brand-primary border-gray-300"
|
|
286
286
|
>
|
|
287
|
-
{{ $v.lastName?.$errors[0]
|
|
287
|
+
{{ $v.lastName?.$errors[0]?.$message || '' }}
|
|
288
288
|
</span>
|
|
289
289
|
</div>
|
|
290
290
|
<div class="col-span-12">
|
|
@@ -51,7 +51,8 @@ const addToCartProxy = async () => {
|
|
|
51
51
|
const errors = getErrorsCodes();
|
|
52
52
|
for (const element of errors) {
|
|
53
53
|
const { messageKey, params } = resolveCartError(element);
|
|
54
|
-
|
|
54
|
+
if (translations.errors[messageKey])
|
|
55
|
+
pushError(getCmsTranslate(translations.errors[messageKey], params));
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
if (!errors.length)
|
|
@@ -127,7 +127,8 @@ const addToCartProxy = async () => {
|
|
|
127
127
|
const errors = getErrorsCodes();
|
|
128
128
|
for (const element of errors) {
|
|
129
129
|
const { messageKey, params } = resolveCartError(element);
|
|
130
|
-
|
|
130
|
+
if (translations.errors[messageKey])
|
|
131
|
+
pushError(getCmsTranslate(translations.errors[messageKey], params));
|
|
131
132
|
}
|
|
132
133
|
|
|
133
134
|
if (!errors.length)
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { defu } from "defu";
|
|
3
3
|
import { computed, onMounted, ref, toRefs } from "vue";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
useCmsTranslations,
|
|
6
|
+
useProductReviews,
|
|
7
|
+
useShopwareContext,
|
|
8
|
+
} from "#imports";
|
|
5
9
|
import type { Schemas } from "#shopware";
|
|
6
10
|
|
|
7
11
|
const props = defineProps<{
|
|
@@ -12,12 +16,14 @@ const props = defineProps<{
|
|
|
12
16
|
type Translations = {
|
|
13
17
|
product: {
|
|
14
18
|
noReviews: string;
|
|
19
|
+
reviewNotAccepted: string;
|
|
15
20
|
};
|
|
16
21
|
};
|
|
17
22
|
|
|
18
23
|
let translations: Translations = {
|
|
19
24
|
product: {
|
|
20
25
|
noReviews: "No reviews yet.",
|
|
26
|
+
reviewNotAccepted: "Your review has not been approved yet",
|
|
21
27
|
},
|
|
22
28
|
};
|
|
23
29
|
|
|
@@ -42,15 +48,17 @@ const reviewsList = computed<Schemas["ProductReview"][]>(
|
|
|
42
48
|
|
|
43
49
|
const format: Intl.DateTimeFormatOptions = {
|
|
44
50
|
year: "numeric",
|
|
45
|
-
month: "
|
|
51
|
+
month: "numeric",
|
|
46
52
|
day: "numeric",
|
|
47
53
|
hour: "numeric",
|
|
48
54
|
minute: "numeric",
|
|
49
|
-
hour12: true,
|
|
50
55
|
};
|
|
51
56
|
|
|
52
|
-
const
|
|
53
|
-
|
|
57
|
+
const { browserLocale } = useShopwareContext();
|
|
58
|
+
|
|
59
|
+
const formatDate = (date: string) => {
|
|
60
|
+
return new Intl.DateTimeFormat(browserLocale, format).format(new Date(date));
|
|
61
|
+
};
|
|
54
62
|
</script>
|
|
55
63
|
|
|
56
64
|
<template>
|
|
@@ -70,6 +78,13 @@ const formatDate = (date: string) =>
|
|
|
70
78
|
>
|
|
71
79
|
<span>{{ formatDate(review.createdAt) }}</span>
|
|
72
80
|
</div>
|
|
81
|
+
<div
|
|
82
|
+
v-if="!review.status"
|
|
83
|
+
class="mt-2 text-3 p-2 bg-[#d4f0f5] flex gap-2 items-center"
|
|
84
|
+
>
|
|
85
|
+
<div class="w-6 h-6 i-carbon-warning" />
|
|
86
|
+
{{ translations.product.reviewNotAccepted }}
|
|
87
|
+
</div>
|
|
73
88
|
<div
|
|
74
89
|
class="cms-block-product-description-reviews__reviews-rating inline-flex items-center mt-2"
|
|
75
90
|
>
|
package/components/SwSlider.vue
CHANGED
|
@@ -38,9 +38,11 @@ const { getConfigValue } = useCmsElementConfig({
|
|
|
38
38
|
config: SliderElementConfig;
|
|
39
39
|
});
|
|
40
40
|
|
|
41
|
-
const slots = useSlots()
|
|
41
|
+
const slots = useSlots() as {
|
|
42
|
+
default?: () => { children: VNodeArrayChildren }[];
|
|
43
|
+
};
|
|
42
44
|
const childrenRaw = computed(
|
|
43
|
-
() => (slots?.default?.()[0]
|
|
45
|
+
() => (slots?.default?.()[0]?.children as VNodeArrayChildren) ?? [],
|
|
44
46
|
);
|
|
45
47
|
const slidesToScroll = computed(() =>
|
|
46
48
|
props.slidesToScroll >= props.slidesToShow
|
|
@@ -184,7 +186,7 @@ function buildImageSliderTrackStyle(
|
|
|
184
186
|
const childComponent =
|
|
185
187
|
imageSliderTrack.value?.children[transformIndex + 1];
|
|
186
188
|
// If image exist
|
|
187
|
-
height = childComponent?.children[0]
|
|
189
|
+
height = childComponent?.children[0]?.children[0]?.clientHeight
|
|
188
190
|
? `${childComponent.clientHeight}px`
|
|
189
191
|
: "auto";
|
|
190
192
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CmsBlockHtml } from "@shopware/composables";
|
|
3
|
+
|
|
4
|
+
defineProps<{
|
|
5
|
+
content: CmsBlockHtml;
|
|
6
|
+
}>();
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<div>
|
|
11
|
+
<CmsGenericElement
|
|
12
|
+
v-for="slot in content.slots"
|
|
13
|
+
:key="slot.versionId"
|
|
14
|
+
:content="slot"
|
|
15
|
+
/>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
@@ -6,15 +6,15 @@ defineProps<{
|
|
|
6
6
|
}>();
|
|
7
7
|
</script>
|
|
8
8
|
<template>
|
|
9
|
-
<div class="
|
|
9
|
+
<div class="mx-auto grid md:grid-cols-3 gap-4 py-6">
|
|
10
10
|
<CmsGenericElement
|
|
11
11
|
v-for="(slot, i) in content.slots"
|
|
12
12
|
:key="slot.id"
|
|
13
13
|
:content="slot"
|
|
14
|
-
class="cms-block-text-teaser-section
|
|
14
|
+
class="cms-block-text-teaser-section"
|
|
15
15
|
:class="{
|
|
16
|
-
'
|
|
17
|
-
'
|
|
16
|
+
'md:col-span-1': i === 0,
|
|
17
|
+
'md:col-span-2': i === 1,
|
|
18
18
|
}"
|
|
19
19
|
/>
|
|
20
20
|
</div>
|
|
@@ -13,16 +13,14 @@ const rightContent = getSlotContent("right");
|
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
15
|
<template>
|
|
16
|
-
<article
|
|
17
|
-
class="cms-block-text-two-column flex justify-center gap-5 md:gap-20"
|
|
18
|
-
>
|
|
16
|
+
<article class="cms-block-text-two-column grid md:grid-cols-2 gap-5 md:gap-20">
|
|
19
17
|
<CmsGenericElement
|
|
20
18
|
:content="leftContent"
|
|
21
|
-
class="
|
|
19
|
+
class="cms-block-text-two-column__text"
|
|
22
20
|
/>
|
|
23
21
|
<CmsGenericElement
|
|
24
22
|
:content="rightContent"
|
|
25
|
-
class="
|
|
23
|
+
class="cms-block-text-two-column__text"
|
|
26
24
|
/>
|
|
27
25
|
</article>
|
|
28
26
|
</template>
|
|
@@ -82,7 +82,7 @@ const toggleTab = (index: number) => {
|
|
|
82
82
|
:autoplay="false"
|
|
83
83
|
>
|
|
84
84
|
<SwProductCard
|
|
85
|
-
v-for="product of crossSellCollections[currentTabIndex]
|
|
85
|
+
v-for="product of crossSellCollections[currentTabIndex]?.products"
|
|
86
86
|
:key="product.id"
|
|
87
87
|
class="w-[300px]"
|
|
88
88
|
:product="product"
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CmsElementHtml } from "@shopware/composables";
|
|
3
|
+
|
|
4
|
+
import { getCmsLayoutConfiguration } from "@shopware/helpers";
|
|
5
|
+
import { h } from "vue";
|
|
6
|
+
|
|
7
|
+
const props = defineProps<{
|
|
8
|
+
content: CmsElementHtml;
|
|
9
|
+
}>();
|
|
10
|
+
|
|
11
|
+
const { cssClasses, layoutStyles } = getCmsLayoutConfiguration(props.content);
|
|
12
|
+
|
|
13
|
+
const HtmlComponent = () => {
|
|
14
|
+
return h("div", {
|
|
15
|
+
class: cssClasses,
|
|
16
|
+
style: layoutStyles,
|
|
17
|
+
innerHTML: props.content.data.content || "",
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<HtmlComponent />
|
|
24
|
+
</template>
|
|
@@ -3,25 +3,32 @@ import type { CmsElementProductDescriptionReviews } from "@shopware/composables"
|
|
|
3
3
|
import { useCmsTranslations } from "@shopware/composables";
|
|
4
4
|
import { getProductName, getTranslatedProperty } from "@shopware/helpers";
|
|
5
5
|
import { defu } from "defu";
|
|
6
|
-
import { computed, ref } from "vue";
|
|
6
|
+
import { type Ref, computed, onMounted, ref } from "vue";
|
|
7
7
|
import xss from "xss";
|
|
8
8
|
import { useProduct } from "#imports";
|
|
9
|
+
import type { Schemas } from "#shopware";
|
|
9
10
|
|
|
10
11
|
const props = defineProps<{
|
|
11
12
|
content: CmsElementProductDescriptionReviews;
|
|
12
13
|
}>();
|
|
13
14
|
|
|
14
15
|
type Translations = {
|
|
15
|
-
|
|
16
|
+
product: {
|
|
16
17
|
description: string;
|
|
17
18
|
reviews: string;
|
|
19
|
+
messages: {
|
|
20
|
+
reviewAdded: string;
|
|
21
|
+
};
|
|
18
22
|
};
|
|
19
23
|
};
|
|
20
24
|
|
|
21
25
|
let translations: Translations = {
|
|
22
|
-
|
|
26
|
+
product: {
|
|
23
27
|
description: "Description",
|
|
24
28
|
reviews: "Reviews",
|
|
29
|
+
messages: {
|
|
30
|
+
reviewAdded: "Thank you for submitting your review",
|
|
31
|
+
},
|
|
25
32
|
},
|
|
26
33
|
};
|
|
27
34
|
translations = defu(useCmsTranslations(), translations) as Translations;
|
|
@@ -37,7 +44,13 @@ const toggleTabs = (tabNumber: number) => {
|
|
|
37
44
|
currentTab.value = tabNumber;
|
|
38
45
|
};
|
|
39
46
|
|
|
40
|
-
const reviews =
|
|
47
|
+
const reviews: Ref<Schemas["ProductReview"][]> = ref([]);
|
|
48
|
+
|
|
49
|
+
onMounted(async () => {
|
|
50
|
+
if (props.content.data?.reviews?.elements) {
|
|
51
|
+
reviews.value = props.content.data.reviews.elements;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
41
54
|
</script>
|
|
42
55
|
|
|
43
56
|
<template>
|
|
@@ -60,7 +73,7 @@ const reviews = computed(() => props.content.data.reviews.elements);
|
|
|
60
73
|
@click="() => toggleTabs(1)"
|
|
61
74
|
>
|
|
62
75
|
<i class="fas fa-space-shuttle text-base mr-1" />
|
|
63
|
-
{{ translations.
|
|
76
|
+
{{ translations.product.description }}
|
|
64
77
|
</a>
|
|
65
78
|
</li>
|
|
66
79
|
<li class="mr-2 text-center">
|
|
@@ -71,10 +84,11 @@ const reviews = computed(() => props.content.data.reviews.elements);
|
|
|
71
84
|
? 'text-secondary-500 bg-white'
|
|
72
85
|
: 'text-white bg-secondary-500',
|
|
73
86
|
]"
|
|
87
|
+
data-testid="product-reviews-tab"
|
|
74
88
|
@click="() => toggleTabs(2)"
|
|
75
89
|
>
|
|
76
90
|
<i class="fas fa-cog text-base mr-1" />
|
|
77
|
-
{{ translations.
|
|
91
|
+
{{ translations.product.reviews }} ({{ reviews.length }})
|
|
78
92
|
</a>
|
|
79
93
|
</li>
|
|
80
94
|
</ul>
|
|
@@ -15,7 +15,7 @@ const config = computed(() => ({
|
|
|
15
15
|
loop: getConfigValue("loop")
|
|
16
16
|
? `loop=1&playlist=${getConfigValue("videoID")}&`
|
|
17
17
|
: "",
|
|
18
|
-
showControls: getConfigValue("showControls") ? "controls=
|
|
18
|
+
showControls: getConfigValue("showControls") ? "controls=1&" : "controls=0&",
|
|
19
19
|
start:
|
|
20
20
|
Number.parseInt(getConfigValue("start")) !== 0
|
|
21
21
|
? `start=${getConfigValue("start")}&`
|
|
@@ -27,7 +27,13 @@ const config = computed(() => ({
|
|
|
27
27
|
disableKeyboard: "disablekb=1",
|
|
28
28
|
}));
|
|
29
29
|
|
|
30
|
-
const
|
|
30
|
+
const YOUTUBE_URL = "https://www.youtube.com/embed/";
|
|
31
|
+
const YOUTUBE_NOCOOKIE_URL = "https://www.youtube-nocookie.com/embed/";
|
|
32
|
+
const videoDomain = getConfigValue("advancedPrivacyMode")
|
|
33
|
+
? YOUTUBE_NOCOOKIE_URL
|
|
34
|
+
: YOUTUBE_URL;
|
|
35
|
+
|
|
36
|
+
const videoUrl = `${videoDomain}\
|
|
31
37
|
${config.value.videoID}?\
|
|
32
38
|
${config.value.relatedVideos}\
|
|
33
39
|
${config.value.loop}\
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { useCmsSection } from "@shopware/composables";
|
|
3
3
|
import type { CmsSectionSidebar } from "@shopware/composables";
|
|
4
|
-
import { getTranslatedProperty } from "@shopware/helpers";
|
|
5
4
|
import { computed } from "vue";
|
|
6
|
-
import { useCategory } from "#imports";
|
|
7
5
|
|
|
8
6
|
const props = defineProps<{
|
|
9
7
|
content: CmsSectionSidebar;
|
|
@@ -13,16 +11,10 @@ const { getPositionContent } = useCmsSection(props.content);
|
|
|
13
11
|
const sidebarBlocks = getPositionContent("sidebar");
|
|
14
12
|
const mainBlocks = getPositionContent("main");
|
|
15
13
|
const mobileBehavior = computed(() => props.content.mobileBehavior);
|
|
16
|
-
const { category } = useCategory();
|
|
17
14
|
</script>
|
|
18
15
|
|
|
19
16
|
<template>
|
|
20
17
|
<div class="cms-section-sidebar grid grid-cols-12 md:grid">
|
|
21
|
-
<div class="col-span-12 mx-8 md:mx-5 mt-8">
|
|
22
|
-
<h1 class="text-4xl font-extrabold tracking-tight text-gray-900">
|
|
23
|
-
{{ getTranslatedProperty(category, "name") }}
|
|
24
|
-
</h1>
|
|
25
|
-
</div>
|
|
26
18
|
<div class="col-span-12 md:col-span-7 lg:col-span-9 order-1 md:order-2">
|
|
27
19
|
<CmsGenericBlock
|
|
28
20
|
v-for="cmsBlock in mainBlocks"
|
package/nuxt.config.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopware/cms-base-layer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "Vue CMS Nuxt Layer for Shopware",
|
|
5
5
|
"author": "Shopware",
|
|
6
6
|
"repository": {
|
|
@@ -29,32 +29,32 @@
|
|
|
29
29
|
"nuxt.config.ts"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@nuxt/kit": "3.
|
|
33
|
-
"@tresjs/cientos": "4.0
|
|
34
|
-
"@tresjs/core": "4.3.
|
|
32
|
+
"@nuxt/kit": "3.17.5",
|
|
33
|
+
"@tresjs/cientos": "4.3.0",
|
|
34
|
+
"@tresjs/core": "4.3.3",
|
|
35
35
|
"@vuelidate/core": "2.0.3",
|
|
36
36
|
"@vuelidate/validators": "2.0.4",
|
|
37
|
-
"@vueuse/core": "
|
|
37
|
+
"@vueuse/core": "13.3.0",
|
|
38
38
|
"entities": "6.0.0",
|
|
39
39
|
"html-to-ast": "0.0.6",
|
|
40
40
|
"three": "0.173.0",
|
|
41
|
-
"vue": "3.5.
|
|
41
|
+
"vue": "3.5.16",
|
|
42
42
|
"xss": "1.0.15",
|
|
43
|
-
"@shopware/composables": "1.
|
|
44
|
-
"@shopware/api-client": "1.
|
|
45
|
-
"@shopware/helpers": "1.
|
|
43
|
+
"@shopware/composables": "1.9.1",
|
|
44
|
+
"@shopware/api-client": "1.3.0",
|
|
45
|
+
"@shopware/helpers": "1.5.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@biomejs/biome": "1.8.3",
|
|
49
|
-
"@nuxt/schema": "3.
|
|
49
|
+
"@nuxt/schema": "3.17.5",
|
|
50
50
|
"@types/three": "0.173.0",
|
|
51
|
-
"@vitest/coverage-v8": "3.
|
|
52
|
-
"nuxt": "3.
|
|
53
|
-
"typescript": "5.
|
|
51
|
+
"@vitest/coverage-v8": "3.2.3",
|
|
52
|
+
"nuxt": "3.17.5",
|
|
53
|
+
"typescript": "5.8.3",
|
|
54
54
|
"unbuild": "2.0.0",
|
|
55
|
-
"vitest": "3.
|
|
56
|
-
"vue-router": "4.5.
|
|
57
|
-
"vue-tsc": "2.2.
|
|
55
|
+
"vitest": "3.2.3",
|
|
56
|
+
"vue-router": "4.5.1",
|
|
57
|
+
"vue-tsc": "2.2.10",
|
|
58
58
|
"tsconfig": "0.0.0"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|