ts-glitter 13.8.3 → 13.8.5
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/lowcode/Entry.js +59 -51
- package/lowcode/Entry.ts +85 -79
- package/lowcode/backend-manager/bg-guide.js +209 -170
- package/lowcode/backend-manager/bg-guide.ts +281 -216
- package/lowcode/backend-manager/bg-widget.js +953 -691
- package/lowcode/backend-manager/bg-widget.ts +1739 -1378
- package/lowcode/cms-plugin/ai-message.js +48 -75
- package/lowcode/cms-plugin/ai-message.ts +54 -89
- package/lowcode/cms-plugin/shopping-finance-setting.js +196 -151
- package/lowcode/cms-plugin/shopping-finance-setting.ts +836 -779
- package/lowcode/cms-plugin/shopping-product-text.js +700 -73
- package/lowcode/cms-plugin/shopping-product-text.ts +721 -56
- package/lowcode/cms-plugin/shopping-shipment-setting.js +15 -9
- package/lowcode/cms-plugin/shopping-shipment-setting.ts +15 -9
- package/lowcode/css/editor.css +31 -0
- package/lowcode/glitter-base/route/shopping.js +28 -0
- package/lowcode/glitter-base/route/shopping.ts +28 -0
- package/lowcode/glitterBundle/Glitter.js +1 -0
- package/lowcode/glitterBundle/Glitter.ts +1 -0
- package/lowcode/glitterBundle/dialog/dialog.js +1 -1
- package/lowcode/glitterBundle/dialog/dialog.ts +1 -1
- package/lowcode/glitterBundle/module/html-generate.js +158 -169
- package/lowcode/glitterBundle/module/html-generate.ts +849 -905
- package/lowcode/jspage/editor.js +33 -26
- package/lowcode/jspage/editor.ts +63 -37
- package/lowcode/jspage/function-page/setting_editor.js +214 -225
- package/lowcode/jspage/function-page/setting_editor.ts +222 -239
- package/lowcode/jspage/main.js +7 -3
- package/lowcode/jspage/main.ts +9 -5
- package/lowcode/public-components/product/product-list.js +651 -0
- package/lowcode/public-components/product/product-list.ts +709 -0
- package/lowcode/view-model/saas-view-model.js +1 -1
- package/lowcode/view-model/saas-view-model.ts +1 -1
- package/package.json +1 -1
- package/src/api-public/controllers/ai-chat.js +11 -0
- package/src/api-public/controllers/ai-chat.js.map +1 -1
- package/src/api-public/controllers/ai-chat.ts +11 -0
- package/src/api-public/controllers/chat.js.map +1 -1
- package/src/api-public/services/ai-robot.d.ts +10 -1
- package/src/api-public/services/ai-robot.js +116 -2
- package/src/api-public/services/ai-robot.js.map +1 -1
- package/src/api-public/services/ai-robot.ts +123 -10
- package/src/api-public/services/chat.js +20 -21
- package/src/api-public/services/chat.js.map +1 -1
- package/src/api-public/services/chat.ts +22 -22
- package/src/api-public/services/fake-data-model/fake-order.js.map +1 -1
- package/src/api-public/services/fb-message.js.map +1 -1
- package/src/api-public/services/notify.js +8 -0
- package/src/api-public/services/notify.js.map +1 -1
- package/src/api-public/services/notify.ts +8 -0
- package/src/controllers/ai.js.map +1 -1
- package/src/helper/glitter-util.d.ts +1 -0
- package/src/helper/glitter-util.js.map +1 -1
- package/src/modules/database.d.ts +0 -1
- package/src/modules/database.js.map +1 -1
- package/src/services/template.js.map +1 -1
- package/src/update-script.js.map +1 -1
- package/w6ppvcb8yb.json +1 -0
package/lowcode/Entry.js
CHANGED
|
@@ -13,7 +13,7 @@ import { ApiPageConfig } from './api/pageConfig.js';
|
|
|
13
13
|
import { BaseApi } from './glitterBundle/api/base.js';
|
|
14
14
|
import { GlobalUser } from './glitter-base/global/global-user.js';
|
|
15
15
|
import { EditorConfig } from './editor-config.js';
|
|
16
|
-
import { ShareDialog } from
|
|
16
|
+
import { ShareDialog } from './glitterBundle/dialog/ShareDialog.js';
|
|
17
17
|
export class Entry {
|
|
18
18
|
static onCreate(glitter) {
|
|
19
19
|
var _a;
|
|
@@ -49,9 +49,18 @@ export class Entry {
|
|
|
49
49
|
scroll-behavior: auto !important;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
+
<<<<<<< HEAD
|
|
53
|
+
.hide-elem {
|
|
54
|
+
display: none !important;
|
|
55
|
+
}
|
|
56
|
+
=======
|
|
52
57
|
.hide-elem {
|
|
53
58
|
display: none !important;
|
|
54
59
|
}
|
|
60
|
+
.hy-drawer-left {
|
|
61
|
+
left:-1000px !important;
|
|
62
|
+
}
|
|
63
|
+
>>>>>>> d311c294 (update glitter version)
|
|
55
64
|
`);
|
|
56
65
|
if (glitter.getUrlParameter('appName')) {
|
|
57
66
|
window.appName = glitter.getUrlParameter('appName');
|
|
@@ -59,8 +68,8 @@ export class Entry {
|
|
|
59
68
|
}
|
|
60
69
|
window.renderClock = (_a = window.renderClock) !== null && _a !== void 0 ? _a : clockF();
|
|
61
70
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
62
|
-
glitter.share.editerVersion =
|
|
63
|
-
glitter.share.start =
|
|
71
|
+
glitter.share.editerVersion = 'V_13.8.5';
|
|
72
|
+
glitter.share.start = new Date();
|
|
64
73
|
const vm = {
|
|
65
74
|
appConfig: [],
|
|
66
75
|
};
|
|
@@ -72,12 +81,14 @@ export class Entry {
|
|
|
72
81
|
config.token = GlobalUser.saas_token;
|
|
73
82
|
Entry.resourceInitial(glitter, vm, (dd) => __awaiter(this, void 0, void 0, function* () {
|
|
74
83
|
glitter.addStyle(`
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
84
|
+
${parseInt(window.parent.glitter.share.bottom_inset, 10)
|
|
85
|
+
? `
|
|
86
|
+
.update-bar-container {
|
|
87
|
+
padding-bottom: ${window.parent.glitter.share.bottom_inset}px !important;
|
|
88
|
+
}
|
|
89
|
+
`
|
|
90
|
+
: ``}
|
|
91
|
+
|
|
81
92
|
.editorParent .editorChild {
|
|
82
93
|
display: none;
|
|
83
94
|
}
|
|
@@ -102,11 +113,9 @@ export class Entry {
|
|
|
102
113
|
width: 100%;
|
|
103
114
|
height: 100%;
|
|
104
115
|
pointer-events: none;
|
|
105
|
-
|
|
106
116
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
117
|
+
.editor_item.active {
|
|
118
|
+
background: #ddd;
|
|
110
119
|
}
|
|
111
120
|
.editorItemActive {
|
|
112
121
|
display: block !important;
|
|
@@ -117,7 +126,6 @@ export class Entry {
|
|
|
117
126
|
width: 100%;
|
|
118
127
|
height: 100%;
|
|
119
128
|
position: absolute;
|
|
120
|
-
|
|
121
129
|
}
|
|
122
130
|
|
|
123
131
|
.editorItemActive > .badge_it {
|
|
@@ -140,29 +148,26 @@ export class Entry {
|
|
|
140
148
|
position: relative;
|
|
141
149
|
}
|
|
142
150
|
.sel_normal {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}
|
|
151
|
+
cursor: pointer;
|
|
152
|
+
border-radius: 7px;
|
|
153
|
+
border: 1px solid #ddd;
|
|
154
|
+
padding: 2px 14px;
|
|
155
|
+
background: #fff;
|
|
156
|
+
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
|
|
157
|
+
}
|
|
150
158
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
159
|
+
ul {
|
|
160
|
+
list-style: none;
|
|
161
|
+
}
|
|
162
|
+
li {
|
|
163
|
+
list-style: none;
|
|
164
|
+
}
|
|
159
165
|
`);
|
|
160
166
|
yield Entry.globalStyle(glitter, dd);
|
|
161
167
|
if (glitter.getUrlParameter('type') === 'editor') {
|
|
162
168
|
const dialog = new ShareDialog(glitter);
|
|
163
169
|
dialog.dataLoading({ visible: true, text: '後台載入中' });
|
|
164
|
-
Entry.toBackendEditor(glitter, () => {
|
|
165
|
-
});
|
|
170
|
+
Entry.toBackendEditor(glitter, () => { });
|
|
166
171
|
}
|
|
167
172
|
else if (glitter.getUrlParameter('type') === 'htmlEditor') {
|
|
168
173
|
Entry.toHtmlEditor(glitter, vm, () => {
|
|
@@ -217,9 +222,14 @@ export class Entry {
|
|
|
217
222
|
glitter.share.evalPlace = (evals) => eval(evals);
|
|
218
223
|
function running() {
|
|
219
224
|
return __awaiter(this, void 0, void 0, function* () {
|
|
220
|
-
glitter.addStyleLink([
|
|
225
|
+
glitter.addStyleLink([
|
|
226
|
+
'assets/vendor/boxicons/css/boxicons.min.css',
|
|
227
|
+
'assets/css/theme.css',
|
|
228
|
+
'css/editor.css',
|
|
229
|
+
'https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/themes/classic.min.css',
|
|
221
230
|
'https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/themes/monolith.min.css',
|
|
222
|
-
'https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/themes/nano.min.css'
|
|
231
|
+
'https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/themes/nano.min.css',
|
|
232
|
+
]);
|
|
223
233
|
yield new Promise((resolve, reject) => {
|
|
224
234
|
glitter.addMtScript([
|
|
225
235
|
'jslib/pickr.min.js',
|
|
@@ -250,7 +260,7 @@ export class Entry {
|
|
|
250
260
|
appName: config.appName,
|
|
251
261
|
tag: glitter.getUrlParameter('page'),
|
|
252
262
|
});
|
|
253
|
-
if (data.response.result.length === 0 &&
|
|
263
|
+
if (data.response.result.length === 0 && glitter.getUrlParameter('page') !== 'cms') {
|
|
254
264
|
glitter.setUrlParameter('page', data.response.redirect);
|
|
255
265
|
}
|
|
256
266
|
glitter.setHome('jspage/main.js', glitter.getUrlParameter('page'), {
|
|
@@ -287,9 +297,7 @@ export class Entry {
|
|
|
287
297
|
{
|
|
288
298
|
src: 'https://kit.fontawesome.com/cccedec0f8.js',
|
|
289
299
|
},
|
|
290
|
-
], () => {
|
|
291
|
-
}, () => {
|
|
292
|
-
});
|
|
300
|
+
], () => { }, () => { });
|
|
293
301
|
glitter.addStyle(`
|
|
294
302
|
@media (prefers-reduced-motion: no-preference) {
|
|
295
303
|
:root {
|
|
@@ -323,9 +331,7 @@ export class Entry {
|
|
|
323
331
|
src: `${glitter.htmlGenerate.configureCDN(glitter.htmlGenerate.resourceHook(dd.js))}`,
|
|
324
332
|
type: 'module',
|
|
325
333
|
};
|
|
326
|
-
}), () => {
|
|
327
|
-
}, () => {
|
|
328
|
-
}, [{ key: 'async', value: 'true' }]);
|
|
334
|
+
}), () => { }, () => { }, [{ key: 'async', value: 'true' }]);
|
|
329
335
|
glitter.htmlGenerate.loadScript(glitter, window.parent.editerData.setting
|
|
330
336
|
.filter((dd) => {
|
|
331
337
|
return ['widget', 'container', 'code'].indexOf(dd.type) === -1;
|
|
@@ -389,8 +395,7 @@ export class Entry {
|
|
|
389
395
|
.map((dd) => {
|
|
390
396
|
return {
|
|
391
397
|
src: `${glitter.htmlGenerate.configureCDN(glitter.htmlGenerate.resourceHook(dd.js))}`,
|
|
392
|
-
callback: () => {
|
|
393
|
-
},
|
|
398
|
+
callback: () => { },
|
|
394
399
|
};
|
|
395
400
|
}));
|
|
396
401
|
function authPass() {
|
|
@@ -446,17 +451,20 @@ export class Entry {
|
|
|
446
451
|
glitter.share.initial_fonts = [];
|
|
447
452
|
if (glitter.share.font_theme[0]) {
|
|
448
453
|
glitter.addStyle(`
|
|
449
|
-
@charset "UTF-8";
|
|
450
|
-
${glitter.share.font_theme
|
|
454
|
+
@charset "UTF-8";
|
|
455
|
+
${glitter.share.font_theme
|
|
456
|
+
.map((dd) => {
|
|
451
457
|
glitter.share.initial_fonts.push(dd.value);
|
|
452
458
|
return `@import url('https://fonts.googleapis.com/css2?family=${dd.value}&display=swap');`;
|
|
453
|
-
})
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
459
|
+
})
|
|
460
|
+
.join('\n')}
|
|
461
|
+
body {
|
|
462
|
+
font-family: '${glitter.share.font_theme[0].value}' !important;
|
|
463
|
+
font-optical-sizing: auto;
|
|
464
|
+
font-style: normal;
|
|
465
|
+
color: #393939;
|
|
466
|
+
}
|
|
467
|
+
`);
|
|
460
468
|
}
|
|
461
469
|
function loopCheckGlobalValue(array, tag) {
|
|
462
470
|
try {
|
package/lowcode/Entry.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
import {Glitter} from './glitterBundle/Glitter.js';
|
|
3
|
-
import {config} from './config.js';
|
|
4
|
-
import {ApiPageConfig} from './api/pageConfig.js';
|
|
5
|
-
import {BaseApi} from './glitterBundle/api/base.js';
|
|
6
|
-
import {GlobalUser} from './glitter-base/global/global-user.js';
|
|
7
|
-
import {EditorConfig} from './editor-config.js';
|
|
8
|
-
import {ShareDialog} from
|
|
2
|
+
import { Glitter } from './glitterBundle/Glitter.js';
|
|
3
|
+
import { config } from './config.js';
|
|
4
|
+
import { ApiPageConfig } from './api/pageConfig.js';
|
|
5
|
+
import { BaseApi } from './glitterBundle/api/base.js';
|
|
6
|
+
import { GlobalUser } from './glitter-base/global/global-user.js';
|
|
7
|
+
import { EditorConfig } from './editor-config.js';
|
|
8
|
+
import { ShareDialog } from './glitterBundle/dialog/ShareDialog.js';
|
|
9
9
|
|
|
10
10
|
export class Entry {
|
|
11
11
|
public static onCreate(glitter: Glitter) {
|
|
12
|
-
glitter.share.top_inset = 0
|
|
13
|
-
glitter.share.bottom_inset = 0
|
|
12
|
+
glitter.share.top_inset = 0;
|
|
13
|
+
glitter.share.bottom_inset = 0;
|
|
14
14
|
glitter.share.reload_code_hash = function () {
|
|
15
15
|
const hashCode = (window as any).preloadData.eval_code_hash || {};
|
|
16
16
|
Object.keys(hashCode).map((dd, index) => {
|
|
@@ -49,9 +49,18 @@ export class Entry {
|
|
|
49
49
|
scroll-behavior: auto !important;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
+
<<<<<<< HEAD
|
|
53
|
+
.hide-elem {
|
|
54
|
+
display: none !important;
|
|
55
|
+
}
|
|
56
|
+
=======
|
|
52
57
|
.hide-elem {
|
|
53
58
|
display: none !important;
|
|
54
59
|
}
|
|
60
|
+
.hy-drawer-left {
|
|
61
|
+
left:-1000px !important;
|
|
62
|
+
}
|
|
63
|
+
>>>>>>> d311c294 (update glitter version)
|
|
55
64
|
`);
|
|
56
65
|
if (glitter.getUrlParameter('appName')) {
|
|
57
66
|
(window as any).appName = glitter.getUrlParameter('appName');
|
|
@@ -59,8 +68,8 @@ export class Entry {
|
|
|
59
68
|
}
|
|
60
69
|
(window as any).renderClock = (window as any).renderClock ?? clockF();
|
|
61
70
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
62
|
-
glitter.share.editerVersion =
|
|
63
|
-
glitter.share.start =
|
|
71
|
+
glitter.share.editerVersion = 'V_13.8.5';
|
|
72
|
+
glitter.share.start = new Date();
|
|
64
73
|
const vm: {
|
|
65
74
|
appConfig: any;
|
|
66
75
|
} = {
|
|
@@ -77,12 +86,16 @@ export class Entry {
|
|
|
77
86
|
// 資源初始化
|
|
78
87
|
Entry.resourceInitial(glitter, vm, async (dd) => {
|
|
79
88
|
glitter.addStyle(`
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
89
|
+
${
|
|
90
|
+
parseInt((window.parent as any).glitter.share.bottom_inset, 10)
|
|
91
|
+
? `
|
|
92
|
+
.update-bar-container {
|
|
93
|
+
padding-bottom: ${(window.parent as any).glitter.share.bottom_inset}px !important;
|
|
94
|
+
}
|
|
95
|
+
`
|
|
96
|
+
: ``
|
|
97
|
+
}
|
|
98
|
+
|
|
86
99
|
.editorParent .editorChild {
|
|
87
100
|
display: none;
|
|
88
101
|
}
|
|
@@ -107,11 +120,9 @@ export class Entry {
|
|
|
107
120
|
width: 100%;
|
|
108
121
|
height: 100%;
|
|
109
122
|
pointer-events: none;
|
|
110
|
-
|
|
111
123
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
124
|
+
.editor_item.active {
|
|
125
|
+
background: #ddd;
|
|
115
126
|
}
|
|
116
127
|
.editorItemActive {
|
|
117
128
|
display: block !important;
|
|
@@ -122,7 +133,6 @@ export class Entry {
|
|
|
122
133
|
width: 100%;
|
|
123
134
|
height: 100%;
|
|
124
135
|
position: absolute;
|
|
125
|
-
|
|
126
136
|
}
|
|
127
137
|
|
|
128
138
|
.editorItemActive > .badge_it {
|
|
@@ -145,32 +155,29 @@ export class Entry {
|
|
|
145
155
|
position: relative;
|
|
146
156
|
}
|
|
147
157
|
.sel_normal {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
}
|
|
158
|
+
cursor: pointer;
|
|
159
|
+
border-radius: 7px;
|
|
160
|
+
border: 1px solid #ddd;
|
|
161
|
+
padding: 2px 14px;
|
|
162
|
+
background: #fff;
|
|
163
|
+
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
|
|
164
|
+
}
|
|
155
165
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}
|
|
166
|
+
ul {
|
|
167
|
+
list-style: none;
|
|
168
|
+
}
|
|
169
|
+
li {
|
|
170
|
+
list-style: none;
|
|
171
|
+
}
|
|
164
172
|
`);
|
|
165
173
|
|
|
166
174
|
// 載入全域資源
|
|
167
175
|
await Entry.globalStyle(glitter, dd);
|
|
168
176
|
if (glitter.getUrlParameter('type') === 'editor') {
|
|
169
|
-
const dialog = new ShareDialog(glitter)
|
|
170
|
-
dialog.dataLoading({visible: true, text: '後台載入中'})
|
|
177
|
+
const dialog = new ShareDialog(glitter);
|
|
178
|
+
dialog.dataLoading({ visible: true, text: '後台載入中' });
|
|
171
179
|
// 頁面編輯器
|
|
172
|
-
Entry.toBackendEditor(glitter, () => {
|
|
173
|
-
});
|
|
180
|
+
Entry.toBackendEditor(glitter, () => {});
|
|
174
181
|
} else if (glitter.getUrlParameter('type') === 'htmlEditor') {
|
|
175
182
|
// Iframe預覽區塊
|
|
176
183
|
Entry.toHtmlEditor(glitter, vm, () => {
|
|
@@ -212,7 +219,6 @@ export class Entry {
|
|
|
212
219
|
|
|
213
220
|
// 跳轉至頁面編輯器
|
|
214
221
|
public static toBackendEditor(glitter: Glitter, callback: () => void) {
|
|
215
|
-
|
|
216
222
|
glitter.addStyle(`
|
|
217
223
|
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@100..900&family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap');
|
|
218
224
|
@media (prefers-reduced-motion: no-preference) {
|
|
@@ -228,11 +234,15 @@ export class Entry {
|
|
|
228
234
|
glitter.share.EditorMode = true;
|
|
229
235
|
glitter.share.evalPlace = (evals: string) => eval(evals);
|
|
230
236
|
|
|
231
|
-
|
|
232
237
|
async function running() {
|
|
233
|
-
glitter.addStyleLink([
|
|
238
|
+
glitter.addStyleLink([
|
|
239
|
+
'assets/vendor/boxicons/css/boxicons.min.css',
|
|
240
|
+
'assets/css/theme.css',
|
|
241
|
+
'css/editor.css',
|
|
242
|
+
'https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/themes/classic.min.css',
|
|
234
243
|
'https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/themes/monolith.min.css',
|
|
235
|
-
'https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/themes/nano.min.css'
|
|
244
|
+
'https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/themes/nano.min.css',
|
|
245
|
+
]);
|
|
236
246
|
await new Promise((resolve, reject) => {
|
|
237
247
|
glitter.addMtScript(
|
|
238
248
|
[
|
|
@@ -260,7 +270,6 @@ export class Entry {
|
|
|
260
270
|
(window as any).root.classList.add('light-mode');
|
|
261
271
|
|
|
262
272
|
function toNext() {
|
|
263
|
-
|
|
264
273
|
console.log(`to-next-time:`, (window as any).renderClock.stop());
|
|
265
274
|
running().then(async () => {
|
|
266
275
|
{
|
|
@@ -270,7 +279,7 @@ export class Entry {
|
|
|
270
279
|
tag: glitter.getUrlParameter('page'),
|
|
271
280
|
});
|
|
272
281
|
// console.log(`data===>`,data)
|
|
273
|
-
if (data.response.result.length === 0 &&
|
|
282
|
+
if (data.response.result.length === 0 && glitter.getUrlParameter('page') !== 'cms') {
|
|
274
283
|
glitter.setUrlParameter('page', data.response.redirect);
|
|
275
284
|
}
|
|
276
285
|
|
|
@@ -316,10 +325,8 @@ export class Entry {
|
|
|
316
325
|
src: 'https://kit.fontawesome.com/cccedec0f8.js',
|
|
317
326
|
},
|
|
318
327
|
],
|
|
319
|
-
() => {
|
|
320
|
-
}
|
|
321
|
-
() => {
|
|
322
|
-
}
|
|
328
|
+
() => {},
|
|
329
|
+
() => {}
|
|
323
330
|
);
|
|
324
331
|
glitter.addStyle(`
|
|
325
332
|
@media (prefers-reduced-motion: no-preference) {
|
|
@@ -360,11 +367,9 @@ export class Entry {
|
|
|
360
367
|
type: 'module',
|
|
361
368
|
};
|
|
362
369
|
}),
|
|
363
|
-
() => {
|
|
364
|
-
},
|
|
365
|
-
|
|
366
|
-
},
|
|
367
|
-
[{key: 'async', value: 'true'}]
|
|
370
|
+
() => {},
|
|
371
|
+
() => {},
|
|
372
|
+
[{ key: 'async', value: 'true' }]
|
|
368
373
|
);
|
|
369
374
|
|
|
370
375
|
// Preload page script
|
|
@@ -385,22 +390,21 @@ export class Entry {
|
|
|
385
390
|
return eval(evals);
|
|
386
391
|
};
|
|
387
392
|
setTimeout(() => {
|
|
388
|
-
(window.parent as any).glitter.share.loading_dialog.dataLoading({text: '', visible: false})
|
|
389
|
-
}, 2000)
|
|
393
|
+
(window.parent as any).glitter.share.loading_dialog.dataLoading({ text: '', visible: false });
|
|
394
|
+
}, 2000);
|
|
390
395
|
glitter.htmlGenerate.setHome({
|
|
391
396
|
app_config: vm.appConfig,
|
|
392
397
|
page_config: (window.parent as any).page_config ?? {},
|
|
393
398
|
get config() {
|
|
394
|
-
return (window.parent as any).editerData.setting
|
|
399
|
+
return (window.parent as any).editerData.setting;
|
|
395
400
|
},
|
|
396
401
|
get editMode() {
|
|
397
|
-
return (window.parent as any).editerData
|
|
402
|
+
return (window.parent as any).editerData;
|
|
398
403
|
},
|
|
399
404
|
data: {},
|
|
400
405
|
tag: (window.parent as any).glitter.getUrlParameter('page'),
|
|
401
406
|
});
|
|
402
407
|
|
|
403
|
-
|
|
404
408
|
callback();
|
|
405
409
|
}
|
|
406
410
|
|
|
@@ -441,8 +445,7 @@ export class Entry {
|
|
|
441
445
|
.map((dd: any) => {
|
|
442
446
|
return {
|
|
443
447
|
src: `${glitter.htmlGenerate.configureCDN(glitter.htmlGenerate.resourceHook(dd.js))}`,
|
|
444
|
-
callback: () => {
|
|
445
|
-
},
|
|
448
|
+
callback: () => {},
|
|
446
449
|
};
|
|
447
450
|
})
|
|
448
451
|
);
|
|
@@ -493,8 +496,8 @@ export class Entry {
|
|
|
493
496
|
glitter.share.globalStyle = {};
|
|
494
497
|
const config = glitter.share.appConfigresponse.response.data;
|
|
495
498
|
config.color_theme = config.color_theme ?? [];
|
|
496
|
-
config.container_theme = config.container_theme ?? []
|
|
497
|
-
config.font_theme = config.font_theme ?? []
|
|
499
|
+
config.container_theme = config.container_theme ?? [];
|
|
500
|
+
config.font_theme = config.font_theme ?? [];
|
|
498
501
|
config.globalValue = config.globalValue ?? [];
|
|
499
502
|
config.globalStyleTag = config.globalStyleTag ?? [];
|
|
500
503
|
config.color_theme.map((dd: any, index: number) => {
|
|
@@ -502,22 +505,25 @@ export class Entry {
|
|
|
502
505
|
glitter.share.globalValue[`theme_color.${index}.${d2.key}`] = dd[d2.key];
|
|
503
506
|
});
|
|
504
507
|
});
|
|
505
|
-
glitter.share.font_theme = config.font_theme
|
|
506
|
-
glitter.share.global_container_theme = config.container_theme
|
|
507
|
-
glitter.share.initial_fonts = []
|
|
508
|
+
glitter.share.font_theme = config.font_theme;
|
|
509
|
+
glitter.share.global_container_theme = config.container_theme;
|
|
510
|
+
glitter.share.initial_fonts = [];
|
|
508
511
|
if (glitter.share.font_theme[0]) {
|
|
509
512
|
glitter.addStyle(`
|
|
510
|
-
@charset "UTF-8";
|
|
511
|
-
${glitter.share.font_theme
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
513
|
+
@charset "UTF-8";
|
|
514
|
+
${glitter.share.font_theme
|
|
515
|
+
.map((dd: any) => {
|
|
516
|
+
glitter.share.initial_fonts.push(dd.value);
|
|
517
|
+
return `@import url('https://fonts.googleapis.com/css2?family=${dd.value}&display=swap');`;
|
|
518
|
+
})
|
|
519
|
+
.join('\n')}
|
|
520
|
+
body {
|
|
521
|
+
font-family: '${glitter.share.font_theme[0].value}' !important;
|
|
522
|
+
font-optical-sizing: auto;
|
|
523
|
+
font-style: normal;
|
|
524
|
+
color: #393939;
|
|
525
|
+
}
|
|
526
|
+
`);
|
|
521
527
|
}
|
|
522
528
|
|
|
523
529
|
function loopCheckGlobalValue(array: any, tag: string) {
|