@niyamulahsan/create-deskapp 1.2.4 → 1.2.6
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/package.json +16 -16
- package/template/.env.example +20 -13
- package/template/AGENTS.md +699 -0
- package/template/package.json +3 -0
- package/template/src/config/app.ts +26 -24
- package/template/src/config/winsetup.ts +93 -91
- package/template/src/core/api/binding-error.ts +57 -0
- package/template/src/core/api/bindings.generated.ts +2 -0
- package/template/src/core/api/generate.manifest.ts +84 -80
- package/template/src/core/api/registry.ts +58 -48
- package/template/src/core/config.ts +101 -99
- package/template/src/core/database/aggregate.ts +89 -85
- package/template/src/core/database/config.ts +50 -48
- package/template/src/core/database/connection.ts +116 -114
- package/template/src/core/database/migrate-hooks.ts +86 -84
- package/template/src/core/database/paginate.ts +226 -224
- package/template/src/core/database/reset.ts +21 -19
- package/template/src/core/database/seed.ts +169 -167
- package/template/src/core/database/status.ts +37 -35
- package/template/src/core/env.ts +108 -106
- package/template/src/core/facade.ts +63 -61
- package/template/src/core/maker/db/fresh.ts +10 -8
- package/template/src/core/maker/db/generate.ts +13 -11
- package/template/src/core/maker/db/helpers.ts +92 -96
- package/template/src/core/maker/db/migrate.ts +37 -35
- package/template/src/core/maker/db/mod.ts +93 -91
- package/template/src/core/maker/db/module-migrate.ts +56 -54
- package/template/src/core/maker/db/push.ts +23 -21
- package/template/src/core/maker/db/reset.ts +8 -6
- package/template/src/core/maker/db/seed.ts +9 -7
- package/template/src/core/maker/db/status.ts +8 -6
- package/template/src/core/maker/help.ts +59 -57
- package/template/src/core/maker/make/controller.ts +25 -22
- package/template/src/core/maker/make/helpers.ts +97 -91
- package/template/src/core/maker/make/mod.ts +69 -67
- package/template/src/core/maker/make/model.ts +16 -14
- package/template/src/core/maker/make/module.ts +53 -39
- package/template/src/core/maker/make/seeder.ts +23 -21
- package/template/src/core/maker/make/test.ts +33 -30
- package/template/src/core/maker/mod.ts +85 -83
- package/template/src/core/maker/run/mod.ts +134 -132
- package/template/src/core/maker/stub.ts +26 -24
- package/template/src/core/maker/stubs/controller/controller.controller.stub +57 -55
- package/template/src/core/maker/stubs/controller/controller.schema.stub +18 -13
- package/template/src/core/maker/stubs/facade/facade.stub +21 -0
- package/template/src/core/maker/stubs/model/model.stub +10 -8
- package/template/src/core/maker/stubs/seeder/seeder.stub +18 -16
- package/template/src/core/maker/stubs/test/test.stub +9 -7
- package/template/src/core/maker/sync-config.ts +93 -94
- package/template/src/core/utils/password.ts +29 -27
- package/template/src/core/utils/playwright.ts +123 -121
- package/template/src/core/utils/queue.ts +68 -66
- package/template/src/core/utils/scheduler.ts +62 -60
- package/template/src/core/utils/storage.ts +3 -1
- package/template/src/core/utils/validation.ts +37 -35
- package/template/src/database/schema.ts +2 -0
- package/template/src/main.ts +120 -118
- package/template/src/modules/app/__tests__/demo.controller.test.ts +75 -0
- package/template/src/modules/app/__tests__/net.controller.test.ts +65 -0
- package/template/src/modules/app/__tests__/playwright.controller.test.ts +50 -0
- package/template/src/modules/app/__tests__/storage.controller.test.ts +114 -0
- package/template/src/modules/app/__tests__/window.controller.test.ts +98 -0
- package/template/src/modules/app/controllers/demo.controller.ts +120 -118
- package/template/src/modules/app/controllers/net.controller.ts +50 -48
- package/template/src/modules/app/controllers/playwright.controller.ts +142 -140
- package/template/src/modules/app/controllers/storage.controller.ts +231 -229
- package/template/src/modules/app/controllers/window.controller.ts +2 -0
- package/template/src/modules/app/facade.ts +21 -0
- package/template/src/preload.ts +25 -2
- package/template/src/ui/src/App.vue +4 -2
- package/template/src/ui/src/app.ts +38 -23
- package/template/src/ui/src/bindings.d.ts +18 -16
- package/template/src/ui/src/components/Button.vue +34 -32
- package/template/src/ui/src/components/Checkbox.vue +26 -29
- package/template/src/ui/src/components/Input.vue +221 -227
- package/template/src/ui/src/components/InputGroup.vue +141 -0
- package/template/src/ui/src/components/InputPasswordToggle.vue +204 -0
- package/template/src/ui/src/components/Modal.vue +65 -55
- package/template/src/ui/src/components/Spinner.vue +44 -42
- package/template/src/ui/src/components/Switch.vue +62 -65
- package/template/src/ui/src/components/TextArea.vue +108 -121
- package/template/src/ui/src/components/Toast.vue +55 -56
- package/template/src/ui/src/components/datatable/DataTableSkeleton.vue +100 -98
- package/template/src/ui/src/components/datatable/Pagination.vue +153 -125
- package/template/src/ui/src/components/datatable/SelectOpption.vue +36 -35
- package/template/src/ui/src/components/datatable/index.vue +336 -258
- package/template/src/ui/src/env.d.ts +16 -13
- package/template/src/ui/src/global.d.ts +21 -2
- package/template/src/ui/src/helpers/nformatter.ts +12 -10
- package/template/src/ui/src/pages/dashboard/index.vue +690 -687
- package/template/src/ui/src/plugins/browserDetect.ts +57 -0
- package/template/src/ui/src/plugins/gum.ts +576 -549
- package/template/src/ui/src/plugins/pulse.ts +181 -147
- package/template/src/ui/src/plugins/routeProgress.ts +89 -0
- package/template/src/ui/src/router/index.ts +44 -25
- package/template/src/ui/src/stores/example.ts +2 -0
- package/template/src/ui/vite.config.ts +40 -38
- package/template/src/window/app-menu.ts +89 -87
- package/template/src/window/config.ts +14 -12
- package/template/src/window/context-menu.ts +23 -21
- package/template/src/window/dialogs.ts +92 -90
- package/template/src/window/manager.ts +2 -0
- package/template/src/window/native.ts +47 -45
- package/template/src/window/tray.ts +132 -130
|
@@ -1,687 +1,690 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
push("
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
push("
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
push("
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
push("
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
push("
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
push("
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
push("
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
push("
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
push("
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
push("
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
push("
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
push("
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
push("
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
push("
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
push("
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
push("
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
push("
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
push("
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
push("
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
push("
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
push("
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
push("
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
push("
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
<p class="
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
const
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
<button class="act" @click="
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
<button class="act" @click="
|
|
279
|
-
<button class="act" @click="
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
<
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
<button class="act" @click="
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
<button class="act" @click="
|
|
290
|
-
<button class="act
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
</
|
|
320
|
-
<
|
|
321
|
-
|
|
322
|
-
</
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
</
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
.
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
box-shadow: 0 0 0
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
box-shadow: 0 0 0
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
}
|
|
445
|
-
.
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
.
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
.
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
.
|
|
515
|
-
|
|
516
|
-
}
|
|
517
|
-
.card
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
.
|
|
563
|
-
|
|
564
|
-
}
|
|
565
|
-
.act.
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
.
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
.
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
}
|
|
622
|
-
.term-title
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
.
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
}
|
|
645
|
-
.k-
|
|
646
|
-
color: var(--dk-
|
|
647
|
-
}
|
|
648
|
-
.k-
|
|
649
|
-
color: var(--dk-
|
|
650
|
-
}
|
|
651
|
-
.k-
|
|
652
|
-
color: var(--dk-
|
|
653
|
-
}
|
|
654
|
-
.
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
.
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
background:
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
1
|
+
<!-- ./src/ui/src/pages/dashboard/index.vue -->
|
|
2
|
+
|
|
3
|
+
<script setup lang="ts">
|
|
4
|
+
import { ref } from "vue";
|
|
5
|
+
import deskapp from "@/ui/assets/images/deskapp.png";
|
|
6
|
+
import DataTable from "@/ui/components/datatable/index.vue";
|
|
7
|
+
import { useGum } from "@/ui/plugins/gum";
|
|
8
|
+
|
|
9
|
+
interface LogEntry {
|
|
10
|
+
kind: "info" | "ok" | "warn" | "err";
|
|
11
|
+
text: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const log = ref<LogEntry[]>([]);
|
|
15
|
+
const downloadUrl = ref("https://jsonplaceholder.typicode.com/todos/1");
|
|
16
|
+
const apiUrl = ref("https://jsonplaceholder.typicode.com/todos/1");
|
|
17
|
+
const siteUrl = ref("https://vuejs.org");
|
|
18
|
+
const windowTitle = ref("Deskapp · Recipe Demo");
|
|
19
|
+
|
|
20
|
+
const gum = useGum();
|
|
21
|
+
const table = ref<InstanceType<typeof DataTable> | null>(null);
|
|
22
|
+
|
|
23
|
+
function push(kind: LogEntry["kind"], text: string) {
|
|
24
|
+
log.value.unshift({ kind, text });
|
|
25
|
+
if (log.value.length > 200) log.value.length = 200;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Nested form (works for any module): md.<module>.<controller>.<handler>()
|
|
29
|
+
// Flat form also works: bindings['app.window.focus']()
|
|
30
|
+
|
|
31
|
+
/* app.window.* */
|
|
32
|
+
async function openUrlWindow() {
|
|
33
|
+
try {
|
|
34
|
+
push("ok", `app.window.openUrl → ${JSON.stringify(await md.app.window.openUrl(siteUrl.value || "https://vite.dev"))}`);
|
|
35
|
+
} catch (e) {
|
|
36
|
+
push("err", `app.window.openUrl → ${String(e)}`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
async function setWindowTitle() {
|
|
40
|
+
try {
|
|
41
|
+
push("ok", `app.window.setTitle → ${JSON.stringify(await md.app.window.setTitle(windowTitle.value))}`);
|
|
42
|
+
} catch (e) {
|
|
43
|
+
push("err", `app.window.setTitle → ${String(e)}`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
async function focusWindow() {
|
|
47
|
+
try {
|
|
48
|
+
push("ok", `app.window.focus → ${JSON.stringify(await md.app.window.focus())}`);
|
|
49
|
+
} catch (e) {
|
|
50
|
+
push("err", `app.window.focus → ${String(e)}`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
async function toggleAlwaysOnTop() {
|
|
54
|
+
try {
|
|
55
|
+
push("ok", `app.window.toggleAlwaysOnTop → ${JSON.stringify(await md.app.window.toggleAlwaysOnTop())}`);
|
|
56
|
+
} catch (e) {
|
|
57
|
+
push("err", `app.window.toggleAlwaysOnTop → ${String(e)}`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
async function createTray() {
|
|
61
|
+
try {
|
|
62
|
+
push("ok", `app.window.createTray → ${JSON.stringify(await md.app.window.createTray())}`);
|
|
63
|
+
} catch (e) {
|
|
64
|
+
push("err", `app.window.createTray → ${String(e)}`);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
async function confirmSomething() {
|
|
68
|
+
try {
|
|
69
|
+
push("ok", `app.window.confirmSomething → ${JSON.stringify(await md.app.window.confirmSomething("Continue?"))}`);
|
|
70
|
+
} catch (e) {
|
|
71
|
+
push("err", `app.window.confirmSomething → ${String(e)}`);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
async function alertSomething() {
|
|
75
|
+
try {
|
|
76
|
+
push("ok", `app.window.alertSomething → ${JSON.stringify(await md.app.window.alertSomething("Hello from Deskapp"))}`);
|
|
77
|
+
} catch (e) {
|
|
78
|
+
push("err", `app.window.alertSomething → ${String(e)}`);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* app.storage.* */
|
|
83
|
+
async function openFile() {
|
|
84
|
+
try {
|
|
85
|
+
push("ok", `app.storage.open → ${JSON.stringify(await md.app.storage.open())}`);
|
|
86
|
+
} catch (e) {
|
|
87
|
+
push("err", `app.storage.open → ${String(e)}`);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
async function saveFile() {
|
|
91
|
+
try {
|
|
92
|
+
push("ok", `app.storage.save → ${JSON.stringify(await md.app.storage.save())}`);
|
|
93
|
+
} catch (e) {
|
|
94
|
+
push("err", `app.storage.save → ${String(e)}`);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
async function uploadFile() {
|
|
98
|
+
try {
|
|
99
|
+
push("ok", `app.storage.upload → ${JSON.stringify(await md.app.storage.upload())}`);
|
|
100
|
+
} catch (e) {
|
|
101
|
+
push("err", `app.storage.upload → ${String(e)}`);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
async function removeFile() {
|
|
105
|
+
try {
|
|
106
|
+
push("ok", `app.storage.remove → ${JSON.stringify(await md.app.storage.remove())}`);
|
|
107
|
+
} catch (e) {
|
|
108
|
+
push("err", `app.storage.remove → ${String(e)}`);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
async function listDir() {
|
|
112
|
+
try {
|
|
113
|
+
push("ok", `app.storage.list → ${JSON.stringify(await md.app.storage.list())}`);
|
|
114
|
+
} catch (e) {
|
|
115
|
+
push("err", `app.storage.list → ${String(e)}`);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
async function downloadFile() {
|
|
119
|
+
try {
|
|
120
|
+
push("ok", `app.storage.download → ${JSON.stringify(await md.app.storage.download(downloadUrl.value))}`);
|
|
121
|
+
} catch (e) {
|
|
122
|
+
push("err", `app.storage.download → ${String(e)}`);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
async function appSave() {
|
|
126
|
+
try {
|
|
127
|
+
push("ok", `app.storage.appSave → ${JSON.stringify(await md.app.storage.appSave())}`);
|
|
128
|
+
} catch (e) {
|
|
129
|
+
push("err", `app.storage.appSave → ${String(e)}`);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
async function appLoad() {
|
|
133
|
+
try {
|
|
134
|
+
push("ok", `app.storage.appLoad → ${JSON.stringify(await md.app.storage.appLoad())}`);
|
|
135
|
+
} catch (e) {
|
|
136
|
+
push("err", `app.storage.appLoad → ${String(e)}`);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
async function appList() {
|
|
140
|
+
try {
|
|
141
|
+
push("ok", `app.storage.appList → ${JSON.stringify(await md.app.storage.appList())}`);
|
|
142
|
+
} catch (e) {
|
|
143
|
+
push("err", `app.storage.appList → ${String(e)}`);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
async function appExport() {
|
|
147
|
+
try {
|
|
148
|
+
push("ok", `app.storage.appExport → ${JSON.stringify(await md.app.storage.appExport())}`);
|
|
149
|
+
} catch (e) {
|
|
150
|
+
push("err", `app.storage.appExport → ${String(e)}`);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
async function appDelete() {
|
|
154
|
+
try {
|
|
155
|
+
push("ok", `app.storage.appDelete → ${JSON.stringify(await md.app.storage.appDelete())}`);
|
|
156
|
+
} catch (e) {
|
|
157
|
+
push("err", `app.storage.appDelete → ${String(e)}`);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* app.net.* */
|
|
162
|
+
async function fetchPlaceholder() {
|
|
163
|
+
try {
|
|
164
|
+
push("ok", `app.net.placeholder → ${JSON.stringify(await md.app.net.placeholder())}`);
|
|
165
|
+
} catch (e) {
|
|
166
|
+
push("err", `app.net.placeholder → ${String(e)}`);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
async function fetchJson() {
|
|
170
|
+
try {
|
|
171
|
+
push("ok", `app.net.fetchJson → ${JSON.stringify(await md.app.net.fetchJson(apiUrl.value))}`);
|
|
172
|
+
} catch (e) {
|
|
173
|
+
push("err", `app.net.fetchJson → ${String(e)}`);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/* app.playwright.* */
|
|
178
|
+
async function play() {
|
|
179
|
+
push("info", "Starting Playwright…");
|
|
180
|
+
try {
|
|
181
|
+
push("ok", `app.playwright.play → ${JSON.stringify(await md.app.playwright.play({ seconds: 3, headless: false }))}`);
|
|
182
|
+
} catch (e) {
|
|
183
|
+
push("err", `app.playwright.play → ${String(e)}`);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* app.demo.* */
|
|
188
|
+
async function runQueue() {
|
|
189
|
+
try {
|
|
190
|
+
push(
|
|
191
|
+
"ok",
|
|
192
|
+
`app.demo.queue → ${JSON.stringify(await md.app.demo.queue({ items: ["alpha", "beta", "gamma"], concurrency: 2, delayMs: 150 }))}`
|
|
193
|
+
);
|
|
194
|
+
} catch (e) {
|
|
195
|
+
push("err", `app.demo.queue → ${String(e)}`);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
async function runSchedule() {
|
|
199
|
+
push("info", "Running cron demo (2s)…");
|
|
200
|
+
try {
|
|
201
|
+
push("ok", `app.demo.schedule → ${JSON.stringify(await md.app.demo.schedule({ seconds: 2 }))}`);
|
|
202
|
+
} catch (e) {
|
|
203
|
+
push("err", `app.demo.schedule → ${String(e)}`);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/* Data table (gum / app.demo.table + destroy) */
|
|
208
|
+
async function removeRows(ids: Array<string | number>) {
|
|
209
|
+
try {
|
|
210
|
+
const res = await gum.delete("app.demo.destroy", { query: { ids } });
|
|
211
|
+
push("ok", `app.demo.destroy → ${JSON.stringify(res?.data ?? res)}`);
|
|
212
|
+
} catch (e) {
|
|
213
|
+
push("err", `app.demo.destroy → ${String(e)}`);
|
|
214
|
+
}
|
|
215
|
+
await table.value?.load(1);
|
|
216
|
+
}
|
|
217
|
+
</script>
|
|
218
|
+
|
|
219
|
+
<template>
|
|
220
|
+
<div class="app">
|
|
221
|
+
<header class="top">
|
|
222
|
+
<div class="brand">
|
|
223
|
+
<img :src="deskapp" class="logo" alt="deskapp">
|
|
224
|
+
<span class="brand-sub">recipes</span>
|
|
225
|
+
</div>
|
|
226
|
+
<div class="chip"><span class="dot"></span> Electron · Vue 3 · SQLite</div>
|
|
227
|
+
</header>
|
|
228
|
+
|
|
229
|
+
<section class="hero">
|
|
230
|
+
<p class="eyebrow">Simple calls (module → controller → handler)</p>
|
|
231
|
+
<h1>Call the backend with <span class="grad">bindings</span></h1>
|
|
232
|
+
<p class="sub">
|
|
233
|
+
Logical form: <code>await md.app.window.focus()</code> — <b>bindings</b> → <b>module</b> (<code>app</code>) →
|
|
234
|
+
<b>controller</b>
|
|
235
|
+
(<code>window</code>) → <b>handler</b> (<code>focus</code>). Works for any module you create.
|
|
236
|
+
</p>
|
|
237
|
+
<pre class="snippet">// controller: src/modules/app/controllers/hello.controller.ts
|
|
238
|
+
export const greet = async (name: string) => ({ message: `Hello, ${name}!` });
|
|
239
|
+
export const handlers = { greet };
|
|
240
|
+
|
|
241
|
+
// UI
|
|
242
|
+
const res = await md.app.hello.greet('World');</pre>
|
|
243
|
+
</section>
|
|
244
|
+
|
|
245
|
+
<section class="grid">
|
|
246
|
+
<article class="card">
|
|
247
|
+
<header>
|
|
248
|
+
<i class="bi bi-window-stack"></i>
|
|
249
|
+
<div>
|
|
250
|
+
<h2>Windows</h2>
|
|
251
|
+
<p><code>md.app.window.*</code></p>
|
|
252
|
+
</div>
|
|
253
|
+
</header>
|
|
254
|
+
<div class="actions">
|
|
255
|
+
<button class="act" @click="openUrlWindow">Open URL window</button>
|
|
256
|
+
<button class="act" @click="focusWindow">Focus</button>
|
|
257
|
+
<button class="act" @click="toggleAlwaysOnTop">Always on top</button>
|
|
258
|
+
<button class="act" @click="setWindowTitle">Set title</button>
|
|
259
|
+
</div>
|
|
260
|
+
<div class="row"><input v-model="siteUrl" type="url" placeholder="https://vite.dev"></div>
|
|
261
|
+
<div class="row"><input v-model="windowTitle" type="text" placeholder="Window title"></div>
|
|
262
|
+
<div class="actions">
|
|
263
|
+
<button class="act" @click="createTray">Create tray</button>
|
|
264
|
+
<button class="act" @click="confirmSomething">Confirm</button>
|
|
265
|
+
<button class="act" @click="alertSomething">Alert</button>
|
|
266
|
+
</div>
|
|
267
|
+
</article>
|
|
268
|
+
|
|
269
|
+
<article class="card">
|
|
270
|
+
<header>
|
|
271
|
+
<i class="bi bi-folder2-open"></i>
|
|
272
|
+
<div>
|
|
273
|
+
<h2>Files & storage</h2>
|
|
274
|
+
<p><code>md.app.storage.*</code></p>
|
|
275
|
+
</div>
|
|
276
|
+
</header>
|
|
277
|
+
<div class="actions">
|
|
278
|
+
<button class="act" @click="openFile">Open</button>
|
|
279
|
+
<button class="act" @click="saveFile">Save</button>
|
|
280
|
+
<button class="act" @click="uploadFile">Upload</button>
|
|
281
|
+
<button class="act" @click="removeFile">Remove</button>
|
|
282
|
+
<button class="act" @click="listDir">List dir</button>
|
|
283
|
+
</div>
|
|
284
|
+
<div class="row">
|
|
285
|
+
<input v-model="downloadUrl" type="url" placeholder="https://example.com/file.zip">
|
|
286
|
+
<button class="act slim" title="Download" @click="downloadFile"><i class="bi bi-download"></i></button>
|
|
287
|
+
</div>
|
|
288
|
+
<div class="actions">
|
|
289
|
+
<button class="act" @click="appSave">App save</button>
|
|
290
|
+
<button class="act" @click="appLoad">App load</button>
|
|
291
|
+
<button class="act" @click="appList">App list</button>
|
|
292
|
+
<button class="act" @click="appExport">Export tmp</button>
|
|
293
|
+
<button class="act danger" @click="appDelete">Delete state</button>
|
|
294
|
+
</div>
|
|
295
|
+
</article>
|
|
296
|
+
|
|
297
|
+
<article class="card">
|
|
298
|
+
<header>
|
|
299
|
+
<i class="bi bi-globe2"></i>
|
|
300
|
+
<div>
|
|
301
|
+
<h2>Network (no CORS)</h2>
|
|
302
|
+
<p><code>md.app.net.*</code></p>
|
|
303
|
+
</div>
|
|
304
|
+
</header>
|
|
305
|
+
<div class="actions">
|
|
306
|
+
<button class="act" @click="fetchPlaceholder">Placeholder</button>
|
|
307
|
+
<button class="act accent" @click="fetchJson">Fetch JSON</button>
|
|
308
|
+
</div>
|
|
309
|
+
<div class="row"><input v-model="apiUrl" type="url" placeholder="https://api.github.com/zen"></div>
|
|
310
|
+
</article>
|
|
311
|
+
|
|
312
|
+
<article class="card">
|
|
313
|
+
<header>
|
|
314
|
+
<i class="bi bi-browser-chrome"></i>
|
|
315
|
+
<div>
|
|
316
|
+
<h2>Playwright</h2>
|
|
317
|
+
<p><code>md.app.playwright.play</code></p>
|
|
318
|
+
</div>
|
|
319
|
+
</header>
|
|
320
|
+
<div class="actions">
|
|
321
|
+
<button class="act accent" @click="play"><i class="bi bi-play-circle"></i> Launch Chromium (3s)</button>
|
|
322
|
+
</div>
|
|
323
|
+
<p class="hint">
|
|
324
|
+
Backend resolves Chromium via facade. <code>npm i playwright && npx playwright install chromium</code> if needed.
|
|
325
|
+
</p>
|
|
326
|
+
</article>
|
|
327
|
+
|
|
328
|
+
<article class="card">
|
|
329
|
+
<header>
|
|
330
|
+
<i class="bi bi-lightning-charge"></i>
|
|
331
|
+
<div>
|
|
332
|
+
<h2>Queue & cron</h2>
|
|
333
|
+
<p><code>md.app.demo.*</code></p>
|
|
334
|
+
</div>
|
|
335
|
+
</header>
|
|
336
|
+
<div class="actions">
|
|
337
|
+
<button class="act" @click="runQueue">Run queue</button>
|
|
338
|
+
<button class="act" @click="runSchedule">Cron · 2s</button>
|
|
339
|
+
</div>
|
|
340
|
+
</article>
|
|
341
|
+
|
|
342
|
+
<article class="card wide">
|
|
343
|
+
<header>
|
|
344
|
+
<i class="bi bi-table"></i>
|
|
345
|
+
<div>
|
|
346
|
+
<h2>Data table (gum)</h2>
|
|
347
|
+
<p><code>app.demo.table</code> + <code>app.demo.destroy</code></p>
|
|
348
|
+
</div>
|
|
349
|
+
</header>
|
|
350
|
+
<DataTable ref="table" path="app.demo.table" :option="[10, 25, 50]" @remove="removeRows">
|
|
351
|
+
<template #thead
|
|
352
|
+
><th>Name</th>
|
|
353
|
+
<th>Email</th>
|
|
354
|
+
<th>Role</th>
|
|
355
|
+
<th>Created</th></template
|
|
356
|
+
>
|
|
357
|
+
<template #tbody="{ td }"
|
|
358
|
+
><td>{{ td.name }}</td>
|
|
359
|
+
<td>{{ td.email }}</td>
|
|
360
|
+
<td>{{ td.role }}</td>
|
|
361
|
+
<td>{{ td.created }}</td></template
|
|
362
|
+
>
|
|
363
|
+
</DataTable>
|
|
364
|
+
</article>
|
|
365
|
+
</section>
|
|
366
|
+
|
|
367
|
+
<section class="term">
|
|
368
|
+
<header>
|
|
369
|
+
<div class="term-title"><i class="bi bi-terminal"></i> Console <span class="cap">— responses</span></div>
|
|
370
|
+
<button class="act slim" title="Clear" @click="log = []"><i class="bi bi-trash3"></i></button>
|
|
371
|
+
</header>
|
|
372
|
+
<pre
|
|
373
|
+
v-if="log.length"
|
|
374
|
+
class="lines"
|
|
375
|
+
><code v-for="(entry, i) in log" :key="i" :class="'k-' + entry.kind" v-text="entry.text"></code></pre>
|
|
376
|
+
<p v-else class="empty">Click an action. (Works in the Electron app: <code>npm run dev</code>.)</p>
|
|
377
|
+
</section>
|
|
378
|
+
|
|
379
|
+
<footer class="foot">
|
|
380
|
+
<span>deskapp starter</span><span class="rule"></span><span><code>md.<module>.<controller>.<handler>()</code></span>
|
|
381
|
+
</footer>
|
|
382
|
+
</div>
|
|
383
|
+
</template>
|
|
384
|
+
|
|
385
|
+
<style lang="scss" scoped>
|
|
386
|
+
.app {
|
|
387
|
+
min-height: 100vh;
|
|
388
|
+
display: flex;
|
|
389
|
+
flex-direction: column;
|
|
390
|
+
padding: 0 clamp(16px, 4vw, 48px) 24px;
|
|
391
|
+
background:
|
|
392
|
+
radial-gradient(60rem 32rem at 12% -8%, rgba(78, 163, 255, 0.16), transparent 60%),
|
|
393
|
+
radial-gradient(50rem 30rem at 88% 4%, rgba(34, 211, 238, 0.12), transparent 60%),
|
|
394
|
+
linear-gradient(180deg, var(--dk-bg) 0%, var(--dk-bg-soft) 100%);
|
|
395
|
+
}
|
|
396
|
+
.top {
|
|
397
|
+
display: flex;
|
|
398
|
+
align-items: center;
|
|
399
|
+
justify-content: space-between;
|
|
400
|
+
padding: 18px 0;
|
|
401
|
+
border-bottom: 1px solid var(--dk-border);
|
|
402
|
+
}
|
|
403
|
+
.brand {
|
|
404
|
+
display: flex;
|
|
405
|
+
align-items: center;
|
|
406
|
+
gap: 10px;
|
|
407
|
+
}
|
|
408
|
+
.brand-sub {
|
|
409
|
+
font-size: 12px;
|
|
410
|
+
color: var(--dk-faint);
|
|
411
|
+
font-weight: 500;
|
|
412
|
+
}
|
|
413
|
+
.logo {
|
|
414
|
+
width: auto;
|
|
415
|
+
height: 28px;
|
|
416
|
+
}
|
|
417
|
+
.chip {
|
|
418
|
+
display: flex;
|
|
419
|
+
align-items: center;
|
|
420
|
+
gap: 8px;
|
|
421
|
+
font-size: 12px;
|
|
422
|
+
color: var(--dk-muted);
|
|
423
|
+
border: 1px solid var(--dk-border);
|
|
424
|
+
border-radius: 999px;
|
|
425
|
+
padding: 6px 12px;
|
|
426
|
+
}
|
|
427
|
+
.chip .dot {
|
|
428
|
+
width: 8px;
|
|
429
|
+
height: 8px;
|
|
430
|
+
border-radius: 50%;
|
|
431
|
+
background: var(--dk-safe);
|
|
432
|
+
animation: pulse 2s infinite;
|
|
433
|
+
}
|
|
434
|
+
@keyframes pulse {
|
|
435
|
+
0% {
|
|
436
|
+
box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45);
|
|
437
|
+
}
|
|
438
|
+
70% {
|
|
439
|
+
box-shadow: 0 0 0 9px rgba(52, 211, 153, 0);
|
|
440
|
+
}
|
|
441
|
+
100% {
|
|
442
|
+
box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
.hero {
|
|
446
|
+
padding: clamp(22px, 4vh, 36px) 0 18px;
|
|
447
|
+
}
|
|
448
|
+
.eyebrow {
|
|
449
|
+
margin: 0 0 10px;
|
|
450
|
+
font-size: 11px;
|
|
451
|
+
font-weight: 600;
|
|
452
|
+
letter-spacing: 0.14em;
|
|
453
|
+
text-transform: uppercase;
|
|
454
|
+
color: var(--dk-faint);
|
|
455
|
+
}
|
|
456
|
+
.hero h1 {
|
|
457
|
+
margin: 0 0 10px;
|
|
458
|
+
font-size: clamp(24px, 4.2vw, 38px);
|
|
459
|
+
font-weight: 750;
|
|
460
|
+
letter-spacing: -0.03em;
|
|
461
|
+
line-height: 1.08;
|
|
462
|
+
}
|
|
463
|
+
.hero .grad {
|
|
464
|
+
background: linear-gradient(92deg, var(--dk-accent), var(--dk-accent-2));
|
|
465
|
+
-webkit-background-clip: text;
|
|
466
|
+
background-clip: text;
|
|
467
|
+
color: transparent;
|
|
468
|
+
}
|
|
469
|
+
.hero .sub {
|
|
470
|
+
margin: 0 0 12px;
|
|
471
|
+
max-width: 780px;
|
|
472
|
+
color: var(--dk-muted);
|
|
473
|
+
font-size: 14px;
|
|
474
|
+
line-height: 1.6;
|
|
475
|
+
}
|
|
476
|
+
.hero .sub code,
|
|
477
|
+
.hint code,
|
|
478
|
+
.snippet {
|
|
479
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
480
|
+
}
|
|
481
|
+
.hero .sub code,
|
|
482
|
+
.hint code {
|
|
483
|
+
font-size: 11.5px;
|
|
484
|
+
color: var(--dk-accent-2);
|
|
485
|
+
background: rgba(34, 211, 238, 0.08);
|
|
486
|
+
border-radius: 5px;
|
|
487
|
+
padding: 1px 5px;
|
|
488
|
+
}
|
|
489
|
+
.snippet {
|
|
490
|
+
margin: 0;
|
|
491
|
+
white-space: pre-wrap;
|
|
492
|
+
font-size: 12px;
|
|
493
|
+
line-height: 1.55;
|
|
494
|
+
color: #c7d7e8;
|
|
495
|
+
background: rgba(8, 12, 17, 0.85);
|
|
496
|
+
border: 1px solid var(--dk-border);
|
|
497
|
+
border-radius: 12px;
|
|
498
|
+
padding: 12px 14px;
|
|
499
|
+
overflow-x: auto;
|
|
500
|
+
}
|
|
501
|
+
.grid {
|
|
502
|
+
display: grid;
|
|
503
|
+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
|
504
|
+
gap: 14px;
|
|
505
|
+
margin-top: 14px;
|
|
506
|
+
}
|
|
507
|
+
.card {
|
|
508
|
+
display: flex;
|
|
509
|
+
flex-direction: column;
|
|
510
|
+
gap: 12px;
|
|
511
|
+
padding: 18px;
|
|
512
|
+
border: 1px solid var(--dk-border);
|
|
513
|
+
border-radius: 16px;
|
|
514
|
+
background: linear-gradient(160deg, rgba(22, 32, 43, 0.85), rgba(14, 20, 27, 0.9));
|
|
515
|
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
|
|
516
|
+
}
|
|
517
|
+
.card.wide {
|
|
518
|
+
grid-column: 1 / -1;
|
|
519
|
+
}
|
|
520
|
+
.card > header {
|
|
521
|
+
display: flex;
|
|
522
|
+
align-items: center;
|
|
523
|
+
gap: 12px;
|
|
524
|
+
}
|
|
525
|
+
.card > header > i {
|
|
526
|
+
font-size: 20px;
|
|
527
|
+
color: var(--dk-accent);
|
|
528
|
+
background: rgba(78, 163, 255, 0.12);
|
|
529
|
+
border-radius: 10px;
|
|
530
|
+
padding: 9px;
|
|
531
|
+
}
|
|
532
|
+
.card h2 {
|
|
533
|
+
margin: 0;
|
|
534
|
+
font-size: 15px;
|
|
535
|
+
font-weight: 650;
|
|
536
|
+
}
|
|
537
|
+
.card header p {
|
|
538
|
+
margin: 2px 0 0;
|
|
539
|
+
font-size: 12px;
|
|
540
|
+
color: var(--dk-faint);
|
|
541
|
+
}
|
|
542
|
+
.actions {
|
|
543
|
+
display: flex;
|
|
544
|
+
flex-wrap: wrap;
|
|
545
|
+
gap: 7px;
|
|
546
|
+
}
|
|
547
|
+
.act {
|
|
548
|
+
display: inline-flex;
|
|
549
|
+
align-items: center;
|
|
550
|
+
justify-content: center;
|
|
551
|
+
gap: 6px;
|
|
552
|
+
font-size: 12.5px;
|
|
553
|
+
font-weight: 500;
|
|
554
|
+
color: var(--dk-text);
|
|
555
|
+
border: 1px solid var(--dk-border);
|
|
556
|
+
border-radius: 9px;
|
|
557
|
+
background: var(--dk-surface-2);
|
|
558
|
+
padding: 8px 12px;
|
|
559
|
+
cursor: pointer;
|
|
560
|
+
}
|
|
561
|
+
.act:hover {
|
|
562
|
+
border-color: rgba(78, 163, 255, 0.55);
|
|
563
|
+
color: var(--dk-accent);
|
|
564
|
+
}
|
|
565
|
+
.act.slim {
|
|
566
|
+
padding: 8px 10px;
|
|
567
|
+
}
|
|
568
|
+
.act.accent {
|
|
569
|
+
background: linear-gradient(92deg, #357dcc, #1f9ec1);
|
|
570
|
+
border-color: transparent;
|
|
571
|
+
color: #fff;
|
|
572
|
+
}
|
|
573
|
+
.act.danger:hover {
|
|
574
|
+
border-color: rgba(251, 113, 133, 0.6);
|
|
575
|
+
color: var(--dk-err);
|
|
576
|
+
}
|
|
577
|
+
.row {
|
|
578
|
+
display: flex;
|
|
579
|
+
gap: 7px;
|
|
580
|
+
}
|
|
581
|
+
.row input {
|
|
582
|
+
flex: 1;
|
|
583
|
+
min-width: 0;
|
|
584
|
+
font-size: 12.5px;
|
|
585
|
+
color: var(--dk-text);
|
|
586
|
+
background: var(--dk-surface-2);
|
|
587
|
+
border: 1px solid var(--dk-border);
|
|
588
|
+
border-radius: 9px;
|
|
589
|
+
padding: 8px 11px;
|
|
590
|
+
}
|
|
591
|
+
.row input:focus {
|
|
592
|
+
outline: none;
|
|
593
|
+
border-color: var(--dk-accent);
|
|
594
|
+
}
|
|
595
|
+
.hint {
|
|
596
|
+
margin: 0;
|
|
597
|
+
font-size: 12px;
|
|
598
|
+
line-height: 1.55;
|
|
599
|
+
color: var(--dk-faint);
|
|
600
|
+
}
|
|
601
|
+
.term {
|
|
602
|
+
margin-top: 14px;
|
|
603
|
+
border: 1px solid var(--dk-border);
|
|
604
|
+
border-radius: 16px;
|
|
605
|
+
overflow: hidden;
|
|
606
|
+
background: rgba(8, 12, 17, 0.85);
|
|
607
|
+
}
|
|
608
|
+
.term > header {
|
|
609
|
+
display: flex;
|
|
610
|
+
align-items: center;
|
|
611
|
+
justify-content: space-between;
|
|
612
|
+
padding: 12px 16px;
|
|
613
|
+
border-bottom: 1px solid var(--dk-border);
|
|
614
|
+
}
|
|
615
|
+
.term-title {
|
|
616
|
+
display: flex;
|
|
617
|
+
align-items: center;
|
|
618
|
+
gap: 8px;
|
|
619
|
+
font-size: 12.5px;
|
|
620
|
+
font-weight: 600;
|
|
621
|
+
}
|
|
622
|
+
.term-title i {
|
|
623
|
+
color: var(--dk-accent);
|
|
624
|
+
}
|
|
625
|
+
.term-title .cap {
|
|
626
|
+
font-weight: 400;
|
|
627
|
+
color: var(--dk-faint);
|
|
628
|
+
}
|
|
629
|
+
.lines {
|
|
630
|
+
max-height: 320px;
|
|
631
|
+
overflow: auto;
|
|
632
|
+
padding: 14px 16px;
|
|
633
|
+
display: flex;
|
|
634
|
+
flex-direction: column-reverse;
|
|
635
|
+
gap: 4px;
|
|
636
|
+
font-size: 12px;
|
|
637
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
638
|
+
line-height: 1.6;
|
|
639
|
+
margin: 0;
|
|
640
|
+
}
|
|
641
|
+
.lines code {
|
|
642
|
+
white-space: pre-wrap;
|
|
643
|
+
word-break: break-word;
|
|
644
|
+
}
|
|
645
|
+
.k-ok {
|
|
646
|
+
color: var(--dk-safe);
|
|
647
|
+
}
|
|
648
|
+
.k-err {
|
|
649
|
+
color: var(--dk-err);
|
|
650
|
+
}
|
|
651
|
+
.k-warn {
|
|
652
|
+
color: var(--dk-warn);
|
|
653
|
+
}
|
|
654
|
+
.k-info {
|
|
655
|
+
color: var(--dk-accent-2);
|
|
656
|
+
}
|
|
657
|
+
.empty {
|
|
658
|
+
margin: 0;
|
|
659
|
+
padding: 14px 16px;
|
|
660
|
+
font-size: 12.5px;
|
|
661
|
+
color: var(--dk-faint);
|
|
662
|
+
}
|
|
663
|
+
.foot {
|
|
664
|
+
display: flex;
|
|
665
|
+
align-items: center;
|
|
666
|
+
justify-content: center;
|
|
667
|
+
gap: 12px;
|
|
668
|
+
margin-top: 22px;
|
|
669
|
+
font-size: 11.5px;
|
|
670
|
+
color: var(--dk-faint);
|
|
671
|
+
}
|
|
672
|
+
.foot .rule {
|
|
673
|
+
width: 1px;
|
|
674
|
+
height: 12px;
|
|
675
|
+
background: var(--dk-border);
|
|
676
|
+
}
|
|
677
|
+
.card :deep(.datatable thead th) {
|
|
678
|
+
background: rgba(78, 163, 255, 0.07);
|
|
679
|
+
border-color: var(--dk-border) !important;
|
|
680
|
+
}
|
|
681
|
+
.card :deep(.datatable td),
|
|
682
|
+
.card :deep(.datatable th) {
|
|
683
|
+
background-color: transparent;
|
|
684
|
+
}
|
|
685
|
+
@media (max-width: 720px) {
|
|
686
|
+
.chip {
|
|
687
|
+
display: none;
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
</style>
|