ts-glitter 13.8.3 → 13.8.33
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 +4 -1
- package/lowcode/Entry.ts +4 -1
- package/lowcode/cms-plugin/ai-message.js +43 -74
- package/lowcode/cms-plugin/ai-message.ts +49 -88
- package/lowcode/css/editor.css +25 -0
- package/lowcode/glitterBundle/Glitter.js +1 -0
- package/lowcode/glitterBundle/Glitter.ts +1 -0
- package/lowcode/jspage/editor.js +28 -16
- package/lowcode/jspage/editor.ts +46 -16
- 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/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/services/ai-robot.d.ts +3 -1
- package/src/api-public/services/ai-robot.js +68 -2
- package/src/api-public/services/ai-robot.js.map +1 -1
- package/src/api-public/services/ai-robot.ts +72 -3
- package/src/api-public/services/chat.js +9 -11
- package/src/api-public/services/chat.js.map +1 -1
- package/src/api-public/services/chat.ts +10 -11
- 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/lowcode/Entry.js
CHANGED
|
@@ -52,6 +52,9 @@ export class Entry {
|
|
|
52
52
|
.hide-elem {
|
|
53
53
|
display: none !important;
|
|
54
54
|
}
|
|
55
|
+
.hy-drawer-left {
|
|
56
|
+
left:-1000px !important;
|
|
57
|
+
}
|
|
55
58
|
`);
|
|
56
59
|
if (glitter.getUrlParameter('appName')) {
|
|
57
60
|
window.appName = glitter.getUrlParameter('appName');
|
|
@@ -59,7 +62,7 @@ export class Entry {
|
|
|
59
62
|
}
|
|
60
63
|
window.renderClock = (_a = window.renderClock) !== null && _a !== void 0 ? _a : clockF();
|
|
61
64
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
62
|
-
glitter.share.editerVersion = "V_13.8.
|
|
65
|
+
glitter.share.editerVersion = "V_13.8.33";
|
|
63
66
|
glitter.share.start = (new Date());
|
|
64
67
|
const vm = {
|
|
65
68
|
appConfig: [],
|
package/lowcode/Entry.ts
CHANGED
|
@@ -52,6 +52,9 @@ export class Entry {
|
|
|
52
52
|
.hide-elem {
|
|
53
53
|
display: none !important;
|
|
54
54
|
}
|
|
55
|
+
.hy-drawer-left {
|
|
56
|
+
left:-1000px !important;
|
|
57
|
+
}
|
|
55
58
|
`);
|
|
56
59
|
if (glitter.getUrlParameter('appName')) {
|
|
57
60
|
(window as any).appName = glitter.getUrlParameter('appName');
|
|
@@ -59,7 +62,7 @@ export class Entry {
|
|
|
59
62
|
}
|
|
60
63
|
(window as any).renderClock = (window as any).renderClock ?? clockF();
|
|
61
64
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
62
|
-
glitter.share.editerVersion = "V_13.8.
|
|
65
|
+
glitter.share.editerVersion = "V_13.8.33";
|
|
63
66
|
glitter.share.start = (new Date());
|
|
64
67
|
const vm: {
|
|
65
68
|
appConfig: any;
|
|
@@ -14,92 +14,63 @@ import { AiChat } from '../glitter-base/route/ai-chat.js';
|
|
|
14
14
|
import { ShareDialog } from '../glitterBundle/dialog/ShareDialog.js';
|
|
15
15
|
import { AiPointsApi } from "../glitter-base/route/ai-points-api.js";
|
|
16
16
|
export class AiMessage {
|
|
17
|
-
static
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
key: 'order_analysis',
|
|
36
|
-
label: '訂單分析',
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
key: 'design',
|
|
40
|
-
label: '圖片生成',
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
key: 'operation_guide',
|
|
44
|
-
label: '操作引導',
|
|
45
|
-
}
|
|
46
|
-
];
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
AiMessage.ai_support = option;
|
|
17
|
+
static setDrawer(gvc, option) {
|
|
18
|
+
if (!option) {
|
|
19
|
+
AiMessage.ai_support = [
|
|
20
|
+
{
|
|
21
|
+
key: 'writer',
|
|
22
|
+
label: '文案寫手',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
key: 'order_analysis',
|
|
26
|
+
label: '訂單分析',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
key: 'design',
|
|
30
|
+
label: '圖片生成',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
key: 'operation_guide',
|
|
34
|
+
label: '操作引導',
|
|
50
35
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
return {
|
|
58
|
-
bind: vm.id,
|
|
59
|
-
view: () => {
|
|
60
|
-
if (!vm.visible) {
|
|
61
|
-
return ``;
|
|
62
|
-
}
|
|
63
|
-
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
64
|
-
resolve(html `
|
|
65
|
-
<div
|
|
36
|
+
];
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
AiMessage.ai_support = option;
|
|
40
|
+
}
|
|
41
|
+
gvc.glitter.setDrawer(`<div
|
|
66
42
|
class="position-fixed start-0 top-0 vw-100 vh-100"
|
|
67
43
|
style="background: rgba(0,0,0,0.5);z-index:999;"
|
|
68
44
|
onclick="${gvc.event(() => {
|
|
69
|
-
|
|
70
|
-
|
|
45
|
+
gvc.glitter.closeDrawer();
|
|
46
|
+
})}"
|
|
71
47
|
>
|
|
72
48
|
<div
|
|
73
49
|
class="position-fixed vh-100 top-0 scroll-in bg-white ai-left"
|
|
74
50
|
style="top:0px;width: 500px;height: 100vh;max-width: 100vw;"
|
|
75
51
|
onclick="${gvc.event((e, event) => {
|
|
76
|
-
|
|
77
|
-
|
|
52
|
+
event.stopPropagation();
|
|
53
|
+
})}"
|
|
78
54
|
>
|
|
79
55
|
${AiMessage.detail({
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
56
|
+
gvc: gvc,
|
|
57
|
+
user_id: 'manager',
|
|
58
|
+
containerHeight: $('body').height() + 10 + 'px',
|
|
59
|
+
document: document,
|
|
60
|
+
goBack: () => {
|
|
61
|
+
},
|
|
62
|
+
close: () => {
|
|
63
|
+
gvc.glitter.closeDrawer();
|
|
64
|
+
},
|
|
65
|
+
})}
|
|
90
66
|
</div>
|
|
91
|
-
</div
|
|
92
|
-
|
|
93
|
-
},
|
|
94
|
-
divCreate: {
|
|
95
|
-
elem: 'div',
|
|
96
|
-
style: `z-index:99999;bottom:0px;left:0px;`,
|
|
97
|
-
},
|
|
98
|
-
onCreate: () => __awaiter(this, void 0, void 0, function* () {
|
|
99
|
-
}),
|
|
100
|
-
};
|
|
67
|
+
</div>`, () => {
|
|
68
|
+
gvc.glitter.openDrawer((document.body.clientWidth > 768) ? 500 : document.body.clientWidth);
|
|
101
69
|
});
|
|
102
70
|
}
|
|
71
|
+
static toggle() {
|
|
72
|
+
window.glitter.share.toggle_left_bar();
|
|
73
|
+
}
|
|
103
74
|
static detail(cf) {
|
|
104
75
|
const gvc = cf.gvc;
|
|
105
76
|
const document = cf.document;
|
|
@@ -827,7 +798,5 @@ AiMessage.vm = {
|
|
|
827
798
|
select_bt: 'writer',
|
|
828
799
|
};
|
|
829
800
|
AiMessage.id = `dsmdklweew3`;
|
|
830
|
-
AiMessage.toggle = (visible) => {
|
|
831
|
-
};
|
|
832
801
|
AiMessage.ai_support = [];
|
|
833
802
|
window.glitter.setModule(import.meta.url, AiMessage);
|
|
@@ -26,107 +26,68 @@ export class AiMessage {
|
|
|
26
26
|
select_bt: 'writer',
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
public static id = `dsmdklweew3`;
|
|
30
|
-
|
|
31
|
-
public static toggle: (visible: boolean, option?: { key: string, label: string }[]) => void = (visible) => {
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
public static ai_support: { key: string, label: string }[] = []
|
|
35
29
|
|
|
36
|
-
public static
|
|
37
|
-
gvc: GVC;
|
|
38
|
-
userID: string;
|
|
39
|
-
toUser?: string;
|
|
40
|
-
viewType?: string;
|
|
41
|
-
open?: boolean;
|
|
42
|
-
type?: 'preview' | 'def'
|
|
43
|
-
}) {
|
|
44
|
-
const gvc = cf.gvc;
|
|
45
|
-
const html = String.raw;
|
|
46
|
-
cf.userID = `${cf.userID}`;
|
|
47
|
-
const chatID = [cf.userID, cf.toUser || 'manager'].sort().join('-');
|
|
48
|
-
const vm = {
|
|
49
|
-
visible: false,
|
|
50
|
-
id: gvc.glitter.getUUID(),
|
|
51
|
-
};
|
|
30
|
+
public static id = `dsmdklweew3`;
|
|
52
31
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
label: '操作引導',
|
|
72
|
-
}
|
|
73
|
-
]
|
|
74
|
-
} else {
|
|
75
|
-
AiMessage.ai_support = option!
|
|
32
|
+
public static setDrawer(gvc: GVC, option?: { key: string, label: string }[]) {
|
|
33
|
+
if (!option) {
|
|
34
|
+
AiMessage.ai_support = [
|
|
35
|
+
{
|
|
36
|
+
key: 'writer',
|
|
37
|
+
label: '文案寫手',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
key: 'order_analysis',
|
|
41
|
+
label: '訂單分析',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
key: 'design',
|
|
45
|
+
label: '圖片生成',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
key: 'operation_guide',
|
|
49
|
+
label: '操作引導',
|
|
76
50
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
};
|
|
83
|
-
return {
|
|
84
|
-
bind: vm.id,
|
|
85
|
-
view: () => {
|
|
86
|
-
if (!vm.visible) {
|
|
87
|
-
return ``;
|
|
88
|
-
}
|
|
89
|
-
return new Promise(async (resolve, reject) => {
|
|
90
|
-
resolve(
|
|
91
|
-
html`
|
|
92
|
-
<div
|
|
51
|
+
]
|
|
52
|
+
} else {
|
|
53
|
+
AiMessage.ai_support = option!
|
|
54
|
+
}
|
|
55
|
+
gvc.glitter.setDrawer(`<div
|
|
93
56
|
class="position-fixed start-0 top-0 vw-100 vh-100"
|
|
94
57
|
style="background: rgba(0,0,0,0.5);z-index:999;"
|
|
95
58
|
onclick="${gvc.event(() => {
|
|
96
|
-
|
|
97
|
-
|
|
59
|
+
gvc.glitter.closeDrawer()
|
|
60
|
+
})}"
|
|
98
61
|
>
|
|
99
62
|
<div
|
|
100
63
|
class="position-fixed vh-100 top-0 scroll-in bg-white ai-left"
|
|
101
64
|
style="top:0px;width: 500px;height: 100vh;max-width: 100vw;"
|
|
102
65
|
onclick="${gvc.event((e, event) => {
|
|
103
|
-
|
|
104
|
-
|
|
66
|
+
event.stopPropagation();
|
|
67
|
+
})}"
|
|
105
68
|
>
|
|
106
69
|
${AiMessage.detail({
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
70
|
+
gvc: gvc,
|
|
71
|
+
user_id: 'manager',
|
|
72
|
+
containerHeight: ($('body').height() as any) + 10 + 'px',
|
|
73
|
+
document: document,
|
|
74
|
+
goBack: () => {
|
|
75
|
+
},
|
|
76
|
+
close: () => {
|
|
77
|
+
gvc.glitter.closeDrawer()
|
|
78
|
+
},
|
|
79
|
+
})}
|
|
117
80
|
</div>
|
|
118
|
-
</div
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
};
|
|
129
|
-
});
|
|
81
|
+
</div>`, () => {
|
|
82
|
+
gvc.glitter.openDrawer((document.body.clientWidth > 768) ? 500 : document.body.clientWidth)
|
|
83
|
+
})
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
public static ai_support: { key: string, label: string }[] = []
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
public static toggle() {
|
|
90
|
+
(window as any).glitter.share.toggle_left_bar()
|
|
130
91
|
}
|
|
131
92
|
|
|
132
93
|
public static detail(cf: {
|
|
@@ -369,7 +330,7 @@ export class AiMessage {
|
|
|
369
330
|
dd.user_data = AiMessage.config;
|
|
370
331
|
}
|
|
371
332
|
const replacedString = markdownToHTML(dd.message.text);
|
|
372
|
-
const width = (document.body.clientWidth < 768)? document.body.clientWidth - 120:348
|
|
333
|
+
const width = (document.body.clientWidth < 768) ? document.body.clientWidth - 120 : 348
|
|
373
334
|
if (cf.user_id !== dd.user_id) {
|
|
374
335
|
return html`
|
|
375
336
|
<div class="mt-auto d-flex align-items-start ${vm.data[index + 1] && vm.data[index + 1].user_id === dd.user_id ? `mb-1` : `mb-3`}">
|
package/lowcode/css/editor.css
CHANGED
|
@@ -448,7 +448,32 @@ h6 {
|
|
|
448
448
|
-webkit-background-clip: unset;
|
|
449
449
|
-webkit-text-fill-color: unset;
|
|
450
450
|
}
|
|
451
|
+
.bt_orange_lin_mb {
|
|
452
|
+
cursor: pointer;
|
|
453
|
+
height: 36px;
|
|
454
|
+
padding: 8px 12px;
|
|
455
|
+
border-radius: 8px;
|
|
456
|
+
border: 1px var(--main-orange) solid;
|
|
457
|
+
justify-content: center;
|
|
458
|
+
align-items: center;
|
|
459
|
+
display: inline-flex;
|
|
460
|
+
background: linear-gradient(135deg, var(--main-orange) 0%, #ff6c02 100%);
|
|
461
|
+
background-clip: text;
|
|
462
|
+
-webkit-background-clip: text;
|
|
463
|
+
-webkit-text-fill-color: transparent;
|
|
464
|
+
font-size: 16px;
|
|
465
|
+
font-weight: 700;
|
|
466
|
+
letter-spacing: 0.64px;
|
|
467
|
+
word-wrap: break-word;
|
|
468
|
+
}
|
|
451
469
|
|
|
470
|
+
.bt_orange_lin_mb:hover {
|
|
471
|
+
background: linear-gradient(135deg, var(--main-orange) 0%, #ff6c02 100%);
|
|
472
|
+
color: white;
|
|
473
|
+
background-clip: unset;
|
|
474
|
+
-webkit-background-clip: unset;
|
|
475
|
+
-webkit-text-fill-color: unset;
|
|
476
|
+
}
|
|
452
477
|
.bt_c39 {
|
|
453
478
|
border-radius: 10px;
|
|
454
479
|
background: var(--main-black);
|
|
@@ -321,6 +321,7 @@ ${(!error.message) ? `` : `錯誤訊息:${error.message}`}${(!error.lineNumber)
|
|
|
321
321
|
};
|
|
322
322
|
|
|
323
323
|
public openDrawer(width?:number) {
|
|
324
|
+
width=width || 300
|
|
324
325
|
if ((window as any).drawer !== undefined) {
|
|
325
326
|
$("#Navigation").show();
|
|
326
327
|
(window as any).drawer.open();
|
package/lowcode/jspage/editor.js
CHANGED
|
@@ -281,7 +281,7 @@ color: transparent;"
|
|
|
281
281
|
style="width:56px;height: 56px;cursor: pointer;"
|
|
282
282
|
onclick="${gvc.event(() => {
|
|
283
283
|
if ((EditorConfig.backend_page() === 'backend-manger')) {
|
|
284
|
-
glitter.
|
|
284
|
+
glitter.share.toggle_left_bar();
|
|
285
285
|
}
|
|
286
286
|
else {
|
|
287
287
|
goBack();
|
|
@@ -329,7 +329,7 @@ color: transparent;"
|
|
|
329
329
|
gvc.glitter.share.editorViewModel.selectItem = undefined;
|
|
330
330
|
Storage.page_setting_item = dd.index;
|
|
331
331
|
if (document.body.clientWidth < 800) {
|
|
332
|
-
glitter.
|
|
332
|
+
glitter.share.toggle_left_bar();
|
|
333
333
|
}
|
|
334
334
|
Storage.lastSelect = '';
|
|
335
335
|
gvc.notifyDataChange(["MainEditorLeft", "top_sm_bar"]);
|
|
@@ -339,9 +339,27 @@ ${dd.title}</a></li>`;
|
|
|
339
339
|
}).join('')}
|
|
340
340
|
</ul>
|
|
341
341
|
</li>
|
|
342
|
+
<div class="border-end d-flex align-items-center justify-content-center flex-column fs-3 pt-2"
|
|
343
|
+
style="width:56px;height: 56px;cursor: pointer;"
|
|
344
|
+
onclick="${gvc.event(() => {
|
|
345
|
+
AiMessage.setDrawer(gvc, [
|
|
346
|
+
{
|
|
347
|
+
key: 'writer',
|
|
348
|
+
label: '文案寫手',
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
key: 'design',
|
|
352
|
+
label: '圖片生成',
|
|
353
|
+
}
|
|
354
|
+
]);
|
|
355
|
+
})}">
|
|
356
|
+
<img src="https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/size1440_s*px$_sas0s9s0s1sesas0_1697354801736-Glitterlogo.png"
|
|
357
|
+
class="" style="width:24px;height: 24px;">
|
|
358
|
+
<span class="fw-500" style="font-size: 10px;">AI 助手</span>
|
|
359
|
+
</div>
|
|
342
360
|
`}
|
|
343
361
|
<div class="border-end d-none d-sm-block"
|
|
344
|
-
style="width
|
|
362
|
+
style="width:38px;height: 56px; "></div>
|
|
345
363
|
|
|
346
364
|
${(() => {
|
|
347
365
|
if (Storage.select_function === 'backend-manger') {
|
|
@@ -383,10 +401,10 @@ ${dd.title}</a></li>`;
|
|
|
383
401
|
return [
|
|
384
402
|
html `
|
|
385
403
|
<div
|
|
386
|
-
class="ms-auto me-2
|
|
404
|
+
class="ms-auto me-2 bt_orange_lin_mb d-md-flex"
|
|
387
405
|
style=""
|
|
388
406
|
onclick="${gvc.event(() => {
|
|
389
|
-
AiMessage.
|
|
407
|
+
AiMessage.setDrawer(gvc, [
|
|
390
408
|
{
|
|
391
409
|
key: 'writer',
|
|
392
410
|
label: '文案寫手',
|
|
@@ -399,7 +417,7 @@ ${dd.title}</a></li>`;
|
|
|
399
417
|
})}"
|
|
400
418
|
>
|
|
401
419
|
<img src="https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/size1440_s*px$_sas0s9s0s1sesas0_1697354801736-Glitterlogo.png"
|
|
402
|
-
class="me-2" style="width
|
|
420
|
+
class="me-2" style="width:25px;height:25px;">AI助手
|
|
403
421
|
</div>`,
|
|
404
422
|
html `
|
|
405
423
|
<div class="hoverBtn d-flex align-items-center justify-content-center border ${Storage.select_function === 'user-editor' ? `d-none` : ``}"
|
|
@@ -767,21 +785,15 @@ color:white;
|
|
|
767
785
|
儲存
|
|
768
786
|
</button>`}
|
|
769
787
|
</div>
|
|
770
|
-
<div>${AiMessage.aiRobot({
|
|
771
|
-
gvc: gvc,
|
|
772
|
-
userID: 'manager',
|
|
773
|
-
toUser: 'robot'
|
|
774
|
-
})}
|
|
775
|
-
</div>
|
|
776
788
|
${(() => {
|
|
777
789
|
if (Storage.select_function === 'backend-manger') {
|
|
778
790
|
const size = document.body.clientWidth > 768 ? 24 : 18;
|
|
779
791
|
return (html `
|
|
780
792
|
<div
|
|
781
|
-
class="ms-auto me-2
|
|
793
|
+
class="ms-auto me-2 bt_orange_lin_mb"
|
|
782
794
|
style=""
|
|
783
795
|
onclick="${gvc.event(() => {
|
|
784
|
-
AiMessage.
|
|
796
|
+
AiMessage.setDrawer(gvc);
|
|
785
797
|
})}"
|
|
786
798
|
>
|
|
787
799
|
<img src="https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/size1440_s*px$_sas0s9s0s1sesas0_1697354801736-Glitterlogo.png"
|
|
@@ -789,7 +801,7 @@ color:white;
|
|
|
789
801
|
</div>
|
|
790
802
|
<div class="position-relative">
|
|
791
803
|
<div
|
|
792
|
-
class="me-2
|
|
804
|
+
class="me-2 bt_orange_lin_mb position-relative"
|
|
793
805
|
style="width:42px;"
|
|
794
806
|
onclick="${gvc.event(() => {
|
|
795
807
|
BgCustomerMessage.toggle(true, gvc);
|
|
@@ -918,7 +930,7 @@ color:white;
|
|
|
918
930
|
let view = [
|
|
919
931
|
html `
|
|
920
932
|
<div
|
|
921
|
-
class="me-2
|
|
933
|
+
class="me-2 bt_orange_lin_mb position-relative"
|
|
922
934
|
style="width: 42px;"
|
|
923
935
|
onclick="${gvc.event(() => {
|
|
924
936
|
toggle = !toggle;
|
package/lowcode/jspage/editor.ts
CHANGED
|
@@ -282,7 +282,7 @@ color: transparent;"
|
|
|
282
282
|
style="width:56px;height: 56px;cursor: pointer;"
|
|
283
283
|
onclick="${gvc.event(() => {
|
|
284
284
|
if ((EditorConfig.backend_page() === 'backend-manger')) {
|
|
285
|
-
glitter.
|
|
285
|
+
glitter.share.toggle_left_bar()
|
|
286
286
|
} else {
|
|
287
287
|
goBack()
|
|
288
288
|
}
|
|
@@ -328,7 +328,7 @@ color: transparent;"
|
|
|
328
328
|
gvc.glitter.share.editorViewModel.selectItem = undefined;
|
|
329
329
|
Storage.page_setting_item = dd.index as any;
|
|
330
330
|
if (document.body.clientWidth < 800) {
|
|
331
|
-
glitter.
|
|
331
|
+
glitter.share.toggle_left_bar()
|
|
332
332
|
}
|
|
333
333
|
Storage.lastSelect = '';
|
|
334
334
|
gvc.notifyDataChange(["MainEditorLeft", "top_sm_bar"]);
|
|
@@ -338,9 +338,27 @@ ${dd.title}</a></li>`
|
|
|
338
338
|
}).join('')}
|
|
339
339
|
</ul>
|
|
340
340
|
</li>
|
|
341
|
+
<div class="border-end d-flex align-items-center justify-content-center flex-column fs-3 pt-2"
|
|
342
|
+
style="width:56px;height: 56px;cursor: pointer;"
|
|
343
|
+
onclick="${gvc.event(() => {
|
|
344
|
+
AiMessage.setDrawer(gvc, [
|
|
345
|
+
{
|
|
346
|
+
key: 'writer',
|
|
347
|
+
label: '文案寫手',
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
key: 'design',
|
|
351
|
+
label: '圖片生成',
|
|
352
|
+
}
|
|
353
|
+
]);
|
|
354
|
+
})}">
|
|
355
|
+
<img src="https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/size1440_s*px$_sas0s9s0s1sesas0_1697354801736-Glitterlogo.png"
|
|
356
|
+
class="" style="width:24px;height: 24px;">
|
|
357
|
+
<span class="fw-500" style="font-size: 10px;">AI 助手</span>
|
|
358
|
+
</div>
|
|
341
359
|
`}
|
|
342
360
|
<div class="border-end d-none d-sm-block"
|
|
343
|
-
style="width
|
|
361
|
+
style="width:38px;height: 56px; "></div>
|
|
344
362
|
|
|
345
363
|
${(() => {
|
|
346
364
|
if (Storage.select_function === 'backend-manger') {
|
|
@@ -379,12 +397,30 @@ ${dd.title}</a></li>`
|
|
|
379
397
|
view: () => {
|
|
380
398
|
const size = document.body.clientWidth > 768 ? 24 : 18;
|
|
381
399
|
return [
|
|
400
|
+
// ` <div class="border-start d-flex align-items-center justify-content-center flex-column fs-3 pt-2"
|
|
401
|
+
// style="width:56px;height: 56px;cursor: pointer;"
|
|
402
|
+
// onclick="${gvc.event(() => {
|
|
403
|
+
// AiMessage.setDrawer(gvc, [
|
|
404
|
+
// {
|
|
405
|
+
// key: 'writer',
|
|
406
|
+
// label: '文案寫手',
|
|
407
|
+
// },
|
|
408
|
+
// {
|
|
409
|
+
// key: 'design',
|
|
410
|
+
// label: '圖片生成',
|
|
411
|
+
// }
|
|
412
|
+
// ]);
|
|
413
|
+
// })}">
|
|
414
|
+
// <img src="https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/size1440_s*px$_sas0s9s0s1sesas0_1697354801736-Glitterlogo.png"
|
|
415
|
+
// class="me-2" style="width:${size}px;height: ${size}px;">
|
|
416
|
+
// <span class="fw-500" style="font-size: 10px;">AI</span>
|
|
417
|
+
// </div>`,
|
|
382
418
|
html`
|
|
383
419
|
<div
|
|
384
|
-
class="ms-auto me-2
|
|
420
|
+
class="ms-auto me-2 bt_orange_lin_mb d-md-flex"
|
|
385
421
|
style=""
|
|
386
422
|
onclick="${gvc.event(() => {
|
|
387
|
-
AiMessage.
|
|
423
|
+
AiMessage.setDrawer(gvc, [
|
|
388
424
|
{
|
|
389
425
|
key: 'writer',
|
|
390
426
|
label: '文案寫手',
|
|
@@ -397,7 +433,7 @@ ${dd.title}</a></li>`
|
|
|
397
433
|
})}"
|
|
398
434
|
>
|
|
399
435
|
<img src="https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/size1440_s*px$_sas0s9s0s1sesas0_1697354801736-Glitterlogo.png"
|
|
400
|
-
class="me-2" style="width
|
|
436
|
+
class="me-2" style="width:25px;height:25px;">AI助手
|
|
401
437
|
</div>`,
|
|
402
438
|
// html`
|
|
403
439
|
// <div class="indexGuideBTN d-none d-sm-block"
|
|
@@ -815,22 +851,16 @@ color:white;
|
|
|
815
851
|
儲存
|
|
816
852
|
</button>`}
|
|
817
853
|
</div>
|
|
818
|
-
<div>${AiMessage.aiRobot({
|
|
819
|
-
gvc: gvc,
|
|
820
|
-
userID: 'manager',
|
|
821
|
-
toUser: 'robot'
|
|
822
|
-
})}
|
|
823
|
-
</div>
|
|
824
854
|
${(() => {
|
|
825
855
|
if (Storage.select_function === 'backend-manger') {
|
|
826
856
|
const size = document.body.clientWidth > 768 ? 24 : 18;
|
|
827
857
|
return (
|
|
828
858
|
html`
|
|
829
859
|
<div
|
|
830
|
-
class="ms-auto me-2
|
|
860
|
+
class="ms-auto me-2 bt_orange_lin_mb"
|
|
831
861
|
style=""
|
|
832
862
|
onclick="${gvc.event(() => {
|
|
833
|
-
AiMessage.
|
|
863
|
+
AiMessage.setDrawer(gvc);
|
|
834
864
|
})}"
|
|
835
865
|
>
|
|
836
866
|
<img src="https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/size1440_s*px$_sas0s9s0s1sesas0_1697354801736-Glitterlogo.png"
|
|
@@ -838,7 +868,7 @@ color:white;
|
|
|
838
868
|
</div>
|
|
839
869
|
<div class="position-relative">
|
|
840
870
|
<div
|
|
841
|
-
class="me-2
|
|
871
|
+
class="me-2 bt_orange_lin_mb position-relative"
|
|
842
872
|
style="width:42px;"
|
|
843
873
|
onclick="${gvc.event(() => {
|
|
844
874
|
BgCustomerMessage.toggle(true, gvc);
|
|
@@ -969,7 +999,7 @@ color:white;
|
|
|
969
999
|
let view = [
|
|
970
1000
|
html`
|
|
971
1001
|
<div
|
|
972
|
-
class="me-2
|
|
1002
|
+
class="me-2 bt_orange_lin_mb position-relative"
|
|
973
1003
|
style="width: 42px;"
|
|
974
1004
|
onclick="${gvc.event(() => {
|
|
975
1005
|
toggle = !toggle;
|