ts-glitter 21.1.2 → 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.2';
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.2';
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 = {
@@ -13533,7 +13533,7 @@ html:not([dir=rtl]) .range-slider-ui.noUi-horizontal .noUi-handle {
13533
13533
  }
13534
13534
 
13535
13535
  .dropdown-menu li:hover > .dropdown-item {
13536
- color: var(--main-orange);
13536
+ color: #ffb400;
13537
13537
  }
13538
13538
  .dropdown-menu .active > .dropdown-item {
13539
13539
  color: #ff6c02;
@@ -107,7 +107,7 @@ export class BgCustomerMessage {
107
107
  else {
108
108
  let view = [
109
109
  ` <div class="navbar d-flex align-items-center justify-content-between w-100 p-3 "
110
- style="background: linear-gradient(135deg, var(--main-orange) 0%, #ff6c02 100%);">
110
+ style="background: linear-gradient(135deg, #ffb400 0%, #ff6c02 100%);">
111
111
  <div class="d-flex align-items-center pe-3 w-100"
112
112
  style="gap:10px;display: flex;align-items: center;">
113
113
  <img src="https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/size1440_s*px$_sas0s9s0s1sesas0_1697354801736-Glitterlogo.png"
@@ -123,7 +123,7 @@ export class BgCustomerMessage {
123
123
  } else {
124
124
  let view = [
125
125
  ` <div class="navbar d-flex align-items-center justify-content-between w-100 p-3 "
126
- style="background: linear-gradient(135deg, var(--main-orange) 0%, #ff6c02 100%);">
126
+ style="background: linear-gradient(135deg, #ffb400 0%, #ff6c02 100%);">
127
127
  <div class="d-flex align-items-center pe-3 w-100"
128
128
  style="gap:10px;display: flex;align-items: center;">
129
129
  <img src="https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/size1440_s*px$_sas0s9s0s1sesas0_1697354801736-Glitterlogo.png"
@@ -873,7 +873,7 @@ export class AiMessage {
873
873
  }
874
874
  }
875
875
  AiMessage.config = {
876
- color: 'linear-gradient(135deg, var(--main-orange) 0%, #ff6c02 100%)',
876
+ color: 'linear-gradient(135deg, #ffb400 0%, #ff6c02 100%)',
877
877
  head: 'https://liondesign-prd.s3.amazonaws.com/file/252530754/1695093945424-Frame 62 (1).png',
878
878
  name: '萊恩設計',
879
879
  user_data: {
@@ -13,7 +13,7 @@ import {MemberAi} from "./ai-generator/member-ai.js";
13
13
 
14
14
  export class AiMessage {
15
15
  public static config: any = {
16
- color: 'linear-gradient(135deg, var(--main-orange) 0%, #ff6c02 100%)',
16
+ color: 'linear-gradient(135deg, #ffb400 0%, #ff6c02 100%)',
17
17
  head: 'https://liondesign-prd.s3.amazonaws.com/file/252530754/1695093945424-Frame 62 (1).png',
18
18
  name: '萊恩設計',
19
19
  user_data: {
@@ -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.2",
3
+ "version": "21.1.4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {