ts-glitter 13.8.669 → 13.8.671
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
CHANGED
|
@@ -64,7 +64,7 @@ export class Entry {
|
|
|
64
64
|
}
|
|
65
65
|
window.renderClock = (_a = window.renderClock) !== null && _a !== void 0 ? _a : clockF();
|
|
66
66
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
67
|
-
glitter.share.editerVersion = 'V_13.8.
|
|
67
|
+
glitter.share.editerVersion = 'V_13.8.671';
|
|
68
68
|
glitter.share.start = new Date();
|
|
69
69
|
const vm = {
|
|
70
70
|
appConfig: [],
|
|
@@ -171,6 +171,50 @@ export class Entry {
|
|
|
171
171
|
Entry.checkIframe(glitter);
|
|
172
172
|
});
|
|
173
173
|
}
|
|
174
|
+
else if (glitter.getUrlParameter('page') === 'backend_manager') {
|
|
175
|
+
if (!GlobalUser.token) {
|
|
176
|
+
glitter.setUrlParameter('page', 'login');
|
|
177
|
+
location.reload();
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
try {
|
|
181
|
+
const appList = (yield ApiPageConfig.getAppList(undefined, GlobalUser.token)).response.result;
|
|
182
|
+
localStorage.setItem('select_item', '0');
|
|
183
|
+
if (appList.length === 0) {
|
|
184
|
+
glitter.getModule(new URL('./view-model/saas-view-model.js', location.href).href, (SaasViewModel) => {
|
|
185
|
+
glitter.innerDialog((gvc) => {
|
|
186
|
+
return gvc.bindView(() => {
|
|
187
|
+
const id = gvc.glitter.getUUID();
|
|
188
|
+
return {
|
|
189
|
+
bind: id,
|
|
190
|
+
view: () => {
|
|
191
|
+
return SaasViewModel.createShop(gvc, true);
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
});
|
|
195
|
+
}, 'change_app');
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
let appName = appList[0].appName;
|
|
200
|
+
if (appList.find((dd) => {
|
|
201
|
+
return dd.appName === localStorage.getItem('select_app_name');
|
|
202
|
+
})) {
|
|
203
|
+
appName = localStorage.getItem('select_app_name');
|
|
204
|
+
}
|
|
205
|
+
glitter.setUrlParameter('page', 'index');
|
|
206
|
+
glitter.setUrlParameter('type', 'editor');
|
|
207
|
+
glitter.setUrlParameter('appName', appName);
|
|
208
|
+
glitter.setUrlParameter('function', 'backend-manger');
|
|
209
|
+
location.reload();
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
catch (e) {
|
|
213
|
+
glitter.setUrlParameter('page', 'login');
|
|
214
|
+
location.reload();
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
174
218
|
else {
|
|
175
219
|
Entry.toNormalRender(glitter, vm, () => {
|
|
176
220
|
Entry.checkIframe(glitter);
|
package/lowcode/Entry.ts
CHANGED
|
@@ -6,6 +6,8 @@ import {BaseApi} from './glitterBundle/api/base.js';
|
|
|
6
6
|
import {GlobalUser} from './glitter-base/global/global-user.js';
|
|
7
7
|
import {EditorConfig} from './editor-config.js';
|
|
8
8
|
import {ShareDialog} from './glitterBundle/dialog/ShareDialog.js';
|
|
9
|
+
import {TriggerEvent} from "./glitterBundle/plugins/trigger-event.js";
|
|
10
|
+
import {ApiUser} from "./glitter-base/route/user.js";
|
|
9
11
|
|
|
10
12
|
export class Entry {
|
|
11
13
|
public static onCreate(glitter: Glitter) {
|
|
@@ -64,7 +66,7 @@ export class Entry {
|
|
|
64
66
|
}
|
|
65
67
|
(window as any).renderClock = (window as any).renderClock ?? clockF();
|
|
66
68
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
67
|
-
glitter.share.editerVersion = 'V_13.8.
|
|
69
|
+
glitter.share.editerVersion = 'V_13.8.671';
|
|
68
70
|
glitter.share.start = new Date();
|
|
69
71
|
const vm: {
|
|
70
72
|
appConfig: any;
|
|
@@ -180,7 +182,51 @@ export class Entry {
|
|
|
180
182
|
Entry.toHtmlEditor(glitter, vm, () => {
|
|
181
183
|
Entry.checkIframe(glitter);
|
|
182
184
|
});
|
|
183
|
-
} else {
|
|
185
|
+
} else if(glitter.getUrlParameter('page')==='backend_manager'){
|
|
186
|
+
if (!GlobalUser.token) {
|
|
187
|
+
glitter.setUrlParameter('page', 'login');
|
|
188
|
+
location.reload()
|
|
189
|
+
}else{
|
|
190
|
+
try {
|
|
191
|
+
const appList = (await ApiPageConfig.getAppList(
|
|
192
|
+
undefined,
|
|
193
|
+
GlobalUser.token
|
|
194
|
+
)).response.result;
|
|
195
|
+
localStorage.setItem('select_item', '0')
|
|
196
|
+
if(appList.length===0){
|
|
197
|
+
glitter.getModule(new URL('./view-model/saas-view-model.js', location.href).href, (SaasViewModel) => {
|
|
198
|
+
glitter.innerDialog((gvc) => {
|
|
199
|
+
return gvc.bindView(() => {
|
|
200
|
+
const id = gvc.glitter.getUUID();
|
|
201
|
+
return {
|
|
202
|
+
bind: id,
|
|
203
|
+
view: () => {
|
|
204
|
+
return SaasViewModel.createShop(gvc, true)
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
})
|
|
208
|
+
|
|
209
|
+
}, 'change_app')
|
|
210
|
+
})
|
|
211
|
+
}else{
|
|
212
|
+
let appName = appList[0].appName;
|
|
213
|
+
if (appList.find((dd:any) => {
|
|
214
|
+
return dd.appName === localStorage.getItem('select_app_name')
|
|
215
|
+
})) {
|
|
216
|
+
appName = localStorage.getItem('select_app_name')
|
|
217
|
+
}
|
|
218
|
+
glitter.setUrlParameter('page', 'index')
|
|
219
|
+
glitter.setUrlParameter('type', 'editor')
|
|
220
|
+
glitter.setUrlParameter('appName', appName)
|
|
221
|
+
glitter.setUrlParameter('function', 'backend-manger')
|
|
222
|
+
location.reload()
|
|
223
|
+
}
|
|
224
|
+
}catch (e) {
|
|
225
|
+
glitter.setUrlParameter('page', 'login');
|
|
226
|
+
location.reload()
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}else {
|
|
184
230
|
// 一般頁面
|
|
185
231
|
Entry.toNormalRender(glitter, vm, () => {
|
|
186
232
|
Entry.checkIframe(glitter);
|
|
@@ -314,18 +314,18 @@ height: 51px;
|
|
|
314
314
|
return html `
|
|
315
315
|
<div
|
|
316
316
|
class="d-flex nav-top"
|
|
317
|
-
style="z-index:20;
|
|
317
|
+
style="z-index:20;padding-top:${glitter.share.top_inset}px;width: 100%;background: #FFF;box-shadow: 0 1px 10px 0 rgba(0, 0, 0, 0.10);position: fixed;left: 0;top: 0;"
|
|
318
|
+
>
|
|
319
|
+
<div
|
|
320
|
+
class="POS-logo d-flex align-items-center ${document.body.offsetWidth < 800 ? `justify-content-center` : ``} mx-2 w-100"
|
|
321
|
+
style="${document.body.offsetWidth < 800 ? `gap: 0px;` : `gap: 32px;padding-left: 24px;`}height: ${(() => {
|
|
318
322
|
if (document.body.offsetWidth > 800) {
|
|
319
323
|
return `86px`;
|
|
320
324
|
}
|
|
321
325
|
else {
|
|
322
326
|
return `66px`;
|
|
323
327
|
}
|
|
324
|
-
})()};
|
|
325
|
-
>
|
|
326
|
-
<div
|
|
327
|
-
class="POS-logo h-100 d-flex align-items-center ${document.body.offsetWidth < 800 ? `justify-content-center` : ``} mx-2 w-100"
|
|
328
|
-
style="${document.body.offsetWidth < 800 ? `gap: 0px;` : `gap: 32px;padding-left: 24px;`}"
|
|
328
|
+
})()};"
|
|
329
329
|
>
|
|
330
330
|
${document.body.offsetWidth < 800 && vm.type === 'menu'
|
|
331
331
|
? ` `
|
|
@@ -355,17 +355,17 @@ height: 51px;
|
|
|
355
355
|
return html`
|
|
356
356
|
<div
|
|
357
357
|
class="d-flex nav-top"
|
|
358
|
-
style="z-index:20;
|
|
359
|
-
if (document.body.offsetWidth > 800) {
|
|
360
|
-
return `86px`
|
|
361
|
-
} else {
|
|
362
|
-
return `66px`
|
|
363
|
-
}
|
|
364
|
-
})()};padding-top:${glitter.share.top_inset}px;width: 100%;background: #FFF;box-shadow: 0 1px 10px 0 rgba(0, 0, 0, 0.10);position: fixed;left: 0;top: 0;"
|
|
358
|
+
style="z-index:20;padding-top:${glitter.share.top_inset}px;width: 100%;background: #FFF;box-shadow: 0 1px 10px 0 rgba(0, 0, 0, 0.10);position: fixed;left: 0;top: 0;"
|
|
365
359
|
>
|
|
366
360
|
<div
|
|
367
|
-
class="POS-logo
|
|
368
|
-
style="${document.body.offsetWidth < 800 ? `gap: 0px;` : `gap: 32px;padding-left: 24px;`}
|
|
361
|
+
class="POS-logo d-flex align-items-center ${document.body.offsetWidth < 800 ? `justify-content-center` : ``} mx-2 w-100"
|
|
362
|
+
style="${document.body.offsetWidth < 800 ? `gap: 0px;` : `gap: 32px;padding-left: 24px;`}height: ${(() => {
|
|
363
|
+
if (document.body.offsetWidth > 800) {
|
|
364
|
+
return `86px`
|
|
365
|
+
} else {
|
|
366
|
+
return `66px`
|
|
367
|
+
}
|
|
368
|
+
})()};"
|
|
369
369
|
>
|
|
370
370
|
${document.body.offsetWidth < 800 && vm.type === 'menu'
|
|
371
371
|
? ` `
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-glitter",
|
|
3
|
-
"version": "13.8.
|
|
3
|
+
"version": "13.8.671",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"axios": "^1.6.2",
|
|
33
33
|
"bcrypt": "^5.1.0",
|
|
34
34
|
"body-parser": "^1.20.2",
|
|
35
|
+
"ts-glitter": "13.8.671",
|
|
35
36
|
"compression": "^1.7.4",
|
|
36
37
|
"cookie-parser": "^1.4.6",
|
|
37
38
|
"cors": "^2.8.5",
|