ts-glitter 13.8.676 → 13.8.677

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
@@ -20,7 +20,7 @@ export class Entry {
20
20
  glitter.share.reload = (page, app_name) => {
21
21
  window.appName = app_name || window.appName;
22
22
  window.glitter_page = page;
23
- Entry.onCreate(glitter);
23
+ location.reload();
24
24
  };
25
25
  glitter.share.top_inset = 0;
26
26
  glitter.share.bottom_inset = 0;
@@ -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.676';
71
+ glitter.share.editerVersion = 'V_13.8.677';
72
72
  glitter.share.start = new Date();
73
73
  const vm = {
74
74
  appConfig: [],
package/lowcode/Entry.ts CHANGED
@@ -13,7 +13,7 @@ export class Entry {
13
13
  glitter.share.reload = (page: string, app_name: string) => {
14
14
  (window as any).appName = app_name || (window as any).appName;
15
15
  (window as any).glitter_page = page;
16
- Entry.onCreate(glitter)
16
+ location.reload();
17
17
  }
18
18
  glitter.share.top_inset = 0;
19
19
  glitter.share.bottom_inset = 0;
@@ -69,7 +69,7 @@ export class Entry {
69
69
  }
70
70
  (window as any).renderClock = (window as any).renderClock ?? clockF();
71
71
  console.log(`Entry-time:`, (window as any).renderClock.stop());
72
- glitter.share.editerVersion = 'V_13.8.676';
72
+ glitter.share.editerVersion = 'V_13.8.677';
73
73
  glitter.share.start = new Date();
74
74
  const vm: {
75
75
  appConfig: any;
@@ -8,51 +8,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { ApiUser } from '../../glitter-base/route/user.js';
11
+ import { GlobalUser } from '../../glitter-base/global/global-user.js';
11
12
  const html = String.raw;
12
13
  export class UmClass {
13
14
  static nav(gvc) {
14
- gvc.addStyle(`
15
- .um-nav-container {
16
- width: 1000px;
17
- max-width: 100%;
18
- }
19
- .um-nav-title {
20
- font-weight: 700;
21
- font-size: 36px;
22
- color: #292218;
23
- }
24
- .um-nav-btn {
25
- white-space: nowrap;
26
- text-align: center;
27
- border: 2px solid #232323;
28
- align-items: center;
29
- border-radius: 22px;
30
- height: 44px;
31
- cursor: pointer;
32
- width: 120px;
33
- font-size: 16px;
34
- }
35
- .um-nav-btn.um-nav-btn-active {
36
- background: #292218;
37
- color: #ffffff;
38
- font-weight: 600;
39
- }
40
- .um-nav-mobile-tags-container {
41
- gap: 10px;
42
- overflow-x: auto;
43
- align-items: center;
44
- }
45
- @media (max-width: 768px) {
46
- .um-nav-btn {
47
- width: 110px;
48
- font-size: 14px;
49
- height: 40px;
50
- }
51
- .um-nav-title {
52
- font-size: 30px;
53
- }
54
- }
55
- `);
15
+ this.addStyle(gvc);
16
+ let changePage = (index, type, subData) => { };
17
+ gvc.glitter.getModule(new URL('./official_event/page/change-page.js', gvc.glitter.root_path).href, (cl) => {
18
+ changePage = cl.changePage;
19
+ });
56
20
  const pageName = gvc.glitter.getUrlParameter('page');
57
21
  const buttonHTML = [
58
22
  {
@@ -64,13 +28,17 @@ export class UmClass {
64
28
  title: '商店購物金',
65
29
  },
66
30
  {
67
- key: 'orderlist',
31
+ key: 'order_list',
68
32
  title: '訂單記錄',
69
33
  },
70
34
  {
71
- key: 'wishlist',
35
+ key: 'wish_container',
72
36
  title: '心願單',
73
37
  },
38
+ {
39
+ key: 'reset_password',
40
+ title: '修改密碼',
41
+ },
74
42
  {
75
43
  key: 'logout',
76
44
  title: '登出',
@@ -81,7 +49,16 @@ export class UmClass {
81
49
  <div
82
50
  class="option px-4 d-flex justify-content-center um-nav-btn ${pageName === item.key ? 'um-nav-btn-active' : ''}"
83
51
  onclick="${gvc.event(() => {
84
- console.log(item.key);
52
+ if (item.key === 'reset_password') {
53
+ console.log('修改密碼事件');
54
+ }
55
+ else if (item.key === 'logout') {
56
+ GlobalUser.token = '';
57
+ changePage('index', 'home', {});
58
+ }
59
+ else {
60
+ changePage(item.key, 'page', {});
61
+ }
85
62
  })}"
86
63
  >
87
64
  ${item.title}
@@ -103,7 +80,7 @@ export class UmClass {
103
80
  </div>`;
104
81
  }
105
82
  static spinner() {
106
- return html `<div class="d-flex align-items-center justify-content-center flex-column w-100 mx-auto">
83
+ return html `<div class="d-flex align-items-center justify-content-center flex-column w-100 mx-auto" style="height: 100vh">
107
84
  <div class="spinner-border" role="status"></div>
108
85
  <span class="mt-3">載入中</span>
109
86
  </div>`;
@@ -171,4 +148,240 @@ export class UmClass {
171
148
  });
172
149
  });
173
150
  }
151
+ static addStyle(gvc) {
152
+ return __awaiter(this, void 0, void 0, function* () {
153
+ const css = String.raw;
154
+ gvc.addStyle(css `
155
+ .um-nav-title {
156
+ font-weight: 700;
157
+ font-size: 36px;
158
+ color: #292218;
159
+ }
160
+ .um-nav-btn {
161
+ white-space: nowrap;
162
+ text-align: center;
163
+ border: 2px solid #232323;
164
+ align-items: center;
165
+ border-radius: 22px;
166
+ height: 44px;
167
+ cursor: pointer;
168
+ width: 120px;
169
+ font-size: 16px;
170
+ }
171
+ .um-nav-btn.um-nav-btn-active {
172
+ background: #292218;
173
+ color: #ffffff;
174
+ font-weight: 600;
175
+ }
176
+ .um-nav-mobile-tags-container {
177
+ gap: 10px;
178
+ overflow-x: auto;
179
+ align-items: center;
180
+ }
181
+ .um-info-title {
182
+ color: #000000;
183
+ font-size: 28px;
184
+ }
185
+ .um-info-insignia {
186
+ border-radius: 20px;
187
+ height: 32px;
188
+ padding: 8px 16px;
189
+ font-size: 14px;
190
+ display: inline-block;
191
+ font-weight: 500;
192
+ line-height: 1;
193
+ text-align: center;
194
+ white-space: nowrap;
195
+ vertical-align: baseline;
196
+ background: #7e7e7e;
197
+ color: #fff;
198
+ }
199
+ .um-info-note {
200
+ color: #393939;
201
+ font-size: 16px;
202
+ }
203
+ .um-info-event {
204
+ color: #3564c0;
205
+ font-size: 16px;
206
+ cursor: pointer;
207
+ }
208
+ .um-title {
209
+ text-align: start;
210
+ font-size: 16px;
211
+ font-weight: 700;
212
+ line-height: 25.2px;
213
+ word-wrap: break-word;
214
+ color: #292218;
215
+ }
216
+ .um-content {
217
+ text-align: start;
218
+ font-size: 14px;
219
+ font-weight: 400;
220
+ line-height: 25.2px;
221
+ word-wrap: break-word;
222
+ color: #292218;
223
+ }
224
+ .um-linebar-container {
225
+ flex-direction: column;
226
+ justify-content: flex-start;
227
+ align-items: flex-start;
228
+ gap: 8px;
229
+ display: flex;
230
+ }
231
+ .um-text-danger {
232
+ color: #aa4b4b;
233
+ }
234
+ .um-linebar {
235
+ border-radius: 40px;
236
+ flex-direction: column;
237
+ justify-content: flex-start;
238
+ align-items: flex-start;
239
+ display: flex;
240
+ position: relative;
241
+ overflow: hidden;
242
+ }
243
+ .um-linebar-behind {
244
+ position: absolute;
245
+ width: 100%;
246
+ height: 100%;
247
+ opacity: 0.4;
248
+ background: #292218;
249
+ }
250
+ .um-linebar-fill {
251
+ padding: 10px;
252
+ border-radius: 10px;
253
+ height: 100%;
254
+ }
255
+
256
+ .bgw-input {
257
+ flex-grow: 1;
258
+ padding: 9px 12px;
259
+ border-radius: 10px;
260
+ border: 1px solid #393939;
261
+ background-color: #ffffff;
262
+ appearance: none;
263
+ width: 100%;
264
+ }
265
+
266
+ .bgw-input:focus {
267
+ outline: 0;
268
+ }
269
+
270
+ .bgw-input-readonly:focus-visible {
271
+ outline: 0;
272
+ }
273
+
274
+ .um-rb-bgr {
275
+ background: whitesmoke;
276
+ justify-content: space-between;
277
+ gap: 18px;
278
+ }
279
+
280
+ .um-rb-amount {
281
+ display: flex;
282
+ align-items: center;
283
+ font-size: 36px;
284
+ line-height: 36px;
285
+ }
286
+
287
+ .um-container {
288
+ display: flex;
289
+ justify-content: center;
290
+ margin: 2rem auto;
291
+ width: 100%;
292
+ }
293
+
294
+ .um-th-bar {
295
+ justify-content: space-around;
296
+ align-items: center;
297
+ height: 40px;
298
+ }
299
+ .um-th {
300
+ text-align: start;
301
+ font-size: 18px;
302
+ font-style: normal;
303
+ font-weight: 700;
304
+ color: #292218;
305
+ }
306
+
307
+ .um-td-bar {
308
+ justify-content: space-around;
309
+ align-items: center;
310
+ height: 40px;
311
+ border-bottom: 1px solid #e2d6cd;
312
+ }
313
+
314
+ .um-td {
315
+ text-align: start;
316
+ font-size: 18px;
317
+ font-style: normal;
318
+ font-weight: 400;
319
+ color: #292218;
320
+ }
321
+
322
+ .um-mobile-area {
323
+ padding: 28px;
324
+ margin-top: 12px;
325
+ background: white;
326
+ border-radius: 20px;
327
+ overflow: hidden;
328
+ border: 1px solid;
329
+ justify-content: center;
330
+ align-items: flex-start;
331
+ display: flex;
332
+ flex-direction: column;
333
+ gap: 12px;
334
+ border: 1px solid #292218;
335
+ }
336
+
337
+ .um-mobile-text {
338
+ text-align: start;
339
+ font-size: 16px;
340
+ font-weight: 400;
341
+ line-height: 22.4px;
342
+ letter-spacing: 0.64px;
343
+ word-wrap: break-word;
344
+ color: #292218;
345
+ }
346
+
347
+ @media (min-width: 576px) {
348
+ .um-container {
349
+ max-width: 540px;
350
+ }
351
+ }
352
+
353
+ @media (min-width: 768px) {
354
+ .um-container {
355
+ max-width: 720px;
356
+ }
357
+ .um-nav-btn {
358
+ width: 110px;
359
+ font-size: 14px;
360
+ height: 40px;
361
+ }
362
+ .um-nav-title {
363
+ font-size: 30px;
364
+ }
365
+ }
366
+
367
+ @media (min-width: 992px) {
368
+ .um-container {
369
+ max-width: 800px;
370
+ }
371
+ }
372
+
373
+ @media (min-width: 1200px) {
374
+ .um-container {
375
+ max-width: 860px;
376
+ }
377
+ }
378
+
379
+ @media (min-width: 1400px) {
380
+ .um-container {
381
+ max-width: 960px;
382
+ }
383
+ }
384
+ `);
385
+ });
386
+ }
174
387
  }