underpost 2.8.84 → 2.8.85

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.
Files changed (104) hide show
  1. package/.env.development +1 -0
  2. package/.env.production +1 -0
  3. package/.env.test +1 -0
  4. package/.github/workflows/{ghpkg.yml → ghpkg.ci.yml} +1 -1
  5. package/.github/workflows/{npmpkg.yml → npmpkg.ci.yml} +1 -1
  6. package/.github/workflows/{publish.yml → publish.ci.yml} +1 -1
  7. package/.github/workflows/{pwa-microservices-template.page.yml → pwa-microservices-template-page.cd.yml} +1 -1
  8. package/.github/workflows/{pwa-microservices-template.test.yml → pwa-microservices-template-test.ci.yml} +1 -1
  9. package/.vscode/settings.json +0 -1
  10. package/README.md +45 -2
  11. package/bin/build.js +15 -5
  12. package/bin/deploy.js +17 -82
  13. package/bin/file.js +15 -8
  14. package/cli.md +65 -44
  15. package/conf.js +1 -1
  16. package/docker-compose.yml +1 -1
  17. package/manifests/deployment/dd-template-development/deployment.yaml +2 -2
  18. package/manifests/maas/gpu-diag.sh +1 -1
  19. package/package.json +4 -6
  20. package/src/api/user/user.router.js +24 -1
  21. package/src/api/user/user.service.js +1 -4
  22. package/src/cli/cluster.js +42 -27
  23. package/src/cli/deploy.js +20 -0
  24. package/src/cli/index.js +9 -0
  25. package/src/cli/monitor.js +8 -12
  26. package/src/cli/run.js +111 -6
  27. package/src/cli/ssh.js +32 -0
  28. package/src/client/Default.index.js +7 -3
  29. package/src/client/components/core/Account.js +1 -1
  30. package/src/client/components/core/Chat.js +1 -1
  31. package/src/client/components/core/CommonJs.js +24 -22
  32. package/src/client/components/core/Content.js +1 -5
  33. package/src/client/components/core/Css.js +258 -18
  34. package/src/client/components/core/CssCore.js +8 -8
  35. package/src/client/components/core/Docs.js +14 -61
  36. package/src/client/components/core/DropDown.js +137 -82
  37. package/src/client/components/core/EventsUI.js +92 -5
  38. package/src/client/components/core/LoadingAnimation.js +8 -15
  39. package/src/client/components/core/Modal.js +597 -136
  40. package/src/client/components/core/NotificationManager.js +2 -2
  41. package/src/client/components/core/ObjectLayerEngine.js +638 -0
  42. package/src/client/components/core/Panel.js +158 -34
  43. package/src/client/components/core/PanelForm.js +12 -3
  44. package/src/client/components/core/Recover.js +1 -1
  45. package/src/client/components/core/Router.js +77 -17
  46. package/src/client/components/core/SocketIo.js +3 -3
  47. package/src/client/components/core/Translate.js +6 -2
  48. package/src/client/components/core/VanillaJs.js +0 -3
  49. package/src/client/components/core/Worker.js +3 -1
  50. package/src/client/components/default/CssDefault.js +17 -3
  51. package/src/client/components/default/MenuDefault.js +264 -45
  52. package/src/client/components/default/RoutesDefault.js +6 -12
  53. package/src/client/public/default/android-chrome-144x144.png +0 -0
  54. package/src/client/public/default/android-chrome-192x192.png +0 -0
  55. package/src/client/public/default/android-chrome-256x256.png +0 -0
  56. package/src/client/public/default/android-chrome-36x36.png +0 -0
  57. package/src/client/public/default/android-chrome-48x48.png +0 -0
  58. package/src/client/public/default/android-chrome-72x72.png +0 -0
  59. package/src/client/public/default/android-chrome-96x96.png +0 -0
  60. package/src/client/public/default/apple-touch-icon-114x114-precomposed.png +0 -0
  61. package/src/client/public/default/apple-touch-icon-114x114.png +0 -0
  62. package/src/client/public/default/apple-touch-icon-120x120-precomposed.png +0 -0
  63. package/src/client/public/default/apple-touch-icon-120x120.png +0 -0
  64. package/src/client/public/default/apple-touch-icon-144x144-precomposed.png +0 -0
  65. package/src/client/public/default/apple-touch-icon-144x144.png +0 -0
  66. package/src/client/public/default/apple-touch-icon-152x152-precomposed.png +0 -0
  67. package/src/client/public/default/apple-touch-icon-152x152.png +0 -0
  68. package/src/client/public/default/apple-touch-icon-180x180-precomposed.png +0 -0
  69. package/src/client/public/default/apple-touch-icon-180x180.png +0 -0
  70. package/src/client/public/default/apple-touch-icon-57x57-precomposed.png +0 -0
  71. package/src/client/public/default/apple-touch-icon-57x57.png +0 -0
  72. package/src/client/public/default/apple-touch-icon-60x60-precomposed.png +0 -0
  73. package/src/client/public/default/apple-touch-icon-60x60.png +0 -0
  74. package/src/client/public/default/apple-touch-icon-72x72-precomposed.png +0 -0
  75. package/src/client/public/default/apple-touch-icon-72x72.png +0 -0
  76. package/src/client/public/default/apple-touch-icon-76x76-precomposed.png +0 -0
  77. package/src/client/public/default/apple-touch-icon-76x76.png +0 -0
  78. package/src/client/public/default/apple-touch-icon-precomposed.png +0 -0
  79. package/src/client/public/default/apple-touch-icon.png +0 -0
  80. package/src/client/public/default/assets/background/dark.jpg +0 -0
  81. package/src/client/public/default/assets/background/dark.svg +557 -0
  82. package/src/client/public/default/assets/logo/base-icon.png +0 -0
  83. package/src/client/public/default/assets/logo/underpost.gif +0 -0
  84. package/src/client/public/default/assets/mailer/api-user-check.png +0 -0
  85. package/src/client/public/default/assets/mailer/api-user-invalid-token.png +0 -0
  86. package/src/client/public/default/assets/mailer/api-user-recover.png +0 -0
  87. package/src/client/public/default/favicon-16x16.png +0 -0
  88. package/src/client/public/default/favicon-32x32.png +0 -0
  89. package/src/client/public/default/favicon.ico +0 -0
  90. package/src/client/public/default/mstile-144x144.png +0 -0
  91. package/src/client/public/default/mstile-150x150.png +0 -0
  92. package/src/client/public/default/mstile-310x150.png +0 -0
  93. package/src/client/public/default/mstile-310x310.png +0 -0
  94. package/src/client/public/default/mstile-70x70.png +0 -0
  95. package/src/client/public/default/safari-pinned-tab.svg +24 -0
  96. package/src/client/ssr/body/DefaultSplashScreen.js +2 -2
  97. package/src/index.js +9 -1
  98. package/src/monitor.js +24 -0
  99. package/src/runtime/lampp/Dockerfile +30 -39
  100. package/src/runtime/lampp/Lampp.js +11 -2
  101. package/src/server/client-build-docs.js +205 -0
  102. package/src/server/client-build.js +16 -166
  103. package/src/server/conf.js +12 -5
  104. package/src/server/valkey.js +102 -41
@@ -3,6 +3,7 @@ import { LoadingAnimation } from '../core/LoadingAnimation.js';
3
3
  import { Validator } from '../core/Validator.js';
4
4
  import { Input } from '../core/Input.js';
5
5
  import { Responsive } from '../core/Responsive.js';
6
+ import { darkTheme, ThemeEvents } from './Css.js';
6
7
  import { append, getDataFromInputFile, getQueryParams, htmls, prepend, s } from './VanillaJs.js';
7
8
  import { BtnIcon } from './BtnIcon.js';
8
9
  import { Translate } from './Translate.js';
@@ -119,10 +120,11 @@ const Panel = {
119
120
  });
120
121
  s(`.a-${payload._id}`).onclick = async (e) => {
121
122
  e.preventDefault();
123
+ if (options.onClick) await options.onClick({ payload });
122
124
  };
123
125
  s(`.container-${idPanel}-${id}`).onclick = async (e) => {
124
126
  e.preventDefault();
125
- if (options.onClick) await options.onClick({ payload });
127
+ // if (options.onClick) await options.onClick({ payload });
126
128
  };
127
129
  });
128
130
  if (s(`.${idPanel}-${id}`)) s(`.${idPanel}-${id}`).remove();
@@ -364,9 +366,7 @@ const Panel = {
364
366
  data: await getDataFromInputFile(file),
365
367
  },
366
368
  },
367
- aHrefOptions: {
368
- disable: true,
369
- },
369
+
370
370
  raw: true,
371
371
  })}
372
372
  <div class="in" style="overflow: hidden">${file.name}</div>`;
@@ -514,38 +514,24 @@ const Panel = {
514
514
  }
515
515
  }
516
516
 
517
+ // Add theme change handler
518
+ const themeChangeHandler = () => {
519
+ const styleElement = s(`.${idPanel}-styles`);
520
+ if (styleElement) {
521
+ styleElement.textContent = darkTheme
522
+ ? getDarkStyles(idPanel, scrollClassContainer)
523
+ : getLightStyles(idPanel, scrollClassContainer);
524
+ }
525
+ };
526
+
527
+ // Add theme change listener
528
+ ThemeEvents[`${idPanel}-theme`] = themeChangeHandler;
529
+
530
+ // Initial styles
531
+ setTimeout(ThemeEvents[`${idPanel}-theme`]);
532
+
517
533
  return html`
518
534
  <style>
519
- .${scrollClassContainer} {
520
- scroll-behavior: smooth;
521
- }
522
- .${idPanel}-form-container {
523
- padding-bottom: 20px;
524
- top: 0px;
525
- z-index: 1;
526
- overflow: auto;
527
- }
528
- .${idPanel}-form {
529
- max-width: 900px;
530
- }
531
- .${idPanel}-cell {
532
- min-height: 200px;
533
- }
534
- .${idPanel}-container {
535
- }
536
- .${idPanel} {
537
- margin: 10px;
538
- transition: 0.3s;
539
- border-radius: 10px;
540
- background: #f6f6f6;
541
- color: black;
542
- padding: 10px;
543
- cursor: pointer;
544
- min-height: 400px;
545
- }
546
- .${idPanel}:hover {
547
- background: #ffffff;
548
- }
549
535
  .${idPanel}-head {
550
536
  /* background: white; */
551
537
  margin-bottom: 10px;
@@ -610,6 +596,7 @@ const Panel = {
610
596
  font-size: 17px !important;
611
597
  }
612
598
  </style>
599
+ <style class="${idPanel}-styles"></style>
613
600
  <div class="${idPanel}-container">
614
601
  <div class="in modal ${idPanel}-form-container ${options.formContainerClass ? options.formContainerClass : ''}">
615
602
  <div class="in ${idPanel}-form-header">
@@ -643,4 +630,141 @@ const Panel = {
643
630
  },
644
631
  };
645
632
 
633
+ // Function to generate base styles
634
+ function getBaseStyles(idPanel, scrollClassContainer) {
635
+ return css`
636
+ .${scrollClassContainer} {
637
+ scroll-behavior: smooth;
638
+ }
639
+ .${idPanel}-form-container {
640
+ padding-bottom: 20px;
641
+ top: 0px;
642
+ z-index: 1;
643
+ overflow: auto;
644
+ }
645
+ .${idPanel}-form {
646
+ max-width: 900px;
647
+ }
648
+ .${idPanel}-cell {
649
+ min-height: 200px;
650
+ }
651
+ .${idPanel}-container {
652
+ }
653
+ .${idPanel} {
654
+ margin: 10px;
655
+ transition: 0.3s;
656
+ border-radius: 10px;
657
+ padding: 10px;
658
+ min-height: 400px;
659
+ }
660
+ .${idPanel}-head {
661
+ margin-bottom: 10px;
662
+ }
663
+ .img-${idPanel} {
664
+ width: 100%;
665
+ }
666
+ .${idPanel}-row {
667
+ padding: 5px;
668
+ margin: 5px;
669
+ font-size: 16px;
670
+ }
671
+ .${idPanel}-subtitle {
672
+ font-size: 17px;
673
+ margin-left: 20px;
674
+ top: -7px;
675
+ }
676
+ .${idPanel}-tags {
677
+ font-size: 17px;
678
+ margin-left: 10px;
679
+ top: -7px;
680
+ }
681
+ .${idPanel}-form-body {
682
+ transition: 0.3s;
683
+ }
684
+ .btn-${idPanel}-add {
685
+ padding: 10px;
686
+ font-size: 20px;
687
+ }
688
+ .${idPanel}-dropdown {
689
+ min-height: 100px;
690
+ }
691
+ `;
692
+ }
693
+
694
+ // Function to generate light theme styles
695
+ function getLightStyles(idPanel, scrollClassContainer) {
696
+ return css`
697
+ ${getBaseStyles(idPanel, scrollClassContainer)}
698
+
699
+ .${idPanel} {
700
+ background: #f6f6f6;
701
+ color: black;
702
+ }
703
+ .${idPanel}:hover {
704
+ background: #ffffff;
705
+ }
706
+ .${idPanel}-title {
707
+ color: rgba(109, 104, 255, 1);
708
+ font-size: 24px;
709
+ padding: 5px;
710
+ }
711
+ .a-title-${idPanel} {
712
+ color: rgba(109, 104, 255, 1);
713
+ }
714
+ .a-title-${idPanel}:hover {
715
+ color: #e89f4c;
716
+ }
717
+ .${idPanel}-row-pin-value {
718
+ font-size: 20px;
719
+ color: rgb(19 190 84);
720
+ }
721
+ .${idPanel}-btn-tool {
722
+ background: none !important;
723
+ color: #c4c4c4 !important;
724
+ }
725
+ .${idPanel}-btn-tool:hover {
726
+ color: #000000 !important;
727
+ font-size: 17px !important;
728
+ }
729
+ `;
730
+ }
731
+
732
+ // Function to generate dark theme styles
733
+ function getDarkStyles(idPanel, scrollClassContainer) {
734
+ return css`
735
+ ${getBaseStyles(idPanel, scrollClassContainer)}
736
+
737
+ .${idPanel} {
738
+ background: #2d2d2d;
739
+ color: #e0e0e0;
740
+ }
741
+ .${idPanel}:hover {
742
+ background: #3a3a3a;
743
+ }
744
+ .${idPanel}-title {
745
+ color: #8a85ff;
746
+ font-size: 24px;
747
+ padding: 5px;
748
+ }
749
+ .a-title-${idPanel} {
750
+ color: #8a85ff;
751
+ }
752
+ .a-title-${idPanel}:hover {
753
+ color: #ffb74d;
754
+ }
755
+ .${idPanel}-row-pin-value {
756
+ font-size: 20px;
757
+ color: #4caf50;
758
+ }
759
+ .${idPanel}-btn-tool {
760
+ background: none !important;
761
+ color: #666666 !important;
762
+ }
763
+ .${idPanel}-btn-tool:hover {
764
+ color: #ffffff !important;
765
+ font-size: 17px !important;
766
+ }
767
+ `;
768
+ }
769
+
646
770
  export { Panel };
@@ -15,7 +15,7 @@ import { getSrcFromFileData } from './Input.js';
15
15
  import { imageShimmer, renderCssAttr } from './Css.js';
16
16
  import { Translate } from './Translate.js';
17
17
  import { Modal } from './Modal.js';
18
- import { listenQueryPathInstance, setQueryPath } from './Router.js';
18
+ import { closeModalRouteChangeEvents, listenQueryPathInstance, setQueryPath } from './Router.js';
19
19
 
20
20
  const PanelForm = {
21
21
  Data: {},
@@ -92,7 +92,7 @@ const PanelForm = {
92
92
  },
93
93
  ];
94
94
 
95
- const titleIcon = html`<i class="fa-solid fa-quote-left"></i>`;
95
+ const titleIcon = html`<i class="fa-solid fa-quote-left title-icon-${idPanel}"></i>`;
96
96
  const panelRender = async ({ data }) =>
97
97
  await Panel.Render({
98
98
  idPanel,
@@ -425,9 +425,17 @@ const PanelForm = {
425
425
  });
426
426
  let firsUpdateEvent = false;
427
427
  let lastCid;
428
+ let lastUserId;
429
+ closeModalRouteChangeEvents[idPanel] = (newPath) => {
430
+ if (newPath.split('?')[0] === '/' && PanelForm.Data[idPanel].data && PanelForm.Data[idPanel].data.length === 0) {
431
+ this.Data[idPanel].updatePanel();
432
+ }
433
+ };
428
434
  this.Data[idPanel].updatePanel = async () => {
429
435
  const cid = getQueryParams().cid ? getQueryParams().cid : '';
430
- if (lastCid === cid) return;
436
+ const forceUpdate = lastUserId !== Elements.Data.user.main.model.user._id;
437
+ if (lastCid === cid && !forceUpdate) return;
438
+ lastUserId = newInstance(Elements.Data.user.main.model.user._id);
431
439
  lastCid = cid;
432
440
  if (options.route === 'home') Modal.homeCid = newInstance(cid);
433
441
  htmls(`.${options.parentIdModal ? 'html-' + options.parentIdModal : 'main-body'}`, await renderSrrPanelData());
@@ -452,6 +460,7 @@ const PanelForm = {
452
460
  if (!options.parentIdModal)
453
461
  Modal.Data['modal-menu'].onHome[idPanel] = async () => {
454
462
  lastCid = undefined;
463
+ lastUserId = undefined;
455
464
  setQueryPath({ path: options.route, queryPath: '' });
456
465
  await this.Data[idPanel].updatePanel();
457
466
  };
@@ -62,7 +62,7 @@ const Recover = {
62
62
 
63
63
  setTimeout(async () => {
64
64
  if (user && user.email) {
65
- s(`.recover-email`).value = user.email;
65
+ s(`.recover-email`).value = user.role === 'guest' ? '' : user.email;
66
66
  if (user.emailConfirmed) s(`.recover-email`).setAttribute('disabled', '');
67
67
  }
68
68
 
@@ -1,29 +1,34 @@
1
1
  import { titleFormatted } from './CommonJs.js';
2
2
  import { loggerFactory } from './Logger.js';
3
3
  import { getProxyPath, getQueryParams, htmls, s, setPath } from './VanillaJs.js';
4
+ import { Modal } from './Modal.js';
5
+ import { Worker } from './Worker.js';
4
6
 
5
7
  // Router
6
8
 
9
+ const RouterEvents = {};
10
+ const closeModalRouteChangeEvents = {};
11
+
7
12
  const logger = loggerFactory(import.meta);
8
13
 
9
- const setDocTitle = (options = { Routes: () => {}, route: '', NameApp: '' }) => {
10
- const { Routes, route, NameApp } = options;
11
- let title = titleFormatted(Routes()[`/${route}`].title);
12
- if (Routes()[`/${route}`].upperCase) title = title.toUpperCase();
13
- htmls('title', html`${title} | ${NameApp}`);
14
- {
15
- const routeId = route === '' ? 'home' : route;
16
- if (s(`.main-btn-${routeId}`)) {
17
- if (s(`.main-btn-menu-active`)) s(`.main-btn-menu-active`).classList.remove(`main-btn-menu-active`);
18
- if (s(`.main-btn-${routeId}`)) s(`.main-btn-${routeId}`).classList.add(`main-btn-menu-active`);
19
- }
14
+ const sanitizeRoute = (route) =>
15
+ !route || route === '/' || route === `\\`
16
+ ? 'home'
17
+ : route.toLowerCase().replaceAll('/', '').replaceAll(`\\`, '').replaceAll(' ', '-');
18
+
19
+ const setDocTitle = (route) => {
20
+ const _route = sanitizeRoute(route);
21
+ // logger.warn('setDocTitle', _route);
22
+ const title = titleFormatted(_route);
23
+ htmls('title', html`${title}${title.match(Worker.title.toLowerCase()) ? '' : ` | ${Worker.title}`}`);
24
+ if (s(`.main-btn-${_route}`)) {
25
+ if (s(`.main-btn-menu-active`)) s(`.main-btn-menu-active`).classList.remove(`main-btn-menu-active`);
26
+ if (s(`.main-btn-${_route}`)) s(`.main-btn-${_route}`).classList.add(`main-btn-menu-active`);
20
27
  }
21
28
  };
22
29
 
23
- const RouterEvents = {};
24
-
25
- const Router = function (options = { Routes: () => {}, e: new PopStateEvent(), NameApp: '' }) {
26
- const { e, Routes, NameApp } = options;
30
+ const Router = function (options = { Routes: () => {}, e: new PopStateEvent() }) {
31
+ const { e, Routes } = options;
27
32
  const proxyPath = getProxyPath();
28
33
  let path = window.location.pathname;
29
34
  logger.info(options);
@@ -39,7 +44,7 @@ const Router = function (options = { Routes: () => {}, e: new PopStateEvent(), N
39
44
 
40
45
  if (path === pushPath) {
41
46
  for (const event of Object.keys(RouterEvents)) RouterEvents[event](routerEvent);
42
- setDocTitle({ Routes, route, NameApp });
47
+ setDocTitle(route);
43
48
  return Routes()[`/${route}`].render();
44
49
  }
45
50
  }
@@ -75,4 +80,59 @@ const listenQueryPathInstance = ({ id, routeId, event }, queryKey = 'cid') => {
75
80
  });
76
81
  };
77
82
 
78
- export { Router, setDocTitle, LoadRouter, RouterEvents, setQueryPath, listenQueryPathInstance };
83
+ const triggerCloseModalRouteChangeEvents = (newPath) => {
84
+ console.warn('[closeModalRouteChangeEvent]', newPath);
85
+ for (const event of Object.keys(closeModalRouteChangeEvents)) closeModalRouteChangeEvents[event](newPath);
86
+ };
87
+
88
+ const closeModalRouteChangeEvent = (options = {}) => {
89
+ const { route, RouterInstance, homeCid } = options;
90
+ if (!route) return;
91
+
92
+ let path = window.location.pathname;
93
+ if (path[path.length - 1] !== '/') path = `${path}/`;
94
+ let newPath = `${getProxyPath()}`;
95
+
96
+ if (path !== newPath) {
97
+ for (const subIdModal of Object.keys(Modal.Data).reverse()) {
98
+ if (Modal.Data[subIdModal]?.options?.route) {
99
+ newPath = `${newPath}${Modal.Data[subIdModal].options.route}`;
100
+ triggerCloseModalRouteChangeEvents(newPath);
101
+ setPath(newPath);
102
+ setDocTitle(newPath);
103
+ Modal.setTopModalCallback(subIdModal);
104
+ }
105
+ }
106
+ newPath = `${newPath}${homeCid ? `?cid=${homeCid}` : ''}`;
107
+ triggerCloseModalRouteChangeEvents(newPath);
108
+ setPath(newPath);
109
+ setDocTitle(newPath);
110
+ }
111
+ };
112
+
113
+ const handleModalViewRoute = (options = {}) => {
114
+ const { route, RouterInstance } = options;
115
+ if (!route) return;
116
+
117
+ let path = window.location.pathname;
118
+ if (path !== '/' && path[path.length - 1] === '/') path = path.slice(0, -1);
119
+ const proxyPath = getProxyPath();
120
+ const newPath = `${proxyPath}${route}`;
121
+
122
+ if (path !== newPath) {
123
+ setPath(newPath);
124
+ setDocTitle(newPath);
125
+ }
126
+ };
127
+
128
+ export {
129
+ Router,
130
+ setDocTitle,
131
+ LoadRouter,
132
+ RouterEvents,
133
+ setQueryPath,
134
+ listenQueryPathInstance,
135
+ closeModalRouteChangeEvent,
136
+ handleModalViewRoute,
137
+ closeModalRouteChangeEvents,
138
+ };
@@ -21,11 +21,11 @@ const SocketIo = {
21
21
  },
22
22
  Init: async function (options) {
23
23
  if (this.socket) this.socket.disconnect();
24
- this.host = getWsBaseUrl({ wsBasePath: '' });
24
+ this.host = options.host ?? getWsBaseUrl({ wsBasePath: '' });
25
25
  logger.info(`ws host:`, this.host);
26
- const path = getWsBasePath();
26
+ const path = typeof options.path === 'string' ? options.path : getWsBasePath();
27
27
  const connectOptions = {
28
- path,
28
+ path: path === '/' ? undefined : path,
29
29
  // auth: {
30
30
  // token: '',
31
31
  // },
@@ -60,10 +60,10 @@ const Translate = {
60
60
  this.Parse(language);
61
61
  if (s(`.action-btn-lang-render`)) htmls(`.action-btn-lang-render`, s('html').lang);
62
62
  },
63
- RenderSetting: async function () {
63
+ RenderSetting: async function (id) {
64
64
  return html` <div class="in section-mp">
65
65
  ${await DropDown.Render({
66
- id: 'settings-lang',
66
+ id: id ?? 'settings-lang',
67
67
  value: s('html').lang ? s('html').lang : 'en',
68
68
  label: html`${Translate.Render('lang')}`,
69
69
  data: ['en', 'es'].map((language) => {
@@ -512,6 +512,10 @@ const TranslateCore = {
512
512
  en: 'Your session has expired. Please log in again.',
513
513
  es: 'Su sesión ha expirado. Por favor, inicie sesión de nuevo.',
514
514
  };
515
+ Translate.Data['cron-management'] = {
516
+ en: 'Cron Management',
517
+ es: 'Gestion de cron jobs',
518
+ };
515
519
  },
516
520
  };
517
521
 
@@ -31,8 +31,6 @@ VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=bierner
31
31
 
32
32
  */
33
33
 
34
- // Docs by https://mintlify.com
35
-
36
34
  /**
37
35
  * Query selector.
38
36
  *
@@ -355,7 +353,6 @@ const getBlobFromUint8ArrayFile = (data = [[]], mimetype = 'application/octet-st
355
353
  * @memberof VanillaJS
356
354
  */
357
355
  const getProxyPath = () => {
358
- // warning: evaluates headers html source
359
356
  let path = location.pathname.split('/')[1] ? `/${location.pathname.split('/')[1]}/` : '/';
360
357
  if (window.Routes && path !== '/' && path.slice(0, -1) in window.Routes()) path = '/';
361
358
  return path;
@@ -12,7 +12,8 @@ const logger = loggerFactory(import.meta);
12
12
  const Worker = {
13
13
  devMode: () => location.origin.match('localhost') || location.origin.match('127.0.0.1'),
14
14
  instance: async function ({ router, render }) {
15
- logger.warn('Init');
15
+ Worker.title = `${s('title').textContent}`;
16
+ // logger.warn('Init worker', Worker.title);
16
17
  window.ononline = async () => {
17
18
  logger.warn('ononline');
18
19
  };
@@ -81,6 +82,7 @@ const Worker = {
81
82
  }
82
83
  window.serviceWorkerReady = true;
83
84
  },
85
+
84
86
  // Get the current service worker registration.
85
87
  getRegistration: async function () {
86
88
  return await navigator.serviceWorker.getRegistration();
@@ -1,13 +1,27 @@
1
+ import { subThemeManager } from '../core/Css.js';
2
+
3
+ const CssCommonDefault = async () => {
4
+ // use #4f46e5, #7c3aed);
5
+ subThemeManager.setDarkTheme('#7c3aed');
6
+ subThemeManager.setLightTheme('#7c3aed');
7
+
8
+ return html``;
9
+ };
10
+
1
11
  const CssDefaultDark = {
2
12
  theme: 'default-dark',
3
13
  dark: true,
4
- render: async () => html` <style></style> `,
14
+ render: async () => {
15
+ return (await CssCommonDefault()) + html``;
16
+ },
5
17
  };
6
18
 
7
19
  const CssDefaultLight = {
8
20
  theme: 'default-light',
9
21
  dark: false,
10
- render: async () => html` <style></style> `,
22
+ render: async () => {
23
+ return (await CssCommonDefault()) + html``;
24
+ },
11
25
  };
12
26
 
13
- export { CssDefaultDark, CssDefaultLight };
27
+ export { CssDefaultDark, CssCommonDefault, CssDefaultLight };