ts-glitter 13.8.72 → 13.8.74
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 +10 -16
- package/lowcode/Entry.ts +65 -77
- package/lowcode/backend-manager/bg-guide.ts +3 -0
- package/lowcode/editor/search-idea.js +2 -2
- package/lowcode/editor/search-idea.ts +2 -2
- package/lowcode/glitterBundle/Glitter.js +5 -0
- package/lowcode/glitterBundle/Glitter.ts +5 -0
- package/lowcode/jspage/editor.js +3 -4
- package/lowcode/jspage/editor.ts +7 -8
- package/lowcode/jspage/function-page/main_editor.ts +4 -4
- package/lowcode/jspage/function-page/setting_editor.js +1 -1
- package/lowcode/jspage/function-page/setting_editor.ts +1 -1
- package/lowcode/jspage/main.js +1 -1
- package/lowcode/jspage/main.ts +1 -4
- package/lowcode/public-components/checkout/index.js +6 -0
- package/lowcode/public-components/checkout/index.ts +12 -0
- package/lowcode/public-components/footer/footer-01.js +57 -53
- package/lowcode/public-components/footer/footer-01.ts +96 -88
- package/lowcode/public-components/footer/footer-02.js +2 -6
- package/lowcode/public-components/footer/footer-02.ts +2 -6
- package/lowcode/public-components/footer/footer-03.js +2 -6
- package/lowcode/public-components/footer/footer-03.ts +2 -7
- package/lowcode/public-components/user-manager/um-class.js +192 -41
- package/lowcode/public-components/user-manager/um-class.ts +214 -57
- package/lowcode/public-components/user-manager/um-info.js +68 -60
- package/lowcode/public-components/user-manager/um-info.ts +69 -59
- package/lowcode/public-components/user-manager/um-orderlist.js +2 -2
- package/lowcode/public-components/user-manager/um-orderlist.ts +2 -2
- package/lowcode/public-components/user-manager/um-rebate.js +2 -2
- package/lowcode/public-components/user-manager/um-rebate.ts +2 -2
- package/lowcode/public-components/user-manager/um-voucher.js +295 -0
- package/lowcode/public-components/user-manager/um-voucher.ts +345 -0
- package/lowcode/public-components/user-manager/um-wishlist.js +2 -2
- package/lowcode/public-components/user-manager/um-wishlist.ts +2 -2
- package/package.json +1 -1
- package/src/api-public/controllers/shop.js +133 -97
- package/src/api-public/controllers/shop.js.map +1 -1
- package/src/api-public/controllers/shop.ts +245 -182
- package/src/api-public/services/shopping.d.ts +1 -1
- package/src/api-public/services/shopping.js +6 -4
- package/src/api-public/services/shopping.js.map +1 -5
- package/src/api-public/services/shopping.ts +16 -12
- package/src/controllers/global-event.js.map +1 -1
- package/src/controllers/private_config.js.map +1 -1
- package/src/controllers/template.js.map +1 -1
- package/src/services/seo.js.map +1 -1
- package/src/services/template.d.ts +1 -1
- package/src/services/template.js +47 -43
- package/src/services/template.js.map +1 -1
- package/src/services/template.ts +203 -140
package/lowcode/Entry.js
CHANGED
|
@@ -68,7 +68,7 @@ export class Entry {
|
|
|
68
68
|
}
|
|
69
69
|
window.renderClock = (_a = window.renderClock) !== null && _a !== void 0 ? _a : clockF();
|
|
70
70
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
71
|
-
glitter.share.editerVersion = 'V_13.8.
|
|
71
|
+
glitter.share.editerVersion = 'V_13.8.736';
|
|
72
72
|
glitter.share.start = new Date();
|
|
73
73
|
const vm = {
|
|
74
74
|
appConfig: [],
|
|
@@ -167,8 +167,7 @@ export class Entry {
|
|
|
167
167
|
if (glitter.getUrlParameter('type') === 'editor') {
|
|
168
168
|
const dialog = new ShareDialog(glitter);
|
|
169
169
|
dialog.dataLoading({ visible: true, text: '後台載入中' });
|
|
170
|
-
Entry.toBackendEditor(glitter, () => {
|
|
171
|
-
});
|
|
170
|
+
Entry.toBackendEditor(glitter, () => { });
|
|
172
171
|
}
|
|
173
172
|
else if (glitter.getUrlParameter('type') === 'htmlEditor') {
|
|
174
173
|
Entry.toHtmlEditor(glitter, vm, () => {
|
|
@@ -193,7 +192,7 @@ export class Entry {
|
|
|
193
192
|
bind: id,
|
|
194
193
|
view: () => {
|
|
195
194
|
return SaasViewModel.createShop(gvc, true);
|
|
196
|
-
}
|
|
195
|
+
},
|
|
197
196
|
};
|
|
198
197
|
});
|
|
199
198
|
}, 'change_app');
|
|
@@ -251,7 +250,7 @@ export class Entry {
|
|
|
251
250
|
}
|
|
252
251
|
}
|
|
253
252
|
static toBackendEditor(glitter, callback) {
|
|
254
|
-
if (
|
|
253
|
+
if (localStorage.getItem('on-pos') === 'true' && glitter.getUrlParameter('page') !== 'pos') {
|
|
255
254
|
localStorage.removeItem('on-pos');
|
|
256
255
|
location.href = glitter.root_path + 'pos?app-id=t_1725992531001';
|
|
257
256
|
}
|
|
@@ -346,9 +345,7 @@ export class Entry {
|
|
|
346
345
|
{
|
|
347
346
|
src: 'https://kit.fontawesome.com/cccedec0f8.js',
|
|
348
347
|
},
|
|
349
|
-
], () => {
|
|
350
|
-
}, () => {
|
|
351
|
-
});
|
|
348
|
+
], () => { }, () => { });
|
|
352
349
|
glitter.addStyle(`
|
|
353
350
|
@media (prefers-reduced-motion: no-preference) {
|
|
354
351
|
:root {
|
|
@@ -382,9 +379,7 @@ export class Entry {
|
|
|
382
379
|
src: `${glitter.htmlGenerate.configureCDN(glitter.htmlGenerate.resourceHook(dd.js))}`,
|
|
383
380
|
type: 'module',
|
|
384
381
|
};
|
|
385
|
-
}), () => {
|
|
386
|
-
}, () => {
|
|
387
|
-
}, [{ key: 'async', value: 'true' }]);
|
|
382
|
+
}), () => { }, () => { }, [{ key: 'async', value: 'true' }]);
|
|
388
383
|
glitter.htmlGenerate.loadScript(glitter, window.parent.editerData.setting
|
|
389
384
|
.filter((dd) => {
|
|
390
385
|
return ['widget', 'container', 'code'].indexOf(dd.type) === -1;
|
|
@@ -448,8 +443,7 @@ export class Entry {
|
|
|
448
443
|
.map((dd) => {
|
|
449
444
|
return {
|
|
450
445
|
src: `${glitter.htmlGenerate.configureCDN(glitter.htmlGenerate.resourceHook(dd.js))}`,
|
|
451
|
-
callback: () => {
|
|
452
|
-
},
|
|
446
|
+
callback: () => { },
|
|
453
447
|
};
|
|
454
448
|
}));
|
|
455
449
|
function authPass() {
|
|
@@ -481,14 +475,14 @@ export class Entry {
|
|
|
481
475
|
}
|
|
482
476
|
static resourceInitial(glitter, vm, callback) {
|
|
483
477
|
glitter.runJsInterFace('getTopInset', {}, (response) => {
|
|
484
|
-
glitter.share.top_inset =
|
|
478
|
+
glitter.share.top_inset = response.data;
|
|
485
479
|
}, {
|
|
486
480
|
webFunction: () => {
|
|
487
481
|
return { data: 0 };
|
|
488
482
|
},
|
|
489
483
|
});
|
|
490
484
|
glitter.runJsInterFace('getBottomInset', {}, (response) => {
|
|
491
|
-
glitter.share.bottom_inset =
|
|
485
|
+
glitter.share.bottom_inset = response.data;
|
|
492
486
|
}, {
|
|
493
487
|
webFunction: () => {
|
|
494
488
|
return { data: 0 };
|
|
@@ -588,7 +582,7 @@ export class Entry {
|
|
|
588
582
|
loopVersion();
|
|
589
583
|
}, 1000 * 300);
|
|
590
584
|
}
|
|
591
|
-
}
|
|
585
|
+
},
|
|
592
586
|
});
|
|
593
587
|
}
|
|
594
588
|
else {
|
package/lowcode/Entry.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
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 './glitterBundle/dialog/ShareDialog.js';
|
|
9
|
-
|
|
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';
|
|
10
9
|
|
|
11
10
|
export class Entry {
|
|
12
11
|
public static onCreate(glitter: Glitter) {
|
|
@@ -14,7 +13,7 @@ export class Entry {
|
|
|
14
13
|
(window as any).appName = app_name || (window as any).appName;
|
|
15
14
|
(window as any).glitter_page = page;
|
|
16
15
|
location.reload();
|
|
17
|
-
}
|
|
16
|
+
};
|
|
18
17
|
glitter.share.top_inset = 0;
|
|
19
18
|
glitter.share.bottom_inset = 0;
|
|
20
19
|
glitter.share.reload_code_hash = function () {
|
|
@@ -69,7 +68,7 @@ export class Entry {
|
|
|
69
68
|
}
|
|
70
69
|
(window as any).renderClock = (window as any).renderClock ?? clockF();
|
|
71
70
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
72
|
-
glitter.share.editerVersion = 'V_13.8.
|
|
71
|
+
glitter.share.editerVersion = 'V_13.8.74';
|
|
73
72
|
glitter.share.start = new Date();
|
|
74
73
|
const vm: {
|
|
75
74
|
appConfig: any;
|
|
@@ -88,14 +87,14 @@ export class Entry {
|
|
|
88
87
|
Entry.resourceInitial(glitter, vm, async (dd) => {
|
|
89
88
|
glitter.addStyle(`
|
|
90
89
|
${
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
parseInt((window.parent as any).glitter.share.bottom_inset, 10)
|
|
91
|
+
? `
|
|
93
92
|
.update-bar-container {
|
|
94
93
|
padding-bottom: ${(window.parent as any).glitter.share.bottom_inset}px !important;
|
|
95
94
|
}
|
|
96
95
|
`
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
: ``
|
|
97
|
+
}
|
|
99
98
|
|
|
100
99
|
.editorParent .editorChild {
|
|
101
100
|
display: none;
|
|
@@ -176,10 +175,9 @@ export class Entry {
|
|
|
176
175
|
await Entry.globalStyle(glitter, dd);
|
|
177
176
|
if (glitter.getUrlParameter('type') === 'editor') {
|
|
178
177
|
const dialog = new ShareDialog(glitter);
|
|
179
|
-
dialog.dataLoading({visible: true, text: '後台載入中'});
|
|
178
|
+
dialog.dataLoading({ visible: true, text: '後台載入中' });
|
|
180
179
|
// 頁面編輯器
|
|
181
|
-
Entry.toBackendEditor(glitter, () => {
|
|
182
|
-
});
|
|
180
|
+
Entry.toBackendEditor(glitter, () => {});
|
|
183
181
|
} else if (glitter.getUrlParameter('type') === 'htmlEditor') {
|
|
184
182
|
// Iframe預覽區塊
|
|
185
183
|
Entry.toHtmlEditor(glitter, vm, () => {
|
|
@@ -188,14 +186,11 @@ export class Entry {
|
|
|
188
186
|
} else if (glitter.getUrlParameter('page') === 'backend_manager') {
|
|
189
187
|
if (!GlobalUser.token) {
|
|
190
188
|
glitter.setUrlParameter('page', 'login');
|
|
191
|
-
location.reload()
|
|
189
|
+
location.reload();
|
|
192
190
|
} else {
|
|
193
191
|
try {
|
|
194
|
-
const appList = (await ApiPageConfig.getAppList(
|
|
195
|
-
|
|
196
|
-
GlobalUser.token
|
|
197
|
-
)).response.result;
|
|
198
|
-
localStorage.setItem('select_item', '0')
|
|
192
|
+
const appList = (await ApiPageConfig.getAppList(undefined, GlobalUser.token)).response.result;
|
|
193
|
+
localStorage.setItem('select_item', '0');
|
|
199
194
|
if (appList.length === 0) {
|
|
200
195
|
glitter.getModule(new URL('./view-model/saas-view-model.js', location.href).href, (SaasViewModel) => {
|
|
201
196
|
glitter.innerDialog((gvc) => {
|
|
@@ -204,29 +199,30 @@ export class Entry {
|
|
|
204
199
|
return {
|
|
205
200
|
bind: id,
|
|
206
201
|
view: () => {
|
|
207
|
-
return SaasViewModel.createShop(gvc, true)
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
})
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
})
|
|
202
|
+
return SaasViewModel.createShop(gvc, true);
|
|
203
|
+
},
|
|
204
|
+
};
|
|
205
|
+
});
|
|
206
|
+
}, 'change_app');
|
|
207
|
+
});
|
|
214
208
|
} else {
|
|
215
209
|
let appName = appList[0].appName;
|
|
216
|
-
if (
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
210
|
+
if (
|
|
211
|
+
appList.find((dd: any) => {
|
|
212
|
+
return dd.appName === localStorage.getItem('select_app_name');
|
|
213
|
+
})
|
|
214
|
+
) {
|
|
215
|
+
appName = localStorage.getItem('select_app_name');
|
|
220
216
|
}
|
|
221
|
-
glitter.setUrlParameter('page', 'index')
|
|
222
|
-
glitter.setUrlParameter('type', 'editor')
|
|
223
|
-
glitter.setUrlParameter('appName', appName)
|
|
224
|
-
glitter.setUrlParameter('function', 'backend-manger')
|
|
225
|
-
location.reload()
|
|
217
|
+
glitter.setUrlParameter('page', 'index');
|
|
218
|
+
glitter.setUrlParameter('type', 'editor');
|
|
219
|
+
glitter.setUrlParameter('appName', appName);
|
|
220
|
+
glitter.setUrlParameter('function', 'backend-manger');
|
|
221
|
+
location.reload();
|
|
226
222
|
}
|
|
227
223
|
} catch (e) {
|
|
228
224
|
glitter.setUrlParameter('page', 'login');
|
|
229
|
-
location.reload()
|
|
225
|
+
location.reload();
|
|
230
226
|
}
|
|
231
227
|
}
|
|
232
228
|
} else {
|
|
@@ -265,8 +261,8 @@ export class Entry {
|
|
|
265
261
|
|
|
266
262
|
// 跳轉至頁面編輯器
|
|
267
263
|
public static toBackendEditor(glitter: Glitter, callback: () => void) {
|
|
268
|
-
if (
|
|
269
|
-
localStorage.removeItem('on-pos')
|
|
264
|
+
if (localStorage.getItem('on-pos') === 'true' && glitter.getUrlParameter('page') !== 'pos') {
|
|
265
|
+
localStorage.removeItem('on-pos');
|
|
270
266
|
location.href = glitter.root_path + 'pos?app-id=t_1725992531001';
|
|
271
267
|
}
|
|
272
268
|
glitter.addStyle(`
|
|
@@ -375,10 +371,8 @@ export class Entry {
|
|
|
375
371
|
src: 'https://kit.fontawesome.com/cccedec0f8.js',
|
|
376
372
|
},
|
|
377
373
|
],
|
|
378
|
-
() => {
|
|
379
|
-
}
|
|
380
|
-
() => {
|
|
381
|
-
}
|
|
374
|
+
() => {},
|
|
375
|
+
() => {}
|
|
382
376
|
);
|
|
383
377
|
glitter.addStyle(`
|
|
384
378
|
@media (prefers-reduced-motion: no-preference) {
|
|
@@ -419,11 +413,9 @@ export class Entry {
|
|
|
419
413
|
type: 'module',
|
|
420
414
|
};
|
|
421
415
|
}),
|
|
422
|
-
() => {
|
|
423
|
-
},
|
|
424
|
-
|
|
425
|
-
},
|
|
426
|
-
[{key: 'async', value: 'true'}]
|
|
416
|
+
() => {},
|
|
417
|
+
() => {},
|
|
418
|
+
[{ key: 'async', value: 'true' }]
|
|
427
419
|
);
|
|
428
420
|
|
|
429
421
|
// Preload page script
|
|
@@ -444,7 +436,7 @@ export class Entry {
|
|
|
444
436
|
return eval(evals);
|
|
445
437
|
};
|
|
446
438
|
setTimeout(() => {
|
|
447
|
-
(window.parent as any).glitter.share.loading_dialog.dataLoading({text: '', visible: false});
|
|
439
|
+
(window.parent as any).glitter.share.loading_dialog.dataLoading({ text: '', visible: false });
|
|
448
440
|
}, 2000);
|
|
449
441
|
glitter.htmlGenerate.setHome({
|
|
450
442
|
app_config: vm.appConfig,
|
|
@@ -499,8 +491,7 @@ export class Entry {
|
|
|
499
491
|
.map((dd: any) => {
|
|
500
492
|
return {
|
|
501
493
|
src: `${glitter.htmlGenerate.configureCDN(glitter.htmlGenerate.resourceHook(dd.js))}`,
|
|
502
|
-
callback: () => {
|
|
503
|
-
},
|
|
494
|
+
callback: () => {},
|
|
504
495
|
};
|
|
505
496
|
})
|
|
506
497
|
);
|
|
@@ -545,11 +536,11 @@ export class Entry {
|
|
|
545
536
|
'getTopInset',
|
|
546
537
|
{},
|
|
547
538
|
(response: any) => {
|
|
548
|
-
glitter.share.top_inset =
|
|
539
|
+
glitter.share.top_inset = response.data;
|
|
549
540
|
},
|
|
550
541
|
{
|
|
551
542
|
webFunction: () => {
|
|
552
|
-
return {data: 0};
|
|
543
|
+
return { data: 0 };
|
|
553
544
|
},
|
|
554
545
|
}
|
|
555
546
|
);
|
|
@@ -558,11 +549,11 @@ export class Entry {
|
|
|
558
549
|
'getBottomInset',
|
|
559
550
|
{},
|
|
560
551
|
(response: any) => {
|
|
561
|
-
glitter.share.bottom_inset =
|
|
552
|
+
glitter.share.bottom_inset = response.data;
|
|
562
553
|
},
|
|
563
554
|
{
|
|
564
555
|
webFunction: () => {
|
|
565
|
-
return {data: 0};
|
|
556
|
+
return { data: 0 };
|
|
566
557
|
},
|
|
567
558
|
}
|
|
568
559
|
);
|
|
@@ -593,11 +584,11 @@ export class Entry {
|
|
|
593
584
|
glitter.addStyle(`
|
|
594
585
|
@charset "UTF-8";
|
|
595
586
|
${glitter.share.font_theme
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
587
|
+
.map((dd: any) => {
|
|
588
|
+
glitter.share.initial_fonts.push(dd.value);
|
|
589
|
+
return `@import url('https://fonts.googleapis.com/css2?family=${dd.value}&display=swap');`;
|
|
590
|
+
})
|
|
591
|
+
.join('\n')}
|
|
601
592
|
body {
|
|
602
593
|
font-family: '${glitter.share.font_theme[0].value}' !important;
|
|
603
594
|
font-optical-sizing: auto;
|
|
@@ -650,32 +641,31 @@ export class Entry {
|
|
|
650
641
|
ApiPageConfig.getGlitterVersion().then((res) => {
|
|
651
642
|
console.log('glitterVersion:', res.response.result);
|
|
652
643
|
if (!glitter.share.editerVersion.includes(res.response.result)) {
|
|
653
|
-
const dialog = new ShareDialog(glitter)
|
|
644
|
+
const dialog = new ShareDialog(glitter);
|
|
654
645
|
dialog.checkYesOrNot({
|
|
655
646
|
text: '新版本已發佈,是否進行更新?',
|
|
656
647
|
callback: (response) => {
|
|
657
648
|
if (response) {
|
|
658
|
-
location.reload()
|
|
649
|
+
location.reload();
|
|
659
650
|
} else {
|
|
660
651
|
setTimeout(() => {
|
|
661
|
-
loopVersion()
|
|
662
|
-
}, 1000 * 300)
|
|
652
|
+
loopVersion();
|
|
653
|
+
}, 1000 * 300);
|
|
663
654
|
}
|
|
664
|
-
}
|
|
665
|
-
})
|
|
655
|
+
},
|
|
656
|
+
});
|
|
666
657
|
} else {
|
|
667
658
|
setTimeout(() => {
|
|
668
|
-
loopVersion()
|
|
669
|
-
}, 1000 * 300)
|
|
659
|
+
loopVersion();
|
|
660
|
+
}, 1000 * 300);
|
|
670
661
|
}
|
|
671
|
-
|
|
672
|
-
})
|
|
662
|
+
});
|
|
673
663
|
}
|
|
674
664
|
|
|
675
665
|
if (glitter.getUrlParameter('type') === 'editor' || glitter.getUrlParameter('page') === 'pos') {
|
|
676
666
|
setTimeout(() => {
|
|
677
|
-
loopVersion()
|
|
678
|
-
}, 1000 * 300)
|
|
667
|
+
loopVersion();
|
|
668
|
+
}, 1000 * 300);
|
|
679
669
|
}
|
|
680
670
|
|
|
681
671
|
let countI = dd.response.data.initialList.length;
|
|
@@ -736,8 +726,6 @@ export class Entry {
|
|
|
736
726
|
glitter.setUrlParameter('page', 'login');
|
|
737
727
|
}
|
|
738
728
|
}
|
|
739
|
-
|
|
740
|
-
|
|
741
729
|
}
|
|
742
730
|
|
|
743
731
|
let clockF = () => {
|
|
@@ -156,7 +156,7 @@ transform: scale(0.4) translateX(-75%) translateY(-75%);
|
|
|
156
156
|
gvc: gvc,
|
|
157
157
|
type: 'idea'
|
|
158
158
|
}),
|
|
159
|
-
width: document.body.clientWidth <
|
|
159
|
+
width: document.body.clientWidth < 992 ? document.body.clientWidth : 800,
|
|
160
160
|
});
|
|
161
161
|
}
|
|
162
162
|
static findTemplate(gvc, def, callback) {
|
|
@@ -169,7 +169,7 @@ transform: scale(0.4) translateX(-75%) translateY(-75%);
|
|
|
169
169
|
def: def,
|
|
170
170
|
selectCallback: callback
|
|
171
171
|
}),
|
|
172
|
-
width: document.body.clientWidth <
|
|
172
|
+
width: document.body.clientWidth < 992 ? document.body.clientWidth : 800,
|
|
173
173
|
});
|
|
174
174
|
}
|
|
175
175
|
}
|
|
@@ -167,7 +167,7 @@ transform: scale(0.4) translateX(-75%) translateY(-75%);
|
|
|
167
167
|
gvc: gvc,
|
|
168
168
|
type:'idea'
|
|
169
169
|
}),
|
|
170
|
-
width: document.body.clientWidth <
|
|
170
|
+
width: document.body.clientWidth < 992 ? document.body.clientWidth : 800,
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
173
|
|
|
@@ -181,7 +181,7 @@ transform: scale(0.4) translateX(-75%) translateY(-75%);
|
|
|
181
181
|
def:def,
|
|
182
182
|
selectCallback:callback
|
|
183
183
|
}),
|
|
184
|
-
width: document.body.clientWidth <
|
|
184
|
+
width: document.body.clientWidth < 992 ? document.body.clientWidth : 800,
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
187
|
}
|
|
@@ -540,6 +540,11 @@ export class Glitter {
|
|
|
540
540
|
set href(value) {
|
|
541
541
|
const link = new URL(value, location.href);
|
|
542
542
|
if ((location.origin) === (link.origin)) {
|
|
543
|
+
if (link.searchParams.get("page")) {
|
|
544
|
+
const page = link.searchParams.get("page");
|
|
545
|
+
link.searchParams.delete("page");
|
|
546
|
+
link.pathname += page;
|
|
547
|
+
}
|
|
543
548
|
window.history.replaceState({}, document.title, link.href);
|
|
544
549
|
this.getModule(new URL('../official_event/page/change-page.js', import.meta.url).href, (cl) => {
|
|
545
550
|
cl.changePage(link.searchParams.get('page') || location.pathname.substring(1), 'page', {});
|
|
@@ -59,6 +59,11 @@ export class Glitter {
|
|
|
59
59
|
set href(value) {
|
|
60
60
|
const link = new URL(value, location.href);
|
|
61
61
|
if ((location.origin) === (link.origin)) {
|
|
62
|
+
if(link.searchParams.get("page")) {
|
|
63
|
+
const page=link.searchParams.get("page")
|
|
64
|
+
link.searchParams.delete("page");
|
|
65
|
+
link.pathname+=page
|
|
66
|
+
}
|
|
62
67
|
window.history.replaceState({}, document.title, link.href);
|
|
63
68
|
this.getModule(new URL('../official_event/page/change-page.js', import.meta.url).href, (cl) => {
|
|
64
69
|
cl.changePage(link.searchParams.get('page') || location.pathname.substring(1), 'page', {})
|
package/lowcode/jspage/editor.js
CHANGED
|
@@ -277,7 +277,7 @@ color: transparent;"
|
|
|
277
277
|
|
|
278
278
|
${(document.body.clientWidth > 800 || EditorConfig.backend_page() === 'backend-manger') ? `
|
|
279
279
|
<div
|
|
280
|
-
class="border-end d-flex align-items-center justify-content-center ${(document.body.clientWidth > 800 ? `ms-n2` : ``)} fs-3 d-
|
|
280
|
+
class="border-end d-flex align-items-center justify-content-center ${(document.body.clientWidth > 800 ? `ms-n2` : ``)} fs-3 d-lg-none"
|
|
281
281
|
style="width:56px;height: 56px;cursor: pointer;"
|
|
282
282
|
onclick="${gvc.event(() => {
|
|
283
283
|
if ((EditorConfig.backend_page() === 'backend-manger')) {
|
|
@@ -289,7 +289,6 @@ color: transparent;"
|
|
|
289
289
|
})}"
|
|
290
290
|
>
|
|
291
291
|
${((EditorConfig.backend_page() === 'backend-manger')) ? `<i class="fa-solid fa-bars"></i>` : ` <i class="fa-solid fa-arrow-left-from-arc"></i>`}
|
|
292
|
-
|
|
293
292
|
</div>
|
|
294
293
|
` : `
|
|
295
294
|
<li class="nav-item dropdown">
|
|
@@ -360,7 +359,7 @@ ${dd.title}</a></li>`;
|
|
|
360
359
|
AI
|
|
361
360
|
</div>
|
|
362
361
|
`}
|
|
363
|
-
<div class="border-end d-none d-
|
|
362
|
+
<div class="border-end d-none d-lg-block"
|
|
364
363
|
style="width:37px;height: 56px; "></div>
|
|
365
364
|
|
|
366
365
|
${(() => {
|
|
@@ -1079,7 +1078,7 @@ color:white;
|
|
|
1079
1078
|
elem: 'main',
|
|
1080
1079
|
class: `docs-container`,
|
|
1081
1080
|
style: `padding-top: ${EditorConfig.getPaddingTop(gvc) + 56}px;
|
|
1082
|
-
padding-left:${size <
|
|
1081
|
+
padding-left:${size < 992 ? `0px;` : Storage.select_function === 'user-editor' ? `365px;` : `284px;`}
|
|
1083
1082
|
padding-right:0px;
|
|
1084
1083
|
${Storage.select_function === 'page-editor' ? `overflow:hidden;` : ``}`
|
|
1085
1084
|
};
|
package/lowcode/jspage/editor.ts
CHANGED
|
@@ -111,7 +111,7 @@ export class Editor {
|
|
|
111
111
|
const url = new URL(href);
|
|
112
112
|
(window.parent as any).glitter.openNewTab(url.href);
|
|
113
113
|
} else if (gvc.glitter.getUrlParameter('device') === 'mobile') {
|
|
114
|
-
if (document.body.clientWidth <
|
|
114
|
+
if (document.body.clientWidth < 920) {
|
|
115
115
|
glitter.openNewTab(`${glitter.root_path}index-mobile?appName=${(window as any).appName}&device=mobile`);
|
|
116
116
|
} else {
|
|
117
117
|
BgWidget.appPreview({
|
|
@@ -125,7 +125,7 @@ export class Editor {
|
|
|
125
125
|
const url = new URL('', glitter.share.editorViewModel.domain ? `https://${glitter.share.editorViewModel.domain}/?page=index` : location.href);
|
|
126
126
|
url.searchParams.delete('type');
|
|
127
127
|
url.searchParams.set('page', glitter.getUrlParameter('page'));
|
|
128
|
-
if (document.body.clientWidth <
|
|
128
|
+
if (document.body.clientWidth < 922 && Storage.view_type === 'desktop' && gvc.glitter.deviceType === gvc.glitter.deviceTypeEnum.Ios) {
|
|
129
129
|
url.searchParams.set('_preview_width', '1300');
|
|
130
130
|
url.searchParams.set('_preview_scale', `${(document.body.clientWidth / 1300).toFixed(2)}`);
|
|
131
131
|
}
|
|
@@ -276,9 +276,9 @@ color: transparent;"
|
|
|
276
276
|
>
|
|
277
277
|
</div>
|
|
278
278
|
|
|
279
|
-
${(document.body.clientWidth >
|
|
279
|
+
${(document.body.clientWidth > 922 || EditorConfig.backend_page() === 'backend-manger') ? `
|
|
280
280
|
<div
|
|
281
|
-
class="border-end d-flex align-items-center justify-content-center ${(document.body.clientWidth>800?`ms-n2`:``)} fs-3 d-
|
|
281
|
+
class="border-end d-flex align-items-center justify-content-center ${(document.body.clientWidth>800?`ms-n2`:``)} fs-3 d-lg-none"
|
|
282
282
|
style="width:56px;height: 56px;cursor: pointer;"
|
|
283
283
|
onclick="${gvc.event(() => {
|
|
284
284
|
if ((EditorConfig.backend_page() === 'backend-manger')) {
|
|
@@ -289,7 +289,6 @@ color: transparent;"
|
|
|
289
289
|
})}"
|
|
290
290
|
>
|
|
291
291
|
${((EditorConfig.backend_page() === 'backend-manger')) ? `<i class="fa-solid fa-bars"></i>` : ` <i class="fa-solid fa-arrow-left-from-arc"></i>`}
|
|
292
|
-
|
|
293
292
|
</div>
|
|
294
293
|
` : `
|
|
295
294
|
<li class="nav-item dropdown">
|
|
@@ -359,14 +358,14 @@ ${dd.title}</a></li>`
|
|
|
359
358
|
AI
|
|
360
359
|
</div>
|
|
361
360
|
`}
|
|
362
|
-
<div class="border-end d-none d-
|
|
361
|
+
<div class="border-end d-none d-lg-block"
|
|
363
362
|
style="width:37px;height: 56px; "></div>
|
|
364
363
|
|
|
365
364
|
${(() => {
|
|
366
365
|
if (Storage.select_function === 'backend-manger') {
|
|
367
366
|
return html`
|
|
368
367
|
<div
|
|
369
|
-
class=" t_39_normal border-end px-4 d-flex align-items-center justify-content-center indexGuideBTN d-none d-
|
|
368
|
+
class=" t_39_normal border-end px-4 d-flex align-items-center justify-content-center indexGuideBTN d-none d-lg-flex"
|
|
370
369
|
style="height: 56px;cursor: pointer;"
|
|
371
370
|
onclick="${gvc.event(() => {
|
|
372
371
|
let bgGuide = new BgGuide(gvc, 0);
|
|
@@ -1153,7 +1152,7 @@ color:white;
|
|
|
1153
1152
|
elem: 'main',
|
|
1154
1153
|
class: `docs-container`,
|
|
1155
1154
|
style: `padding-top: ${EditorConfig.getPaddingTop(gvc) + 56}px;
|
|
1156
|
-
padding-left:${size <
|
|
1155
|
+
padding-left:${size < 992 ? `0px;` : Storage.select_function === 'user-editor' ? `365px;` : `284px;`}
|
|
1157
1156
|
padding-right:0px;
|
|
1158
1157
|
${Storage.select_function === 'page-editor' ? `overflow:hidden;` : ``}`
|
|
1159
1158
|
}
|
|
@@ -1154,7 +1154,7 @@ export class Main_editor {
|
|
|
1154
1154
|
frame.style.width = `${frame_width}px`;
|
|
1155
1155
|
frame.style.height = `${frame_height}px`;
|
|
1156
1156
|
frame.style.transform = `scale(${(container_width / frame_width).toFixed(2)})`
|
|
1157
|
-
if (document.body.clientWidth >
|
|
1157
|
+
if (document.body.clientWidth > 992 && Storage.view_type === ViewType.mobile) {
|
|
1158
1158
|
frame.style.left = `25%`;
|
|
1159
1159
|
} else {
|
|
1160
1160
|
frame.style.left = `0`;
|
|
@@ -1184,7 +1184,7 @@ export class Main_editor {
|
|
|
1184
1184
|
<div class="position-relative w-100 h-100"
|
|
1185
1185
|
style="${(parseInt(gvc.glitter.share.top_inset, 10)) ? `padding-top:${parseInt(gvc.glitter.share.top_inset, 10) + 10}px;` : ``}"
|
|
1186
1186
|
id="editerCenter">
|
|
1187
|
-
${(document.body.clientWidth <
|
|
1187
|
+
${(document.body.clientWidth < 992) ? gvc.bindView(() => {
|
|
1188
1188
|
let last_selected = '';
|
|
1189
1189
|
return {
|
|
1190
1190
|
bind: `item-editor-select`,
|
|
@@ -1362,7 +1362,7 @@ export class Main_editor {
|
|
|
1362
1362
|
? `d-flex align-items-center justify-content-center flex-column mx-auto` : `d-flex align-items-center justify-content-center flex-column `,
|
|
1363
1363
|
style: (Storage.select_function === 'page-editor' || Storage.select_function === 'user-editor')
|
|
1364
1364
|
? ``
|
|
1365
|
-
: `width: calc(${(document.body.clientWidth <
|
|
1365
|
+
: `width: calc(${(document.body.clientWidth < 992) ? `${document.body.clientWidth}px` : `100%`});height: ${window.innerHeight - EditorConfig.getPaddingTop(gvc) - 56}px;overflow:hidden;`
|
|
1366
1366
|
}
|
|
1367
1367
|
}
|
|
1368
1368
|
}
|
|
@@ -1397,7 +1397,7 @@ export class Main_editor {
|
|
|
1397
1397
|
class: Storage.view_type === ViewType.mobile && (Storage.select_function === 'page-editor' || Storage.select_function === 'user-editor')
|
|
1398
1398
|
? `d-flex align-items-center justify-content-center flex-column mx-auto` : `d-flex align-items-center justify-content-center flex-column`,
|
|
1399
1399
|
style: Storage.view_type === ViewType.mobile && (Storage.select_function === 'page-editor' || Storage.select_function === 'user-editor')
|
|
1400
|
-
? `width: calc(${(document.body.clientWidth <
|
|
1400
|
+
? `width: calc(${(document.body.clientWidth < 992) ? `${document.body.clientWidth}px` : `414px`});height: ${window.innerHeight - EditorConfig.getPaddingTop(gvc) - 56}px;` : `width: calc(${(document.body.clientWidth < 800) ? `${document.body.clientWidth}px` : `100%`});height: ${window.innerHeight - EditorConfig.getPaddingTop(gvc) - 56}px;overflow:hidden;`
|
|
1401
1401
|
}
|
|
1402
1402
|
}
|
|
1403
1403
|
}
|
|
@@ -69,7 +69,7 @@ export class Setting_editor {
|
|
|
69
69
|
Storage.select_bg_btn = 'custom';
|
|
70
70
|
return html `
|
|
71
71
|
<div
|
|
72
|
-
class="d-flex p-3 bg-white border-bottom align-items-end d-
|
|
72
|
+
class="d-flex p-3 bg-white border-bottom align-items-end d-lg-none"
|
|
73
73
|
style="${parseInt(glitter.share.top_inset, 10) ? `padding-top:${glitter.share.top_inset}px !important;` : ``}"
|
|
74
74
|
>
|
|
75
75
|
<img src="https://d3jnmi1tfjgtti.cloudfront.net/file/252530754/1718986163099-logo.svg" />
|
|
@@ -701,7 +701,7 @@ export class Setting_editor {
|
|
|
701
701
|
Storage.select_bg_btn = 'custom';
|
|
702
702
|
return html`
|
|
703
703
|
<div
|
|
704
|
-
class="d-flex p-3 bg-white border-bottom align-items-end d-
|
|
704
|
+
class="d-flex p-3 bg-white border-bottom align-items-end d-lg-none"
|
|
705
705
|
style="${parseInt(glitter.share.top_inset, 10) ? `padding-top:${glitter.share.top_inset}px !important;` : ``}"
|
|
706
706
|
>
|
|
707
707
|
<img src="https://d3jnmi1tfjgtti.cloudfront.net/file/252530754/1718986163099-logo.svg" />
|
package/lowcode/jspage/main.js
CHANGED
|
@@ -619,7 +619,7 @@ ${Storage.page_setting_item === `${da.index}` ? `background:${EditorConfig.edito
|
|
|
619
619
|
return Page_editor.left(gvc, viewModel, editorContainerID, gBundle);
|
|
620
620
|
}
|
|
621
621
|
})();
|
|
622
|
-
if (document.body.offsetWidth <
|
|
622
|
+
if (document.body.offsetWidth < 992) {
|
|
623
623
|
glitter.setDrawer(`<div class="bg-white vh-120 overflow-auto">${view}</div>`, () => { });
|
|
624
624
|
glitter.share.toggle_left_bar = () => {
|
|
625
625
|
glitter.setDrawer(`<div class="bg-white vh-120 overflow-auto">${view}</div>`, () => {
|
package/lowcode/jspage/main.ts
CHANGED
|
@@ -236,8 +236,6 @@ init(import.meta.url, (gvc, glitter, gBundle) => {
|
|
|
236
236
|
},
|
|
237
237
|
async () => {
|
|
238
238
|
return await new Promise(async (resolve) => {
|
|
239
|
-
|
|
240
|
-
|
|
241
239
|
viewModel.data = await new Promise((resolve, reject) => {
|
|
242
240
|
((window as any).glitterInitialHelper).getPageData({
|
|
243
241
|
tag: glitter.getUrlParameter('page'),
|
|
@@ -533,7 +531,6 @@ init(import.meta.url, (gvc, glitter, gBundle) => {
|
|
|
533
531
|
viewModel.selectContainer = undefined;
|
|
534
532
|
lod();
|
|
535
533
|
};
|
|
536
|
-
|
|
537
534
|
});
|
|
538
535
|
|
|
539
536
|
return {
|
|
@@ -669,7 +666,7 @@ ${Storage.page_setting_item === `${da.index}` ? `background:${EditorConfig.edito
|
|
|
669
666
|
return Page_editor.left(gvc, viewModel, editorContainerID, gBundle);
|
|
670
667
|
}
|
|
671
668
|
})();
|
|
672
|
-
if (document.body.offsetWidth <
|
|
669
|
+
if (document.body.offsetWidth < 992) {
|
|
673
670
|
glitter.setDrawer(`<div class="bg-white vh-120 overflow-auto">${view}</div>`, () => {});
|
|
674
671
|
glitter.share.toggle_left_bar=()=>{
|
|
675
672
|
glitter.setDrawer(`<div class="bg-white vh-120 overflow-auto">${view}</div>`, () => {
|