ts-glitter 13.8.35 → 13.8.53
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 +56 -51
- package/lowcode/Entry.ts +82 -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 +74 -13
- package/lowcode/cms-plugin/ai-message.ts +76 -14
- 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 +6 -0
- package/lowcode/glitter-base/route/ai-chat.ts +2 -2
- package/lowcode/glitter-base/route/shopping.js +28 -0
- package/lowcode/glitter-base/route/shopping.ts +28 -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 +20 -15
- package/lowcode/jspage/editor.ts +20 -15
- 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 +2 -2
- package/lowcode/view-model/saas-view-model.ts +2 -2
- 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/app-release.js.map +1 -1
- package/src/api-public/controllers/article.js.map +1 -1
- package/src/api-public/controllers/chat.js.map +1 -1
- package/src/api-public/controllers/fb-message.js.map +1 -1
- package/src/api-public/controllers/post.js.map +1 -1
- package/src/api-public/controllers/shop.js.map +1 -1
- package/src/api-public/controllers/user.js.map +1 -1
- package/src/api-public/services/ai-robot.d.ts +7 -0
- package/src/api-public/services/ai-robot.js +48 -0
- package/src/api-public/services/ai-robot.js.map +1 -1
- package/src/api-public/services/ai-robot.ts +55 -10
- package/src/api-public/services/auto-send-email.js +41 -1
- package/src/api-public/services/auto-send-email.js.map +1 -1
- package/src/api-public/services/auto-send-email.ts +41 -1
- package/src/api-public/services/chat.js +12 -10
- package/src/api-public/services/chat.js.map +1 -1
- package/src/api-public/services/chat.ts +14 -13
- package/src/api-public/services/fake-data-model/fake-order.js.map +1 -1
- package/src/api-public/services/fb-message.d.ts +2 -9
- package/src/api-public/services/fb-message.js +13 -57
- package/src/api-public/services/fb-message.js.map +1 -1
- package/src/api-public/services/fb-message.ts +15 -65
- package/src/api-public/services/line-message.js.map +1 -1
- package/src/api-public/services/post.js.map +1 -1
- package/src/api-public/services/schedule.js.map +1 -1
- package/src/api-public/services/shopping.d.ts +1 -1
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +7 -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/index.js +52 -35
- package/src/index.js.map +1 -1
- package/src/index.ts +163 -143
- package/src/modules/database.d.ts +0 -1
- package/src/modules/database.js.map +1 -1
- package/src/services/app.js +62 -29
- package/src/services/app.js.map +1 -1
- package/src/services/app.ts +110 -100
- package/src/services/template.js.map +1 -1
- package/src/update-script.js.map +1 -1
- package/w6ppvcb8yb.json +1 -0
- package/wvyrnrgo2g.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,12 +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
|
}
|
|
55
60
|
.hy-drawer-left {
|
|
56
61
|
left:-1000px !important;
|
|
57
62
|
}
|
|
63
|
+
>>>>>>> d311c294 (update glitter version)
|
|
58
64
|
`);
|
|
59
65
|
if (glitter.getUrlParameter('appName')) {
|
|
60
66
|
window.appName = glitter.getUrlParameter('appName');
|
|
@@ -62,8 +68,8 @@ export class Entry {
|
|
|
62
68
|
}
|
|
63
69
|
window.renderClock = (_a = window.renderClock) !== null && _a !== void 0 ? _a : clockF();
|
|
64
70
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
65
|
-
glitter.share.editerVersion =
|
|
66
|
-
glitter.share.start =
|
|
71
|
+
glitter.share.editerVersion = 'V_13.8.53';
|
|
72
|
+
glitter.share.start = new Date();
|
|
67
73
|
const vm = {
|
|
68
74
|
appConfig: [],
|
|
69
75
|
};
|
|
@@ -75,12 +81,14 @@ export class Entry {
|
|
|
75
81
|
config.token = GlobalUser.saas_token;
|
|
76
82
|
Entry.resourceInitial(glitter, vm, (dd) => __awaiter(this, void 0, void 0, function* () {
|
|
77
83
|
glitter.addStyle(`
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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
|
+
|
|
84
92
|
.editorParent .editorChild {
|
|
85
93
|
display: none;
|
|
86
94
|
}
|
|
@@ -105,11 +113,9 @@ export class Entry {
|
|
|
105
113
|
width: 100%;
|
|
106
114
|
height: 100%;
|
|
107
115
|
pointer-events: none;
|
|
108
|
-
|
|
109
116
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
117
|
+
.editor_item.active {
|
|
118
|
+
background: #ddd;
|
|
113
119
|
}
|
|
114
120
|
.editorItemActive {
|
|
115
121
|
display: block !important;
|
|
@@ -120,7 +126,6 @@ export class Entry {
|
|
|
120
126
|
width: 100%;
|
|
121
127
|
height: 100%;
|
|
122
128
|
position: absolute;
|
|
123
|
-
|
|
124
129
|
}
|
|
125
130
|
|
|
126
131
|
.editorItemActive > .badge_it {
|
|
@@ -143,29 +148,26 @@ export class Entry {
|
|
|
143
148
|
position: relative;
|
|
144
149
|
}
|
|
145
150
|
.sel_normal {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}
|
|
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
|
+
}
|
|
153
158
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
159
|
+
ul {
|
|
160
|
+
list-style: none;
|
|
161
|
+
}
|
|
162
|
+
li {
|
|
163
|
+
list-style: none;
|
|
164
|
+
}
|
|
162
165
|
`);
|
|
163
166
|
yield Entry.globalStyle(glitter, dd);
|
|
164
167
|
if (glitter.getUrlParameter('type') === 'editor') {
|
|
165
168
|
const dialog = new ShareDialog(glitter);
|
|
166
169
|
dialog.dataLoading({ visible: true, text: '後台載入中' });
|
|
167
|
-
Entry.toBackendEditor(glitter, () => {
|
|
168
|
-
});
|
|
170
|
+
Entry.toBackendEditor(glitter, () => { });
|
|
169
171
|
}
|
|
170
172
|
else if (glitter.getUrlParameter('type') === 'htmlEditor') {
|
|
171
173
|
Entry.toHtmlEditor(glitter, vm, () => {
|
|
@@ -220,9 +222,14 @@ export class Entry {
|
|
|
220
222
|
glitter.share.evalPlace = (evals) => eval(evals);
|
|
221
223
|
function running() {
|
|
222
224
|
return __awaiter(this, void 0, void 0, function* () {
|
|
223
|
-
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',
|
|
224
230
|
'https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/themes/monolith.min.css',
|
|
225
|
-
'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
|
+
]);
|
|
226
233
|
yield new Promise((resolve, reject) => {
|
|
227
234
|
glitter.addMtScript([
|
|
228
235
|
'jslib/pickr.min.js',
|
|
@@ -253,7 +260,7 @@ export class Entry {
|
|
|
253
260
|
appName: config.appName,
|
|
254
261
|
tag: glitter.getUrlParameter('page'),
|
|
255
262
|
});
|
|
256
|
-
if (data.response.result.length === 0 &&
|
|
263
|
+
if (data.response.result.length === 0 && glitter.getUrlParameter('page') !== 'cms') {
|
|
257
264
|
glitter.setUrlParameter('page', data.response.redirect);
|
|
258
265
|
}
|
|
259
266
|
glitter.setHome('jspage/main.js', glitter.getUrlParameter('page'), {
|
|
@@ -290,9 +297,7 @@ export class Entry {
|
|
|
290
297
|
{
|
|
291
298
|
src: 'https://kit.fontawesome.com/cccedec0f8.js',
|
|
292
299
|
},
|
|
293
|
-
], () => {
|
|
294
|
-
}, () => {
|
|
295
|
-
});
|
|
300
|
+
], () => { }, () => { });
|
|
296
301
|
glitter.addStyle(`
|
|
297
302
|
@media (prefers-reduced-motion: no-preference) {
|
|
298
303
|
:root {
|
|
@@ -326,9 +331,7 @@ export class Entry {
|
|
|
326
331
|
src: `${glitter.htmlGenerate.configureCDN(glitter.htmlGenerate.resourceHook(dd.js))}`,
|
|
327
332
|
type: 'module',
|
|
328
333
|
};
|
|
329
|
-
}), () => {
|
|
330
|
-
}, () => {
|
|
331
|
-
}, [{ key: 'async', value: 'true' }]);
|
|
334
|
+
}), () => { }, () => { }, [{ key: 'async', value: 'true' }]);
|
|
332
335
|
glitter.htmlGenerate.loadScript(glitter, window.parent.editerData.setting
|
|
333
336
|
.filter((dd) => {
|
|
334
337
|
return ['widget', 'container', 'code'].indexOf(dd.type) === -1;
|
|
@@ -392,8 +395,7 @@ export class Entry {
|
|
|
392
395
|
.map((dd) => {
|
|
393
396
|
return {
|
|
394
397
|
src: `${glitter.htmlGenerate.configureCDN(glitter.htmlGenerate.resourceHook(dd.js))}`,
|
|
395
|
-
callback: () => {
|
|
396
|
-
},
|
|
398
|
+
callback: () => { },
|
|
397
399
|
};
|
|
398
400
|
}));
|
|
399
401
|
function authPass() {
|
|
@@ -449,17 +451,20 @@ export class Entry {
|
|
|
449
451
|
glitter.share.initial_fonts = [];
|
|
450
452
|
if (glitter.share.font_theme[0]) {
|
|
451
453
|
glitter.addStyle(`
|
|
452
|
-
@charset "UTF-8";
|
|
453
|
-
${glitter.share.font_theme
|
|
454
|
+
@charset "UTF-8";
|
|
455
|
+
${glitter.share.font_theme
|
|
456
|
+
.map((dd) => {
|
|
454
457
|
glitter.share.initial_fonts.push(dd.value);
|
|
455
458
|
return `@import url('https://fonts.googleapis.com/css2?family=${dd.value}&display=swap');`;
|
|
456
|
-
})
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
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
|
+
`);
|
|
463
468
|
}
|
|
464
469
|
function loopCheckGlobalValue(array, tag) {
|
|
465
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,12 +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
|
}
|
|
55
60
|
.hy-drawer-left {
|
|
56
61
|
left:-1000px !important;
|
|
57
62
|
}
|
|
63
|
+
>>>>>>> d311c294 (update glitter version)
|
|
58
64
|
`);
|
|
59
65
|
if (glitter.getUrlParameter('appName')) {
|
|
60
66
|
(window as any).appName = glitter.getUrlParameter('appName');
|
|
@@ -62,8 +68,8 @@ export class Entry {
|
|
|
62
68
|
}
|
|
63
69
|
(window as any).renderClock = (window as any).renderClock ?? clockF();
|
|
64
70
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
65
|
-
glitter.share.editerVersion =
|
|
66
|
-
glitter.share.start =
|
|
71
|
+
glitter.share.editerVersion = 'V_13.8.53';
|
|
72
|
+
glitter.share.start = new Date();
|
|
67
73
|
const vm: {
|
|
68
74
|
appConfig: any;
|
|
69
75
|
} = {
|
|
@@ -80,12 +86,16 @@ export class Entry {
|
|
|
80
86
|
// 資源初始化
|
|
81
87
|
Entry.resourceInitial(glitter, vm, async (dd) => {
|
|
82
88
|
glitter.addStyle(`
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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
|
+
|
|
89
99
|
.editorParent .editorChild {
|
|
90
100
|
display: none;
|
|
91
101
|
}
|
|
@@ -110,11 +120,9 @@ export class Entry {
|
|
|
110
120
|
width: 100%;
|
|
111
121
|
height: 100%;
|
|
112
122
|
pointer-events: none;
|
|
113
|
-
|
|
114
123
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
124
|
+
.editor_item.active {
|
|
125
|
+
background: #ddd;
|
|
118
126
|
}
|
|
119
127
|
.editorItemActive {
|
|
120
128
|
display: block !important;
|
|
@@ -125,7 +133,6 @@ export class Entry {
|
|
|
125
133
|
width: 100%;
|
|
126
134
|
height: 100%;
|
|
127
135
|
position: absolute;
|
|
128
|
-
|
|
129
136
|
}
|
|
130
137
|
|
|
131
138
|
.editorItemActive > .badge_it {
|
|
@@ -148,32 +155,29 @@ export class Entry {
|
|
|
148
155
|
position: relative;
|
|
149
156
|
}
|
|
150
157
|
.sel_normal {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}
|
|
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
|
+
}
|
|
158
165
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}
|
|
166
|
+
ul {
|
|
167
|
+
list-style: none;
|
|
168
|
+
}
|
|
169
|
+
li {
|
|
170
|
+
list-style: none;
|
|
171
|
+
}
|
|
167
172
|
`);
|
|
168
173
|
|
|
169
174
|
// 載入全域資源
|
|
170
175
|
await Entry.globalStyle(glitter, dd);
|
|
171
176
|
if (glitter.getUrlParameter('type') === 'editor') {
|
|
172
|
-
const dialog = new ShareDialog(glitter)
|
|
173
|
-
dialog.dataLoading({visible: true, text: '後台載入中'})
|
|
177
|
+
const dialog = new ShareDialog(glitter);
|
|
178
|
+
dialog.dataLoading({ visible: true, text: '後台載入中' });
|
|
174
179
|
// 頁面編輯器
|
|
175
|
-
Entry.toBackendEditor(glitter, () => {
|
|
176
|
-
});
|
|
180
|
+
Entry.toBackendEditor(glitter, () => {});
|
|
177
181
|
} else if (glitter.getUrlParameter('type') === 'htmlEditor') {
|
|
178
182
|
// Iframe預覽區塊
|
|
179
183
|
Entry.toHtmlEditor(glitter, vm, () => {
|
|
@@ -215,7 +219,6 @@ export class Entry {
|
|
|
215
219
|
|
|
216
220
|
// 跳轉至頁面編輯器
|
|
217
221
|
public static toBackendEditor(glitter: Glitter, callback: () => void) {
|
|
218
|
-
|
|
219
222
|
glitter.addStyle(`
|
|
220
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');
|
|
221
224
|
@media (prefers-reduced-motion: no-preference) {
|
|
@@ -231,11 +234,15 @@ export class Entry {
|
|
|
231
234
|
glitter.share.EditorMode = true;
|
|
232
235
|
glitter.share.evalPlace = (evals: string) => eval(evals);
|
|
233
236
|
|
|
234
|
-
|
|
235
237
|
async function running() {
|
|
236
|
-
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',
|
|
237
243
|
'https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/themes/monolith.min.css',
|
|
238
|
-
'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
|
+
]);
|
|
239
246
|
await new Promise((resolve, reject) => {
|
|
240
247
|
glitter.addMtScript(
|
|
241
248
|
[
|
|
@@ -263,7 +270,6 @@ export class Entry {
|
|
|
263
270
|
(window as any).root.classList.add('light-mode');
|
|
264
271
|
|
|
265
272
|
function toNext() {
|
|
266
|
-
|
|
267
273
|
console.log(`to-next-time:`, (window as any).renderClock.stop());
|
|
268
274
|
running().then(async () => {
|
|
269
275
|
{
|
|
@@ -273,7 +279,7 @@ export class Entry {
|
|
|
273
279
|
tag: glitter.getUrlParameter('page'),
|
|
274
280
|
});
|
|
275
281
|
// console.log(`data===>`,data)
|
|
276
|
-
if (data.response.result.length === 0 &&
|
|
282
|
+
if (data.response.result.length === 0 && glitter.getUrlParameter('page') !== 'cms') {
|
|
277
283
|
glitter.setUrlParameter('page', data.response.redirect);
|
|
278
284
|
}
|
|
279
285
|
|
|
@@ -319,10 +325,8 @@ export class Entry {
|
|
|
319
325
|
src: 'https://kit.fontawesome.com/cccedec0f8.js',
|
|
320
326
|
},
|
|
321
327
|
],
|
|
322
|
-
() => {
|
|
323
|
-
}
|
|
324
|
-
() => {
|
|
325
|
-
}
|
|
328
|
+
() => {},
|
|
329
|
+
() => {}
|
|
326
330
|
);
|
|
327
331
|
glitter.addStyle(`
|
|
328
332
|
@media (prefers-reduced-motion: no-preference) {
|
|
@@ -363,11 +367,9 @@ export class Entry {
|
|
|
363
367
|
type: 'module',
|
|
364
368
|
};
|
|
365
369
|
}),
|
|
366
|
-
() => {
|
|
367
|
-
},
|
|
368
|
-
|
|
369
|
-
},
|
|
370
|
-
[{key: 'async', value: 'true'}]
|
|
370
|
+
() => {},
|
|
371
|
+
() => {},
|
|
372
|
+
[{ key: 'async', value: 'true' }]
|
|
371
373
|
);
|
|
372
374
|
|
|
373
375
|
// Preload page script
|
|
@@ -388,22 +390,21 @@ export class Entry {
|
|
|
388
390
|
return eval(evals);
|
|
389
391
|
};
|
|
390
392
|
setTimeout(() => {
|
|
391
|
-
(window.parent as any).glitter.share.loading_dialog.dataLoading({text: '', visible: false})
|
|
392
|
-
}, 2000)
|
|
393
|
+
(window.parent as any).glitter.share.loading_dialog.dataLoading({ text: '', visible: false });
|
|
394
|
+
}, 2000);
|
|
393
395
|
glitter.htmlGenerate.setHome({
|
|
394
396
|
app_config: vm.appConfig,
|
|
395
397
|
page_config: (window.parent as any).page_config ?? {},
|
|
396
398
|
get config() {
|
|
397
|
-
return (window.parent as any).editerData.setting
|
|
399
|
+
return (window.parent as any).editerData.setting;
|
|
398
400
|
},
|
|
399
401
|
get editMode() {
|
|
400
|
-
return (window.parent as any).editerData
|
|
402
|
+
return (window.parent as any).editerData;
|
|
401
403
|
},
|
|
402
404
|
data: {},
|
|
403
405
|
tag: (window.parent as any).glitter.getUrlParameter('page'),
|
|
404
406
|
});
|
|
405
407
|
|
|
406
|
-
|
|
407
408
|
callback();
|
|
408
409
|
}
|
|
409
410
|
|
|
@@ -444,8 +445,7 @@ export class Entry {
|
|
|
444
445
|
.map((dd: any) => {
|
|
445
446
|
return {
|
|
446
447
|
src: `${glitter.htmlGenerate.configureCDN(glitter.htmlGenerate.resourceHook(dd.js))}`,
|
|
447
|
-
callback: () => {
|
|
448
|
-
},
|
|
448
|
+
callback: () => {},
|
|
449
449
|
};
|
|
450
450
|
})
|
|
451
451
|
);
|
|
@@ -496,8 +496,8 @@ export class Entry {
|
|
|
496
496
|
glitter.share.globalStyle = {};
|
|
497
497
|
const config = glitter.share.appConfigresponse.response.data;
|
|
498
498
|
config.color_theme = config.color_theme ?? [];
|
|
499
|
-
config.container_theme = config.container_theme ?? []
|
|
500
|
-
config.font_theme = config.font_theme ?? []
|
|
499
|
+
config.container_theme = config.container_theme ?? [];
|
|
500
|
+
config.font_theme = config.font_theme ?? [];
|
|
501
501
|
config.globalValue = config.globalValue ?? [];
|
|
502
502
|
config.globalStyleTag = config.globalStyleTag ?? [];
|
|
503
503
|
config.color_theme.map((dd: any, index: number) => {
|
|
@@ -505,22 +505,25 @@ export class Entry {
|
|
|
505
505
|
glitter.share.globalValue[`theme_color.${index}.${d2.key}`] = dd[d2.key];
|
|
506
506
|
});
|
|
507
507
|
});
|
|
508
|
-
glitter.share.font_theme = config.font_theme
|
|
509
|
-
glitter.share.global_container_theme = config.container_theme
|
|
510
|
-
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 = [];
|
|
511
511
|
if (glitter.share.font_theme[0]) {
|
|
512
512
|
glitter.addStyle(`
|
|
513
|
-
@charset "UTF-8";
|
|
514
|
-
${glitter.share.font_theme
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
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
|
+
`);
|
|
524
527
|
}
|
|
525
528
|
|
|
526
529
|
function loopCheckGlobalValue(array: any, tag: string) {
|