underpost 2.8.1 → 2.8.7

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 (145) hide show
  1. package/.dockerignore +1 -0
  2. package/.github/workflows/ghpkg.yml +19 -49
  3. package/.github/workflows/npmpkg.yml +67 -0
  4. package/.github/workflows/publish.yml +5 -5
  5. package/.github/workflows/pwa-microservices-template.page.yml +12 -4
  6. package/.github/workflows/pwa-microservices-template.test.yml +2 -2
  7. package/.vscode/extensions.json +18 -71
  8. package/.vscode/settings.json +20 -3
  9. package/AUTHORS.md +16 -5
  10. package/CHANGELOG.md +123 -3
  11. package/Dockerfile +27 -70
  12. package/README.md +39 -29
  13. package/bin/build.js +186 -0
  14. package/bin/db.js +2 -24
  15. package/bin/deploy.js +1467 -236
  16. package/bin/file.js +67 -16
  17. package/bin/hwt.js +0 -10
  18. package/bin/index.js +1 -77
  19. package/bin/ssl.js +19 -11
  20. package/bin/util.js +9 -104
  21. package/bin/vs.js +26 -2
  22. package/cli.md +451 -0
  23. package/conf.js +29 -138
  24. package/docker-compose.yml +1 -1
  25. package/jsdoc.json +1 -1
  26. package/manifests/calico-custom-resources.yaml +25 -0
  27. package/manifests/deployment/adminer/deployment.yaml +32 -0
  28. package/manifests/deployment/adminer/kustomization.yaml +7 -0
  29. package/manifests/deployment/adminer/service.yaml +13 -0
  30. package/manifests/deployment/fastapi/backend-deployment.yml +120 -0
  31. package/manifests/deployment/fastapi/backend-service.yml +19 -0
  32. package/manifests/deployment/fastapi/frontend-deployment.yml +54 -0
  33. package/manifests/deployment/fastapi/frontend-service.yml +15 -0
  34. package/manifests/deployment/kafka/deployment.yaml +69 -0
  35. package/manifests/deployment/mongo-express/deployment.yaml +60 -0
  36. package/manifests/deployment/phpmyadmin/deployment.yaml +54 -0
  37. package/manifests/kind-config-dev.yaml +12 -0
  38. package/manifests/kind-config.yaml +12 -0
  39. package/manifests/kubeadm-calico-config.yaml +119 -0
  40. package/manifests/letsencrypt-prod.yaml +15 -0
  41. package/manifests/mariadb/config.yaml +10 -0
  42. package/manifests/mariadb/kustomization.yaml +9 -0
  43. package/manifests/mariadb/pv.yaml +12 -0
  44. package/manifests/mariadb/pvc.yaml +10 -0
  45. package/manifests/mariadb/secret.yaml +8 -0
  46. package/manifests/mariadb/service.yaml +10 -0
  47. package/manifests/mariadb/statefulset.yaml +55 -0
  48. package/manifests/mongodb/backup-access.yaml +16 -0
  49. package/manifests/mongodb/backup-cronjob.yaml +42 -0
  50. package/manifests/mongodb/backup-pv-pvc.yaml +22 -0
  51. package/manifests/mongodb/configmap.yaml +26 -0
  52. package/manifests/mongodb/headless-service.yaml +10 -0
  53. package/manifests/mongodb/kustomization.yaml +11 -0
  54. package/manifests/mongodb/pv-pvc.yaml +23 -0
  55. package/manifests/mongodb/statefulset.yaml +125 -0
  56. package/manifests/mongodb-4.4/kustomization.yaml +7 -0
  57. package/manifests/mongodb-4.4/pv-pvc.yaml +23 -0
  58. package/manifests/mongodb-4.4/service-deployment.yaml +63 -0
  59. package/manifests/postgresql/configmap.yaml +9 -0
  60. package/manifests/postgresql/kustomization.yaml +10 -0
  61. package/manifests/postgresql/pv.yaml +15 -0
  62. package/manifests/postgresql/pvc.yaml +13 -0
  63. package/manifests/postgresql/service.yaml +10 -0
  64. package/manifests/postgresql/statefulset.yaml +37 -0
  65. package/manifests/valkey/kustomization.yaml +7 -0
  66. package/manifests/valkey/service.yaml +17 -0
  67. package/manifests/valkey/statefulset.yaml +41 -0
  68. package/package.json +127 -136
  69. package/src/api/core/core.service.js +1 -1
  70. package/src/api/default/default.service.js +1 -1
  71. package/src/api/user/user.model.js +16 -3
  72. package/src/api/user/user.service.js +15 -12
  73. package/src/cli/cluster.js +389 -0
  74. package/src/cli/cron.js +121 -0
  75. package/src/cli/db.js +222 -0
  76. package/src/cli/deploy.js +487 -0
  77. package/src/cli/env.js +58 -0
  78. package/src/cli/fs.js +161 -0
  79. package/src/cli/image.js +66 -0
  80. package/src/cli/index.js +312 -0
  81. package/src/cli/monitor.js +236 -0
  82. package/src/cli/repository.js +128 -0
  83. package/src/cli/script.js +53 -0
  84. package/src/cli/secrets.js +37 -0
  85. package/src/cli/test.js +118 -0
  86. package/src/client/components/core/Account.js +28 -24
  87. package/src/client/components/core/Auth.js +22 -4
  88. package/src/client/components/core/Blockchain.js +1 -1
  89. package/src/client/components/core/CalendarCore.js +128 -121
  90. package/src/client/components/core/CommonJs.js +283 -19
  91. package/src/client/components/core/CssCore.js +16 -4
  92. package/src/client/components/core/Docs.js +1 -2
  93. package/src/client/components/core/DropDown.js +5 -1
  94. package/src/client/components/core/EventsUI.js +3 -3
  95. package/src/client/components/core/FileExplorer.js +86 -78
  96. package/src/client/components/core/Input.js +22 -6
  97. package/src/client/components/core/JoyStick.js +2 -2
  98. package/src/client/components/core/LoadingAnimation.js +3 -12
  99. package/src/client/components/core/LogIn.js +3 -3
  100. package/src/client/components/core/LogOut.js +1 -1
  101. package/src/client/components/core/Modal.js +54 -20
  102. package/src/client/components/core/Panel.js +109 -90
  103. package/src/client/components/core/PanelForm.js +23 -30
  104. package/src/client/components/core/Recover.js +3 -3
  105. package/src/client/components/core/RichText.js +1 -11
  106. package/src/client/components/core/Router.js +3 -1
  107. package/src/client/components/core/Scroll.js +1 -0
  108. package/src/client/components/core/SignUp.js +2 -2
  109. package/src/client/components/core/Translate.js +47 -9
  110. package/src/client/components/core/Validator.js +9 -1
  111. package/src/client/components/core/VanillaJs.js +0 -9
  112. package/src/client/components/core/Worker.js +34 -31
  113. package/src/client/components/default/RoutesDefault.js +3 -2
  114. package/src/client/services/core/core.service.js +15 -10
  115. package/src/client/services/default/default.management.js +46 -37
  116. package/src/client/ssr/Render.js +6 -1
  117. package/src/client/ssr/body/CacheControl.js +2 -3
  118. package/src/client/sw/default.sw.js +3 -3
  119. package/src/db/mongo/MongooseDB.js +29 -1
  120. package/src/index.js +101 -19
  121. package/src/mailer/MailerProvider.js +3 -0
  122. package/src/runtime/lampp/Dockerfile +65 -0
  123. package/src/runtime/lampp/Lampp.js +1 -13
  124. package/src/runtime/xampp/Xampp.js +0 -13
  125. package/src/server/auth.js +3 -3
  126. package/src/server/backup.js +49 -93
  127. package/src/server/client-build.js +49 -46
  128. package/src/server/client-formatted.js +6 -3
  129. package/src/server/conf.js +297 -55
  130. package/src/server/dns.js +75 -62
  131. package/src/server/downloader.js +0 -8
  132. package/src/server/json-schema.js +77 -0
  133. package/src/server/logger.js +15 -10
  134. package/src/server/network.js +20 -161
  135. package/src/server/peer.js +2 -2
  136. package/src/server/process.js +25 -2
  137. package/src/server/proxy.js +7 -29
  138. package/src/server/runtime.js +53 -40
  139. package/src/server/ssl.js +1 -1
  140. package/src/server/start.js +122 -0
  141. package/src/server/valkey.js +27 -11
  142. package/test/api.test.js +0 -8
  143. package/src/dns.js +0 -22
  144. package/src/server/prompt-optimizer.js +0 -28
  145. package/startup.js +0 -11
@@ -1,6 +1,8 @@
1
1
  import { AgGrid } from './AgGrid.js';
2
2
  import { BtnIcon } from './BtnIcon.js';
3
+ import { isValidDate } from './CommonJs.js';
3
4
  import { darkTheme } from './Css.js';
5
+ import { DropDown } from './DropDown.js';
4
6
  import { loggerFactory } from './Logger.js';
5
7
  import { RichText } from './RichText.js';
6
8
  import { ToggleSwitch } from './ToggleSwitch.js';
@@ -86,8 +88,10 @@ const Input = {
86
88
  <div class="fl input-row-${id}">
87
89
  <div class="in fll" style="width: 80%;">${inputElement}</div>
88
90
  <div class="in fll btn-eye-password btn-eye-${id}" style="width: 20%;">
89
- <i class="fas fa-eye fa-eye-${id} eye-password"></i>
90
- <i class="fas fa-eye-slash fa-eye-slash-${id} eye-password" style="display: none"></i>
91
+ <div class="abs center">
92
+ <i class="fas fa-eye fa-eye-${id} eye-password"></i>
93
+ <i class="fas fa-eye-slash fa-eye-slash-${id} eye-password" style="display: none"></i>
94
+ </div>
91
95
  </div>
92
96
  </div>
93
97
  `
@@ -98,7 +102,7 @@ const Input = {
98
102
  </div>
99
103
  </div>`;
100
104
  },
101
- parseJsonEval: (selector) => {
105
+ parseJson: (selector) => {
102
106
  try {
103
107
  return JSON.parse(s(selector).value);
104
108
  } catch (error) {
@@ -147,6 +151,10 @@ const Input = {
147
151
  htmls(`.file-name-render-${inputData.id}`, `${s(`.${inputData.id}`).fileNameInputExtDefaultContent}`);
148
152
  continue;
149
153
  break;
154
+ case 'dropdown-checkbox': {
155
+ s(`.dropdown-option-${inputData.id}-reset`).click();
156
+ break;
157
+ }
150
158
  case 'md':
151
159
  RichText.Tokens[inputData.id].easyMDE.value('');
152
160
  continue;
@@ -196,6 +204,12 @@ const Input = {
196
204
  RichText.Tokens[inputData.id].easyMDE.value(fileObj[inputData.model].mdPlain);
197
205
  continue;
198
206
  break;
207
+
208
+ case 'dropdown-checkbox': {
209
+ s(`.dropdown-option-${inputData.id}-reset`).click();
210
+ for (const opt of originObj[inputData.model]) s(`.dropdown-option-${inputData.id}-${opt}`).click();
211
+ break;
212
+ }
199
213
  case 'checkbox':
200
214
  case 'checkbox-on-off':
201
215
  if (
@@ -207,9 +221,11 @@ const Input = {
207
221
  break;
208
222
  case 'datetime-local':
209
223
  {
210
- const date = new Date(originObj[inputData.model]);
211
- date.setMinutes(date.getMinutes() - date.getTimezoneOffset());
212
- s(`.${inputData.id}`).value = date.toISOString().slice(0, 16);
224
+ if (isValidDate(originObj[inputData.model])) {
225
+ const date = new Date(originObj[inputData.model]);
226
+ // date.setMinutes(date.getMinutes() - date.getTimezoneOffset());
227
+ s(`.${inputData.id}`).value = date.toISOString().slice(0, 16);
228
+ } else s(`.${inputData.id}`).value = null;
213
229
  }
214
230
  continue;
215
231
  break;
@@ -19,8 +19,8 @@ const JoyStick = {
19
19
  /* border: 2px solid red; */
20
20
  left: 5px;
21
21
  bottom: 5px;
22
- height: 200px;
23
- width: 200px;
22
+ height: 175px;
23
+ width: 175px;
24
24
  z-index: 3;
25
25
  }
26
26
  .joy-img-background-${id} {
@@ -76,22 +76,11 @@ const LoadingAnimation = {
76
76
  'text-align': 'center',
77
77
  };
78
78
 
79
- if (s(container).classList) {
80
- const classes = Array.from(s(container).classList);
81
- if (classes.find((e) => e.match('management-table-btn-mini'))) {
82
- style.top = '-2px';
83
- style.left = '-2px';
84
- } else if (classes.find((e) => e.match('action-bar-box'))) {
85
- style.top = '-30px';
86
- style.left = '-12px';
87
- }
88
- }
89
-
90
79
  append(
91
80
  container,
92
81
  html`
93
82
  <div
94
- class="in ${id}"
83
+ class="abs center ${id}"
95
84
  style="${renderCssAttr({
96
85
  style,
97
86
  })}"
@@ -145,6 +134,8 @@ const LoadingAnimation = {
145
134
  s(backgroundContainer).style.opacity = 0;
146
135
  setTimeout(async () => {
147
136
  s(backgroundContainer).style.display = 'none';
137
+ if (s(`.modal-menu`)) s(`.modal-menu`).classList.remove('hide');
138
+ if (s(`.main-body-btn-container`)) s(`.main-body-btn-container`).classList.remove('hide');
148
139
  if (callBack) callBack();
149
140
  }, 300);
150
141
  });
@@ -135,7 +135,7 @@ const LogIn = {
135
135
  return html`
136
136
  <div class="in">
137
137
  ${await BtnIcon.Render({
138
- class: 'section-mp form-button btn-log-in-i-not-have-account',
138
+ class: 'in section-mp form-button btn-log-in-i-not-have-account',
139
139
  label: html`<i class="fas fa-user-plus"></i> ${Translate.Render(`i-not-have-account`)}
140
140
  <br />
141
141
  ${Translate.Render(`sign-up`)}`,
@@ -165,7 +165,7 @@ const LogIn = {
165
165
  </div>
166
166
  <div class="in">
167
167
  ${await BtnIcon.Render({
168
- class: 'section-mp form-button btn-log-in-forgot-password',
168
+ class: 'in section-mp form-button btn-log-in-forgot-password',
169
169
  label: html`<i class="fas fa-question-circle"></i> ${Translate.Render(`forgot-password`)}`,
170
170
  type: 'button',
171
171
  })}
@@ -181,7 +181,7 @@ const LogIn = {
181
181
 
182
182
  <div class="in">
183
183
  ${await BtnIcon.Render({
184
- class: 'section-mp form-button btn-log-in',
184
+ class: 'in section-mp form-button btn-log-in',
185
185
  label: Translate.Render('log-in'),
186
186
  type: 'submit',
187
187
  })}
@@ -47,7 +47,7 @@ const LogOut = {
47
47
  return html` <form class="in">
48
48
  <div class="in">
49
49
  ${await BtnIcon.Render({
50
- class: 'section-mp btn-custom btn-log-out',
50
+ class: 'inl section-mp btn-custom btn-log-out',
51
51
  label: html`<i class="fa-solid fa-power-off"></i> ${Translate.Render('log-out')}`,
52
52
  type: 'submit',
53
53
  })}
@@ -9,7 +9,6 @@ import {
9
9
  htmls,
10
10
  sa,
11
11
  getAllChildNodes,
12
- getCurrentTrace,
13
12
  isActiveElement,
14
13
  } from './VanillaJs.js';
15
14
  import { BtnIcon } from './BtnIcon.js';
@@ -50,6 +49,7 @@ const Modal = {
50
49
  mode: '' /* slide-menu */,
51
50
  RouterInstance: {},
52
51
  disableTools: [],
52
+ observer: false,
53
53
  },
54
54
  ) {
55
55
  if (options.heightBottomBar === undefined) options.heightBottomBar = 50;
@@ -77,12 +77,15 @@ const Modal = {
77
77
  options,
78
78
  onCloseListener: {},
79
79
  onMenuListener: {},
80
+ onCollapseMenuListener: {},
81
+ onExtendMenuListener: {},
80
82
  onDragEndListener: {},
81
83
  onObserverListener: {},
82
84
  onClickListener: {},
83
85
  onExpandUiListener: {},
84
86
  onBarUiOpen: {},
85
87
  onBarUiClose: {},
88
+ onHome: {},
86
89
  query: options.query ? `${window.location.search}` : undefined,
87
90
  };
88
91
  const setCenterRestore = () => {
@@ -157,7 +160,8 @@ const Modal = {
157
160
  };
158
161
  options.mode === 'slide-menu-right' ? (options.style.right = '0px') : (options.style.left = '0px');
159
162
  const contentIconClass = 'abs center';
160
-
163
+ if (options.class) options.class += ' hide';
164
+ else options.class = 'hide';
161
165
  options.dragDisabled = true;
162
166
  options.titleClass = 'hide';
163
167
  top = '0px';
@@ -239,7 +243,7 @@ const Modal = {
239
243
  'body',
240
244
  html`
241
245
  <div
242
- class="abs main-body-btn-container"
246
+ class="abs main-body-btn-container hide"
243
247
  style="top: ${options.heightTopBar + 50}px; z-index: 9; ${true ||
244
248
  (options.mode && options.mode.match('right'))
245
249
  ? 'right'
@@ -403,6 +407,11 @@ const Modal = {
403
407
  })}
404
408
  </div>
405
409
  </div>
410
+ ${options?.slideMenuTopBarFix
411
+ ? html`<div class="abs modal slide-menu-top-bar-fix" style="height: ${options.heightTopBar}px">
412
+ ${await options.slideMenuTopBarFix()}
413
+ </div>`
414
+ : ''}
406
415
  </div>`,
407
416
  );
408
417
  EventsUI.onClick(`.action-btn-profile-log-in`, () => {
@@ -537,12 +546,12 @@ const Modal = {
537
546
  if (routerId) {
538
547
  if (
539
548
  s(`.main-btn-${routerId}`) &&
540
- (routerId.toLocaleLowerCase().match(s(`.${id}`).value.toLocaleLowerCase()) ||
549
+ (routerId.toLowerCase().match(s(`.${id}`).value.toLowerCase()) ||
541
550
  (Translate.Data[routerId] &&
542
551
  Object.keys(Translate.Data[routerId]).filter((keyLang) =>
543
552
  Translate.Data[routerId][keyLang]
544
- .toLocaleLowerCase()
545
- .match(s(`.${id}`).value.toLocaleLowerCase()),
553
+ .toLowerCase()
554
+ .match(s(`.${id}`).value.toLowerCase()),
546
555
  ).length > 0))
547
556
  ) {
548
557
  const fontAwesomeIcon = getAllChildNodes(s(`.main-btn-${routerId}`)).find((e) => {
@@ -1002,14 +1011,15 @@ const Modal = {
1002
1011
  e.preventDefault();
1003
1012
  window.history.forward();
1004
1013
  });
1005
- EventsUI.onClick(`.action-btn-home`, () => s(`.main-btn-home`).click());
1006
- EventsUI.onClick(`.action-btn-app-icon`, () => s(`.action-btn-home`).click());
1014
+ EventsUI.onClick(`.action-btn-home`, async () => {
1015
+ await Modal.onHomeRouterEvent();
1016
+ Object.keys(this.Data[idModal].onHome).map((keyListener) => this.Data[idModal].onHome[keyListener]());
1017
+ });
1018
+ EventsUI.onClick(`.action-btn-app-icon`, () => Modal.onHomeRouterEvent());
1007
1019
  Keyboard.instanceMultiPressKey({
1008
1020
  id: 'input-shortcut-global-escape',
1009
1021
  keys: ['Escape'],
1010
1022
  eventCallBack: () => {
1011
- // if (s(`.main-btn-home`)) s(`.main-btn-home`).click();
1012
-
1013
1023
  if (s(`.btn-close-${this.currentTopModalId}`)) s(`.btn-close-${this.currentTopModalId}`).click();
1014
1024
  },
1015
1025
  });
@@ -1149,7 +1159,7 @@ const Modal = {
1149
1159
  top: ${top};
1150
1160
  left: ${left};
1151
1161
  overflow: auto; /* resizable required */
1152
- resize: auto; /* resizable required */
1162
+ resize: both; /* resizable required */
1153
1163
  transition: ${transition};
1154
1164
  opacity: 0;
1155
1165
  z-index: 1;
@@ -1335,7 +1345,7 @@ const Modal = {
1335
1345
  s(`.btn-icon-menu-back`).classList.add('hide');
1336
1346
  if (s(`.menu-btn-container-main`)) s(`.menu-btn-container-main`).classList.remove('hide');
1337
1347
  };
1338
- s(`.main-btn-home`).onclick = () => {
1348
+ this.onHomeRouterEvent = async () => {
1339
1349
  for (const keyModal of Object.keys(this.Data)) {
1340
1350
  if (
1341
1351
  ![idModal, 'main-body-top', 'main-body']
@@ -1349,6 +1359,9 @@ const Modal = {
1349
1359
  setPath(getProxyPath());
1350
1360
  setDocTitle({ ...options.RouterInstance, route: '' });
1351
1361
  };
1362
+ s(`.main-btn-home`).onclick = async () => {
1363
+ await this.onHomeRouterEvent();
1364
+ };
1352
1365
  EventsUI.onClick(`.btn-icon-menu-back`, backMenuButtonEvent);
1353
1366
  EventsUI.onClick(`.btn-icon-menu-mode`, () => {
1354
1367
  if (s(`.btn-icon-menu-mode-right`).classList.contains('hide')) {
@@ -1379,6 +1392,9 @@ const Modal = {
1379
1392
  if (options.onCollapseMenu) options.onCollapseMenu();
1380
1393
  s(`.sub-menu-title-container-${'modal-menu'}`).classList.add('hide');
1381
1394
  s(`.nav-path-container-${'modal-menu'}`).classList.add('hide');
1395
+ Object.keys(this.Data[idModal].onCollapseMenuListener).map((keyListener) =>
1396
+ this.Data[idModal].onCollapseMenuListener[keyListener](),
1397
+ );
1382
1398
  } else {
1383
1399
  slideMenuWidth = originSlideMenuWidth;
1384
1400
  setTimeout(() => {
@@ -1399,6 +1415,9 @@ const Modal = {
1399
1415
  if (options.onExtendMenu) options.onExtendMenu();
1400
1416
  s(`.sub-menu-title-container-${'modal-menu'}`).classList.remove('hide');
1401
1417
  s(`.nav-path-container-${'modal-menu'}`).classList.remove('hide');
1418
+ Object.keys(this.Data[idModal].onExtendMenuListener).map((keyListener) =>
1419
+ this.Data[idModal].onExtendMenuListener[keyListener](),
1420
+ );
1402
1421
  }
1403
1422
  // btn-bar-center-icon-menu
1404
1423
  this.actionBtnCenter();
@@ -1606,9 +1625,11 @@ const Modal = {
1606
1625
  ...this.Data[idModal],
1607
1626
  };
1608
1627
  },
1628
+ onHomeRouterEvent: () => {},
1609
1629
  currentTopModalId: '',
1610
1630
  zIndexSync: function ({ idModal }) {
1611
1631
  setTimeout(() => {
1632
+ if (!this.Data[idModal]) return;
1612
1633
  const cleanTopModal = () => {
1613
1634
  Object.keys(this.Data).map((_idModal) => {
1614
1635
  if (this.Data[_idModal].options.zIndexSync && s(`.${_idModal}`)) s(`.${_idModal}`).style.zIndex = '3';
@@ -1691,7 +1712,7 @@ const Modal = {
1691
1712
  const htmlRender = html`
1692
1713
  <br />
1693
1714
  <div class="in section-mp" style="font-size: 40px; text-align: center">
1694
- <i class="fas fa-question-circle"></i>
1715
+ ${options.icon ? options.icon : html` <i class="fas fa-question-circle"></i>`}
1695
1716
  </div>
1696
1717
  ${await options.html()}
1697
1718
  <div class="in section-mp">
@@ -1702,7 +1723,7 @@ const Modal = {
1702
1723
  style: `margin: auto`,
1703
1724
  })}
1704
1725
  </div>
1705
- <div class="in section-mp">
1726
+ <div class="in section-mp ${options.disableBtnCancel ? 'hide' : ''}">
1706
1727
  ${await BtnIcon.Render({
1707
1728
  class: `in section-mp form-button btn-cancel-${id}`,
1708
1729
  label: Translate.Render('cancel'),
@@ -1717,7 +1738,7 @@ const Modal = {
1717
1738
  titleClass: 'hide',
1718
1739
  style: {
1719
1740
  width: '300px',
1720
- height: '350px',
1741
+ height: '400px',
1721
1742
  overflow: 'hidden',
1722
1743
  'z-index': '11',
1723
1744
  resize: 'none',
@@ -1751,7 +1772,6 @@ const Modal = {
1751
1772
  },
1752
1773
  headerTitleHeight: 40,
1753
1774
  actionBtnCenter: function () {
1754
- // if (!s(`.btn-close-modal-menu`).classList.contains('hide')) return s(`.main-btn-home`).click();
1755
1775
  if (!s(`.btn-close-modal-menu`).classList.contains('hide')) {
1756
1776
  return s(`.btn-close-modal-menu`).click();
1757
1777
  }
@@ -1777,20 +1797,34 @@ const renderMenuLabel = ({ img, text, icon }) => {
1777
1797
  <div class="abs center main-btn-menu-text">${text}</div>`;
1778
1798
  };
1779
1799
 
1780
- const renderViewTitle = (options = { icon: '', img: '', text: '', assetFolder: '', 'ui-icons': '', dim, top }) => {
1781
- if (options.dim === undefined) options.dim = 60;
1800
+ const renderViewTitle = (
1801
+ options = { icon: '', img: '', text: '', assetFolder: '', 'ui-icons': '', dim, top, topText: '' },
1802
+ ) => {
1803
+ if (options.dim === undefined) options.dim = 30;
1782
1804
  const { img, text, icon, dim, top } = options;
1783
1805
  if (!img && !options['ui-icon']) return html`<span class="view-title-icon">${icon}</span> ${text}`;
1784
1806
  return html`<img
1785
1807
  class="abs img-btn-square-view-title"
1786
1808
  style="${renderCssAttr({
1787
- style: { width: `${dim}px`, height: `${dim}px`, top: top !== undefined ? `${top}px` : `-${dim / 2}px` },
1809
+ style: {
1810
+ width: `${dim}px`,
1811
+ height: `${dim}px`,
1812
+ top: top !== undefined ? `${top}px !important` : undefined,
1813
+ },
1788
1814
  })}"
1789
1815
  src="${options['ui-icon']
1790
1816
  ? `${getProxyPath()}assets/${options.assetFolder ? options.assetFolder : 'ui-icons'}/${options['ui-icon']}`
1791
1817
  : img}"
1792
1818
  />
1793
- <div class="in text-btn-square-view-title" style="${renderCssAttr({ style: { 'padding-left': `${dim}px` } })}">
1819
+ <div
1820
+ class="in text-btn-square-view-title"
1821
+ style="${renderCssAttr({
1822
+ style: {
1823
+ // 'padding-left': `${20 + dim}px`,
1824
+ ...(options.topText !== undefined ? { top: options.topText + 'px !important' } : {}),
1825
+ },
1826
+ })}"
1827
+ >
1794
1828
  ${text}
1795
1829
  </div>`;
1796
1830
  };