@asd20/ui 3.2.460 → 3.2.461
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/package.json
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
data: () => ({
|
|
3
|
+
desktop: true,
|
|
4
|
+
}),
|
|
2
5
|
props: {
|
|
3
6
|
// Page meta
|
|
4
7
|
id: { type: String, default: '' },
|
|
@@ -203,17 +206,13 @@ export default {
|
|
|
203
206
|
widgetsSectionProps() {
|
|
204
207
|
/*
|
|
205
208
|
Rules:
|
|
206
|
-
- Sidebar only shown if more than one message, or the first message has bodyHtml
|
|
209
|
+
- Sidebar only shown if more than one message, or the first message has bodyHtml, or screen width is > 1024
|
|
207
210
|
- Sidebar widgets move to Footer when sidebar is not present
|
|
208
|
-
- If both sidebar and footer widgets are shown, prefer placing them in sidebar
|
|
209
211
|
- Full-width widgets are placed in the footer only
|
|
210
|
-
- If related links contain images, they become full-width
|
|
211
212
|
*/
|
|
212
213
|
|
|
213
214
|
const useSidebar =
|
|
214
|
-
this.firstMessage &&
|
|
215
|
-
this.firstMessage.bodyHtml &&
|
|
216
|
-
window.innerWidth >= 1024
|
|
215
|
+
this.firstMessage && this.firstMessage.bodyHtml && this.desktop
|
|
217
216
|
|
|
218
217
|
const relatedLinksContainImages =
|
|
219
218
|
this.relatedLinks.length && !!this.relatedLinks.find(l => !!l.imageUrl)
|
|
@@ -305,4 +304,13 @@ export default {
|
|
|
305
304
|
]
|
|
306
305
|
},
|
|
307
306
|
},
|
|
307
|
+
mounted() {
|
|
308
|
+
this.desktop = window.innerWidth >= 1024
|
|
309
|
+
window.addEventListener('resize', this.handleResize)
|
|
310
|
+
},
|
|
311
|
+
methods: {
|
|
312
|
+
handleResize() {
|
|
313
|
+
this.desktop = window.innerWidth >= 1024
|
|
314
|
+
},
|
|
315
|
+
},
|
|
308
316
|
}
|