ts-glitter 21.1.3 → 21.1.4

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
@@ -146,7 +146,7 @@ export class Entry {
146
146
  }
147
147
  window.renderClock = (_b = window.renderClock) !== null && _b !== void 0 ? _b : createClock();
148
148
  console.log(`Entry-time:`, window.renderClock.stop());
149
- glitter.share.editerVersion = 'V_21.1.3';
149
+ glitter.share.editerVersion = 'V_21.1.4';
150
150
  glitter.share.start = new Date();
151
151
  const vm = { appConfig: [] };
152
152
  window.saasConfig = {
package/lowcode/Entry.ts CHANGED
@@ -149,7 +149,7 @@ export class Entry {
149
149
  }
150
150
  (window as any).renderClock = (window as any).renderClock ?? createClock();
151
151
  console.log(`Entry-time:`, (window as any).renderClock.stop());
152
- glitter.share.editerVersion = 'V_21.1.3';
152
+ glitter.share.editerVersion = 'V_21.1.4';
153
153
  glitter.share.start = new Date();
154
154
  const vm = { appConfig: [] };
155
155
  (window as any).saasConfig = {
@@ -176,8 +176,33 @@ export class CustomerMessageUser {
176
176
  style="background-color: ${config
177
177
  .color};width: 58px;height: 58px ;cursor: pointer;display: flex;align-items: center;justify-content: center;position: fixed;left: 20px;bottom:20px;z-index: 100;"
178
178
  onclick="${gvc.event(() => {
179
- open = !open;
180
- gvc.notifyDataChange(viewId);
179
+ if (document.body.clientWidth < 800) {
180
+ if (!GlobalUser.token) {
181
+ gvc.glitter.href = '/login';
182
+ }
183
+ const userID = (() => {
184
+ if (GlobalUser.token) {
185
+ return GlobalUser.parseJWT(GlobalUser.token).payload.userID;
186
+ }
187
+ else {
188
+ return gvc.glitter.macAddress;
189
+ }
190
+ })();
191
+ gvc.glitter.getModule(new URL('./cms-plugin/customer-message-user.js', gvc.glitter.root_path).href, cl => {
192
+ cl.mobileChat({
193
+ gvc: gvc,
194
+ chat: {
195
+ chat_id: [`${userID}`, 'manager'].sort().join('-'),
196
+ type: 'user',
197
+ },
198
+ user_id: `${userID}`,
199
+ });
200
+ });
201
+ }
202
+ else {
203
+ open = !open;
204
+ gvc.notifyDataChange(viewId);
205
+ }
181
206
  })}"
182
207
  >
183
208
  <i class="${open ? `fa-sharp fa-regular fa-xmark` : `fa-solid fa-message-dots `}"
@@ -206,8 +206,34 @@ export class CustomerMessageUser {
206
206
  style="background-color: ${config
207
207
  .color};width: 58px;height: 58px ;cursor: pointer;display: flex;align-items: center;justify-content: center;position: fixed;left: 20px;bottom:20px;z-index: 100;"
208
208
  onclick="${gvc.event(() => {
209
+ if(document.body.clientWidth<800){
210
+ if (!GlobalUser.token) {
211
+ gvc.glitter.href = '/login';
212
+ }
213
+ const userID = (() => {
214
+ if (GlobalUser.token) {
215
+ return GlobalUser.parseJWT(GlobalUser.token).payload.userID;
216
+ } else {
217
+ return gvc.glitter.macAddress;
218
+ }
219
+ })();
220
+ gvc.glitter.getModule(
221
+ new URL('./cms-plugin/customer-message-user.js', gvc.glitter.root_path).href,
222
+ cl => {
223
+ cl.mobileChat({
224
+ gvc: gvc,
225
+ chat: {
226
+ chat_id: [`${userID}`, 'manager'].sort().join('-'),
227
+ type: 'user',
228
+ },
229
+ user_id: `${userID}`,
230
+ });
231
+ }
232
+ );
233
+ }else{
209
234
  open = !open;
210
- gvc.notifyDataChange(viewId);
235
+ gvc.notifyDataChange(viewId);
236
+ }
211
237
  })}"
212
238
  >
213
239
  <i class="${open ? `fa-sharp fa-regular fa-xmark` : `fa-solid fa-message-dots `}"
@@ -247,10 +247,10 @@ export class Editor {
247
247
  style="word-break: break-word;white-space: nowrap;background:whitesmoke;height:${window.innerHeight}px;"
248
248
  >
249
249
  <header
250
- class="header navbar navbar-expand navbar-light bg-light border-bottom fixed-top "
250
+ class="header navbar navbar-expand navbar-light bg-light border-bottom fixed-top "
251
251
  data-scroll-header
252
252
  style="${parseInt(glitter.share.top_inset, 10)
253
- ? `padding-top:${glitter.share.top_inset || 0}px;min-height: 56px;`
253
+ ? `padding-top:${glitter.share.top_inset || 0}px;min-height: 56px;padding-bottom: 0px !important;`
254
254
  : `height:56px;`}"
255
255
  >
256
256
  <div
@@ -249,10 +249,10 @@ export class Editor {
249
249
  style="word-break: break-word;white-space: nowrap;background:whitesmoke;height:${window.innerHeight}px;"
250
250
  >
251
251
  <header
252
- class="header navbar navbar-expand navbar-light bg-light border-bottom fixed-top "
252
+ class="header navbar navbar-expand navbar-light bg-light border-bottom fixed-top "
253
253
  data-scroll-header
254
254
  style="${parseInt(glitter.share.top_inset, 10)
255
- ? `padding-top:${glitter.share.top_inset || 0}px;min-height: 56px;`
255
+ ? `padding-top:${glitter.share.top_inset || 0}px;min-height: 56px;padding-bottom: 0px !important;`
256
256
  : `height:56px;`}"
257
257
  >
258
258
  <div
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-glitter",
3
- "version": "21.1.3",
3
+ "version": "21.1.4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {