@mixd-id/web-scaffold 0.1.230406130 → 0.1.230406132
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 +1 -1
- package/src/components/ListView.vue +1 -1
- package/src/components/Slider.vue +7 -2
- package/src/utils/listview.js +1 -1
- package/src/widgets/Review.vue +3 -3
- package/src/widgets/ReviewSetting.vue +7 -0
- package/src/widgets/WebPageBuilder.vue +5 -3
- package/src/widgets/WebPageSelector.vue +23 -19
package/package.json
CHANGED
|
@@ -6,10 +6,14 @@
|
|
|
6
6
|
<div ref="highlight" :style="{ left:hgLeft + 'px', right:hgRight + 'px' }"></div>
|
|
7
7
|
|
|
8
8
|
<div id="sliderLeft" v-if="mode === 'double'" ref="left" @mousedown.prevent.capture="onMouseDown" @touchstart.passive.capture="onMouseDown"
|
|
9
|
-
:style="{ left:l1Left + 'px' }"
|
|
9
|
+
:style="{ left:l1Left + 'px' }">
|
|
10
|
+
<slot name="inner"></slot>
|
|
11
|
+
</div>
|
|
10
12
|
|
|
11
13
|
<div id="sliderRight" ref="right" @mousedown.prevent.capture="onMouseDown" @touchstart.passive.capture="onMouseDown"
|
|
12
|
-
:style="{ left:l2Left + 'px' }"
|
|
14
|
+
:style="{ left:l2Left + 'px' }">
|
|
15
|
+
<slot name="inner"></slot>
|
|
16
|
+
</div>
|
|
13
17
|
|
|
14
18
|
</div>
|
|
15
19
|
</template>
|
|
@@ -277,6 +281,7 @@ export default{
|
|
|
277
281
|
.slider>div:nth-child(3),
|
|
278
282
|
.slider>div:nth-child(4){
|
|
279
283
|
@apply absolute w-[2.1rem] h-[2.1rem] rounded-full bg-white shadow-sm border-[1px] border-text-200;
|
|
284
|
+
@apply flex;
|
|
280
285
|
top: 50%;
|
|
281
286
|
transform: translate3d(0, -50%, 0);
|
|
282
287
|
touch-action: none;
|
package/src/utils/listview.js
CHANGED
|
@@ -48,7 +48,7 @@ let ListView = {
|
|
|
48
48
|
return
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
const summary = (params.preset.summaries ?? []).filter((_) => _.enabled).pop()
|
|
51
|
+
const summary = ((params.preset ?? {}).summaries ?? []).filter((_) => _.enabled).pop()
|
|
52
52
|
if(!summary) return
|
|
53
53
|
|
|
54
54
|
const { derivedSql, where, replacements } = loadResults
|
package/src/widgets/Review.vue
CHANGED
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
</div>
|
|
38
38
|
</div>
|
|
39
39
|
|
|
40
|
-
<div class="md:flex-1 py-6 flex flex-col
|
|
40
|
+
<div class="md:flex-1 py-6 flex flex-col gap-6">
|
|
41
41
|
|
|
42
|
-
<div v-for="review in items.reviews" class="
|
|
42
|
+
<div v-for="review in items.reviews" class="flex flex-col gap-2 bg-white border-[1px] border-gray-200 p-4 pb-2 rounded-xl">
|
|
43
43
|
<div class="flex flex-row gap-4">
|
|
44
44
|
<div class="flex-1 flex flex-col gap-2">
|
|
45
45
|
<div class="flex flex-row gap-1">
|
|
@@ -117,7 +117,7 @@ export default{
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
.bar{
|
|
120
|
-
@apply h-[1rem] bg-gray-
|
|
120
|
+
@apply h-[1rem] bg-gray-200 rounded-lg;
|
|
121
121
|
@apply relative;
|
|
122
122
|
}
|
|
123
123
|
.bar>*{
|
|
@@ -48,6 +48,13 @@
|
|
|
48
48
|
</div>
|
|
49
49
|
</div>
|
|
50
50
|
|
|
51
|
+
<div class="flex flex-row gap-4 items-center">
|
|
52
|
+
<Checkbox v-model="item.props.enableGoogleReviewSD" @change="$emit('change')">
|
|
53
|
+
Enable google structured data
|
|
54
|
+
</Checkbox>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
|
|
51
58
|
<Modal ref="reviewModal" width="360" height="420">
|
|
52
59
|
<template v-slot:head>
|
|
53
60
|
<div class="relative p-6">
|
|
@@ -517,7 +517,7 @@ export default{
|
|
|
517
517
|
|
|
518
518
|
async load(){
|
|
519
519
|
return this.socketEmit2('page.open', { uid:this.$route.params.uid })
|
|
520
|
-
.then(({ page, layouts }) => {
|
|
520
|
+
.then(({ page, layouts, host }) => {
|
|
521
521
|
|
|
522
522
|
const patchComponents = (items) => {
|
|
523
523
|
return items.map((comp) => {
|
|
@@ -540,7 +540,8 @@ export default{
|
|
|
540
540
|
|
|
541
541
|
this.page = page
|
|
542
542
|
this.layouts = layouts
|
|
543
|
-
this.
|
|
543
|
+
this.host = host
|
|
544
|
+
this.iframeSrc = (this.host ?? import.meta.env.VITE_WEB_HOST) + '/' + (this.page.path ?? '')
|
|
544
545
|
this.$nextTick(() => this.resize())
|
|
545
546
|
})
|
|
546
547
|
.catch((err) => {
|
|
@@ -731,7 +732,7 @@ export default{
|
|
|
731
732
|
this.socketEmit2('page.save', this.page)
|
|
732
733
|
.then(() => {
|
|
733
734
|
if(reload){
|
|
734
|
-
this.iframeSrc = import.meta.env.VITE_WEB_HOST + '/' + (this.page.path ?? '')
|
|
735
|
+
this.iframeSrc = (this.host ?? import.meta.env.VITE_WEB_HOST) + '/' + (this.page.path ?? '')
|
|
735
736
|
this.reloadIframe()
|
|
736
737
|
}
|
|
737
738
|
})
|
|
@@ -1026,6 +1027,7 @@ export default{
|
|
|
1026
1027
|
return {
|
|
1027
1028
|
iframeStyle: {},
|
|
1028
1029
|
iframeSrc: '',
|
|
1030
|
+
host: null,
|
|
1029
1031
|
page: null,
|
|
1030
1032
|
layouts: [],
|
|
1031
1033
|
tabItems: [
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<div class="relative p-6">
|
|
5
5
|
<h3>{{ $t('Choose Template:') }}</h3>
|
|
6
6
|
<div class="absolute top-0 right-0 p-2">
|
|
7
|
-
<button type="button" class="p-2" @click="
|
|
7
|
+
<button type="button" class="p-2" @click="$router.back()">
|
|
8
8
|
<svg width="24" height="24" viewBox="0 0 24 24" class="fill-text-300 hover:fill-red-500" xmlns="http://www.w3.org/2000/svg">
|
|
9
9
|
<path d="M6.53034 5.46965C6.23745 5.17676 5.76257 5.17676 5.46968 5.46965C5.17679 5.76255 5.17679 6.23742 5.46968 6.53031L10.9393 12L5.46967 17.4697C5.17678 17.7626 5.17678 18.2374 5.46967 18.5303C5.76256 18.8232 6.23744 18.8232 6.53033 18.5303L12 13.0606L17.4697 18.5303C17.7626 18.8232 18.2375 18.8232 18.5303 18.5303C18.8232 18.2374 18.8232 17.7626 18.5303 17.4697L13.0607 12L18.5303 6.53032C18.8232 6.23743 18.8232 5.76256 18.5303 5.46966C18.2374 5.17677 17.7626 5.17677 17.4697 5.46966L12 10.9393L6.53034 5.46965Z"/>
|
|
10
10
|
</svg>
|
|
@@ -58,6 +58,11 @@ export default{
|
|
|
58
58
|
|
|
59
59
|
props: {
|
|
60
60
|
|
|
61
|
+
src: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: 'page.create'
|
|
64
|
+
},
|
|
65
|
+
|
|
61
66
|
templates: {
|
|
62
67
|
type: Array,
|
|
63
68
|
default: [
|
|
@@ -87,23 +92,13 @@ export default{
|
|
|
87
92
|
|
|
88
93
|
methods: {
|
|
89
94
|
|
|
90
|
-
|
|
91
|
-
this.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
async create(){
|
|
99
|
-
try{
|
|
100
|
-
const res = await this.socketEmit2('page.create', this.selectedTemplate.page)
|
|
101
|
-
this.$emit('save', res)
|
|
102
|
-
this.close()
|
|
103
|
-
}
|
|
104
|
-
catch(err){
|
|
105
|
-
this.alert(err)
|
|
106
|
-
}
|
|
95
|
+
create(){
|
|
96
|
+
this.socketEmit2(this.src, this.selectedTemplate.page)
|
|
97
|
+
.then(res => {
|
|
98
|
+
this.isOpen = false
|
|
99
|
+
this.$emit('save', res)
|
|
100
|
+
})
|
|
101
|
+
.catch(err => this.alert(err))
|
|
107
102
|
}
|
|
108
103
|
|
|
109
104
|
},
|
|
@@ -122,7 +117,16 @@ export default{
|
|
|
122
117
|
|
|
123
118
|
mounted(){
|
|
124
119
|
this._templates = this.templates
|
|
125
|
-
|
|
120
|
+
window.setTimeout(() => this.isOpen = this.$route.hash === '#selector', 300)
|
|
121
|
+
},
|
|
122
|
+
|
|
123
|
+
watch: {
|
|
124
|
+
|
|
125
|
+
'$route.hash'(to){
|
|
126
|
+
this.isOpen = to === '#selector'
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
},
|
|
126
130
|
|
|
127
131
|
}
|
|
128
132
|
|