@hostlink/nuxt-light 1.27.7 → 1.28.0

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 (276) hide show
  1. package/dist/module.d.mts +2 -1
  2. package/dist/module.json +3 -3
  3. package/dist/module.mjs +40 -42
  4. package/dist/runtime/components/L/CustomField/Add.vue +41 -52
  5. package/dist/runtime/components/L/CustomField/Add.vue.d.ts +2 -0
  6. package/dist/runtime/components/L/CustomField/List.vue +26 -30
  7. package/dist/runtime/components/L/CustomField/List.vue.d.ts +2 -0
  8. package/dist/runtime/components/L/Database/create-table-dialog.vue +22 -38
  9. package/dist/runtime/components/L/Database/create-table-dialog.vue.d.ts +2 -0
  10. package/dist/runtime/components/L/Fieldset.vue +19 -23
  11. package/dist/runtime/components/L/Fieldset.vue.d.ts +2 -0
  12. package/dist/runtime/components/L/ForgetPasswordDialog.vue +39 -41
  13. package/dist/runtime/components/L/ForgetPasswordDialog.vue.d.ts +2 -0
  14. package/dist/runtime/components/L/Revision.vue +101 -137
  15. package/dist/runtime/components/L/Revision.vue.d.ts +2 -0
  16. package/dist/runtime/components/L/Storage.vue +26 -30
  17. package/dist/runtime/components/L/Storage.vue.d.ts +2 -0
  18. package/dist/runtime/components/L/System/Setting/authentication.vue +22 -44
  19. package/dist/runtime/components/L/System/Setting/authentication.vue.d.ts +2 -0
  20. package/dist/runtime/components/L/System/Setting/developer.vue +43 -59
  21. package/dist/runtime/components/L/System/Setting/developer.vue.d.ts +2 -0
  22. package/dist/runtime/components/L/System/Setting/forget-password.vue +42 -58
  23. package/dist/runtime/components/L/System/Setting/forget-password.vue.d.ts +2 -0
  24. package/dist/runtime/components/L/System/Setting/general.vue +29 -41
  25. package/dist/runtime/components/L/System/Setting/general.vue.d.ts +2 -0
  26. package/dist/runtime/components/L/System/Setting/mail.vue +39 -42
  27. package/dist/runtime/components/L/System/Setting/mail.vue.d.ts +2 -0
  28. package/dist/runtime/components/L/System/Setting/modules.vue +9 -9
  29. package/dist/runtime/components/L/System/Setting/modules.vue.d.ts +2 -0
  30. package/dist/runtime/components/L/System/Setting/security.vue +20 -39
  31. package/dist/runtime/components/L/System/Setting/security.vue.d.ts +2 -0
  32. package/dist/runtime/components/L/User/eventlog.vue +26 -26
  33. package/dist/runtime/components/L/User/eventlog.vue.d.ts +2 -0
  34. package/dist/runtime/components/L/User/overview.vue +25 -27
  35. package/dist/runtime/components/L/User/overview.vue.d.ts +2 -0
  36. package/dist/runtime/components/L/User/userlog.vue +22 -28
  37. package/dist/runtime/components/L/User/userlog.vue.d.ts +2 -0
  38. package/dist/runtime/components/L/ValidationInput.vue +68 -91
  39. package/dist/runtime/components/L/ValidationInput.vue.d.ts +2 -0
  40. package/dist/runtime/components/MyTest.vue +8 -7
  41. package/dist/runtime/components/MyTest.vue.d.ts +2 -0
  42. package/dist/runtime/components/l-add-btn.vue +13 -12
  43. package/dist/runtime/components/l-add-btn.vue.d.ts +2 -0
  44. package/dist/runtime/components/l-alert.vue +25 -29
  45. package/dist/runtime/components/l-alert.vue.d.ts +2 -0
  46. package/dist/runtime/components/l-app-main.vue +226 -294
  47. package/dist/runtime/components/l-app-main.vue.d.ts +2 -0
  48. package/dist/runtime/components/l-app.vue +76 -89
  49. package/dist/runtime/components/l-app.vue.d.ts +2 -0
  50. package/dist/runtime/components/l-audit-card.vue +8 -14
  51. package/dist/runtime/components/l-audit-card.vue.d.ts +2 -0
  52. package/dist/runtime/components/l-back-btn.vue.d.ts +2 -0
  53. package/dist/runtime/components/l-banner.vue +28 -34
  54. package/dist/runtime/components/l-banner.vue.d.ts +2 -0
  55. package/dist/runtime/components/l-bar.vue +21 -25
  56. package/dist/runtime/components/l-bar.vue.d.ts +2 -0
  57. package/dist/runtime/components/l-btn.vue +62 -39
  58. package/dist/runtime/components/l-btn.vue.d.ts +2 -0
  59. package/dist/runtime/components/l-card.vue +90 -141
  60. package/dist/runtime/components/l-card.vue.d.ts +2 -0
  61. package/dist/runtime/components/l-checkbox.vue +30 -7
  62. package/dist/runtime/components/l-checkbox.vue.d.ts +2 -0
  63. package/dist/runtime/components/l-col.vue +21 -29
  64. package/dist/runtime/components/l-col.vue.d.ts +2 -0
  65. package/dist/runtime/components/l-customizer.vue +84 -100
  66. package/dist/runtime/components/l-customizer.vue.d.ts +2 -0
  67. package/dist/runtime/components/l-date-picker.vue +101 -147
  68. package/dist/runtime/components/l-date-picker.vue.d.ts +2 -0
  69. package/dist/runtime/components/l-delete-btn.vue +22 -27
  70. package/dist/runtime/components/l-delete-btn.vue.d.ts +2 -0
  71. package/dist/runtime/components/l-dialog-database-field-add.vue +19 -36
  72. package/dist/runtime/components/l-dialog-database-field-add.vue.d.ts +2 -0
  73. package/dist/runtime/components/l-drag-drop-container.vue +44 -62
  74. package/dist/runtime/components/l-drag-drop-container.vue.d.ts +2 -0
  75. package/dist/runtime/components/l-drag-drop-group.vue +49 -70
  76. package/dist/runtime/components/l-drag-drop-group.vue.d.ts +2 -0
  77. package/dist/runtime/components/l-drag-drop.vue +33 -44
  78. package/dist/runtime/components/l-drag-drop.vue.d.ts +2 -0
  79. package/dist/runtime/components/l-edit-btn.vue.d.ts +2 -0
  80. package/dist/runtime/components/l-editor.vue +185 -172
  81. package/dist/runtime/components/l-editor.vue.d.ts +2 -0
  82. package/dist/runtime/components/l-facebook-button.vue +18 -26
  83. package/dist/runtime/components/l-facebook-button.vue.d.ts +2 -0
  84. package/dist/runtime/components/l-fav-menu.vue +19 -24
  85. package/dist/runtime/components/l-fav-menu.vue.d.ts +2 -0
  86. package/dist/runtime/components/l-field.vue +49 -18
  87. package/dist/runtime/components/l-field.vue.d.ts +2 -0
  88. package/dist/runtime/components/l-file-manager-labels.vue +46 -48
  89. package/dist/runtime/components/l-file-manager-labels.vue.d.ts +2 -0
  90. package/dist/runtime/components/l-file-manager-move.vue +53 -68
  91. package/dist/runtime/components/l-file-manager-move.vue.d.ts +2 -0
  92. package/dist/runtime/components/l-file-manager-preview.vue +46 -81
  93. package/dist/runtime/components/l-file-manager-preview.vue.d.ts +2 -0
  94. package/dist/runtime/components/l-file-manager.vue +498 -640
  95. package/dist/runtime/components/l-file-manager.vue.d.ts +2 -0
  96. package/dist/runtime/components/l-file-upload.vue +80 -109
  97. package/dist/runtime/components/l-file-upload.vue.d.ts +2 -0
  98. package/dist/runtime/components/l-file.vue +37 -61
  99. package/dist/runtime/components/l-file.vue.d.ts +2 -0
  100. package/dist/runtime/components/l-form-dialog.vue +71 -83
  101. package/dist/runtime/components/l-form-dialog.vue.d.ts +2 -0
  102. package/dist/runtime/components/l-form.vue +82 -96
  103. package/dist/runtime/components/l-form.vue.d.ts +2 -0
  104. package/dist/runtime/components/l-group-select.vue +59 -94
  105. package/dist/runtime/components/l-group-select.vue.d.ts +2 -0
  106. package/dist/runtime/components/l-icon-picker.vue +3265 -3274
  107. package/dist/runtime/components/l-icon-picker.vue.d.ts +2 -0
  108. package/dist/runtime/components/l-input-xlsx.vue +30 -38
  109. package/dist/runtime/components/l-input-xlsx.vue.d.ts +2 -0
  110. package/dist/runtime/components/l-input.vue +142 -126
  111. package/dist/runtime/components/l-input.vue.d.ts +2 -0
  112. package/dist/runtime/components/l-item.vue +30 -21
  113. package/dist/runtime/components/l-item.vue.d.ts +2 -0
  114. package/dist/runtime/components/l-link.vue +16 -15
  115. package/dist/runtime/components/l-link.vue.d.ts +2 -0
  116. package/dist/runtime/components/l-list.vue +27 -35
  117. package/dist/runtime/components/l-list.vue.d.ts +2 -0
  118. package/dist/runtime/components/l-login.vue +246 -287
  119. package/dist/runtime/components/l-login.vue.d.ts +2 -0
  120. package/dist/runtime/components/l-menu.vue +45 -54
  121. package/dist/runtime/components/l-menu.vue.d.ts +2 -0
  122. package/dist/runtime/components/l-microsoft-button.vue +42 -52
  123. package/dist/runtime/components/l-microsoft-button.vue.d.ts +2 -0
  124. package/dist/runtime/components/l-page.vue +48 -67
  125. package/dist/runtime/components/l-page.vue.d.ts +2 -0
  126. package/dist/runtime/components/l-row.vue +8 -13
  127. package/dist/runtime/components/l-row.vue.d.ts +2 -0
  128. package/dist/runtime/components/l-save-btn.vue.d.ts +2 -0
  129. package/dist/runtime/components/l-select.vue +150 -76
  130. package/dist/runtime/components/l-select.vue.d.ts +2 -0
  131. package/dist/runtime/components/l-small-box.vue +18 -31
  132. package/dist/runtime/components/l-small-box.vue.d.ts +2 -0
  133. package/dist/runtime/components/l-statistic.vue +17 -23
  134. package/dist/runtime/components/l-statistic.vue.d.ts +2 -0
  135. package/dist/runtime/components/l-tab.vue +20 -15
  136. package/dist/runtime/components/l-tab.vue.d.ts +2 -0
  137. package/dist/runtime/components/l-table.vue +444 -560
  138. package/dist/runtime/components/l-table.vue.d.ts +2 -0
  139. package/dist/runtime/components/l-tabs.vue +34 -16
  140. package/dist/runtime/components/l-tabs.vue.d.ts +2 -0
  141. package/dist/runtime/components/l-test2.vue +10 -9
  142. package/dist/runtime/components/l-test2.vue.d.ts +2 -0
  143. package/dist/runtime/components/l-time-picker.vue +53 -68
  144. package/dist/runtime/components/l-time-picker.vue.d.ts +2 -0
  145. package/dist/runtime/components/l-view-btn.vue.d.ts +2 -0
  146. package/dist/runtime/composables/mytest.d.ts +2 -0
  147. package/dist/runtime/composables/mytest.js +3 -0
  148. package/dist/runtime/formkit/Checkbox.vue +15 -18
  149. package/dist/runtime/formkit/Checkbox.vue.d.ts +2 -0
  150. package/dist/runtime/formkit/DatePicker.vue +15 -18
  151. package/dist/runtime/formkit/DatePicker.vue.d.ts +2 -0
  152. package/dist/runtime/formkit/Editor.vue +15 -18
  153. package/dist/runtime/formkit/Editor.vue.d.ts +2 -0
  154. package/dist/runtime/formkit/File.vue +30 -37
  155. package/dist/runtime/formkit/File.vue.d.ts +2 -0
  156. package/dist/runtime/formkit/FilePicker.vue +22 -25
  157. package/dist/runtime/formkit/FilePicker.vue.d.ts +2 -0
  158. package/dist/runtime/formkit/FileUpload.vue +22 -25
  159. package/dist/runtime/formkit/FileUpload.vue.d.ts +2 -0
  160. package/dist/runtime/formkit/Form.vue +79 -100
  161. package/dist/runtime/formkit/Form.vue.d.ts +2 -0
  162. package/dist/runtime/formkit/GroupSelect.vue +21 -27
  163. package/dist/runtime/formkit/GroupSelect.vue.d.ts +2 -0
  164. package/dist/runtime/formkit/Input.vue +53 -61
  165. package/dist/runtime/formkit/Input.vue.d.ts +2 -0
  166. package/dist/runtime/formkit/InputXlsx.vue +15 -18
  167. package/dist/runtime/formkit/InputXlsx.vue.d.ts +2 -0
  168. package/dist/runtime/formkit/OptionGroup.vue +20 -26
  169. package/dist/runtime/formkit/OptionGroup.vue.d.ts +2 -0
  170. package/dist/runtime/formkit/Radio.vue +15 -18
  171. package/dist/runtime/formkit/Radio.vue.d.ts +2 -0
  172. package/dist/runtime/formkit/Repeater.vue +62 -76
  173. package/dist/runtime/formkit/Repeater.vue.d.ts +2 -0
  174. package/dist/runtime/formkit/Select.vue +21 -29
  175. package/dist/runtime/formkit/Select.vue.d.ts +2 -0
  176. package/dist/runtime/formkit/TimePicker.vue +15 -19
  177. package/dist/runtime/formkit/TimePicker.vue.d.ts +2 -0
  178. package/dist/runtime/formkit/Toggle.vue +13 -16
  179. package/dist/runtime/formkit/Toggle.vue.d.ts +2 -0
  180. package/dist/runtime/light.d.ts +1129 -6
  181. package/dist/runtime/pages/CustomField/[custom_field_id]/edit.vue +24 -26
  182. package/dist/runtime/pages/CustomField/[custom_field_id]/edit.vue.d.ts +2 -0
  183. package/dist/runtime/pages/CustomField/index.vue +22 -29
  184. package/dist/runtime/pages/CustomField/index.vue.d.ts +2 -0
  185. package/dist/runtime/pages/EventLog/_eventlog_id/view.vue +8 -8
  186. package/dist/runtime/pages/EventLog/_eventlog_id/view.vue.d.ts +2 -0
  187. package/dist/runtime/pages/EventLog/index.vue +7 -6
  188. package/dist/runtime/pages/EventLog/index.vue.d.ts +2 -0
  189. package/dist/runtime/pages/FileManager/index.vue.d.ts +2 -0
  190. package/dist/runtime/pages/MailLog/index.vue +7 -6
  191. package/dist/runtime/pages/MailLog/index.vue.d.ts +2 -0
  192. package/dist/runtime/pages/Permission/add.vue +26 -29
  193. package/dist/runtime/pages/Permission/add.vue.d.ts +2 -0
  194. package/dist/runtime/pages/Permission/all.vue +57 -73
  195. package/dist/runtime/pages/Permission/all.vue.d.ts +2 -0
  196. package/dist/runtime/pages/Permission/export.vue +49 -62
  197. package/dist/runtime/pages/Permission/export.vue.d.ts +2 -0
  198. package/dist/runtime/pages/Permission/index.vue +19 -20
  199. package/dist/runtime/pages/Permission/index.vue.d.ts +2 -0
  200. package/dist/runtime/pages/Role/_name/update-child.vue +12 -14
  201. package/dist/runtime/pages/Role/_name/update-child.vue.d.ts +2 -0
  202. package/dist/runtime/pages/Role/add.vue +13 -15
  203. package/dist/runtime/pages/Role/add.vue.d.ts +2 -0
  204. package/dist/runtime/pages/Role/add2.vue +27 -38
  205. package/dist/runtime/pages/Role/add2.vue.d.ts +2 -0
  206. package/dist/runtime/pages/Role/index.vue +100 -127
  207. package/dist/runtime/pages/Role/index.vue.d.ts +2 -0
  208. package/dist/runtime/pages/System/database/backup.vue +28 -36
  209. package/dist/runtime/pages/System/database/backup.vue.d.ts +2 -0
  210. package/dist/runtime/pages/System/database/process.vue +33 -43
  211. package/dist/runtime/pages/System/database/process.vue.d.ts +2 -0
  212. package/dist/runtime/pages/System/database/table.vue +168 -205
  213. package/dist/runtime/pages/System/database/table.vue.d.ts +2 -0
  214. package/dist/runtime/pages/System/fs.vue +95 -107
  215. package/dist/runtime/pages/System/fs.vue.d.ts +2 -0
  216. package/dist/runtime/pages/System/index.vue +30 -31
  217. package/dist/runtime/pages/System/index.vue.d.ts +2 -0
  218. package/dist/runtime/pages/System/mailtest.vue +29 -35
  219. package/dist/runtime/pages/System/mailtest.vue.d.ts +2 -0
  220. package/dist/runtime/pages/System/menu/index.vue +175 -223
  221. package/dist/runtime/pages/System/menu/index.vue.d.ts +2 -0
  222. package/dist/runtime/pages/System/package.vue +21 -21
  223. package/dist/runtime/pages/System/package.vue.d.ts +2 -0
  224. package/dist/runtime/pages/System/phpinfo.vue +11 -10
  225. package/dist/runtime/pages/System/phpinfo.vue.d.ts +2 -0
  226. package/dist/runtime/pages/System/setting.vue +42 -59
  227. package/dist/runtime/pages/System/setting.vue.d.ts +2 -0
  228. package/dist/runtime/pages/System/test.vue.d.ts +2 -0
  229. package/dist/runtime/pages/System/view_as.vue +65 -68
  230. package/dist/runtime/pages/System/view_as.vue.d.ts +2 -0
  231. package/dist/runtime/pages/SystemValue/_systemvalue_id/edit.vue +7 -7
  232. package/dist/runtime/pages/SystemValue/_systemvalue_id/edit.vue.d.ts +2 -0
  233. package/dist/runtime/pages/SystemValue/add.vue.d.ts +2 -0
  234. package/dist/runtime/pages/SystemValue/index.vue +7 -6
  235. package/dist/runtime/pages/SystemValue/index.vue.d.ts +2 -0
  236. package/dist/runtime/pages/Translate/index.vue +81 -100
  237. package/dist/runtime/pages/Translate/index.vue.d.ts +2 -0
  238. package/dist/runtime/pages/User/_user_id/change-password.vue +38 -45
  239. package/dist/runtime/pages/User/_user_id/change-password.vue.d.ts +2 -0
  240. package/dist/runtime/pages/User/_user_id/edit.vue +35 -26
  241. package/dist/runtime/pages/User/_user_id/edit.vue.d.ts +2 -0
  242. package/dist/runtime/pages/User/_user_id/update-role.vue +33 -43
  243. package/dist/runtime/pages/User/_user_id/update-role.vue.d.ts +2 -0
  244. package/dist/runtime/pages/User/_user_id/view.vue +35 -37
  245. package/dist/runtime/pages/User/_user_id/view.vue.d.ts +2 -0
  246. package/dist/runtime/pages/User/add.vue +52 -60
  247. package/dist/runtime/pages/User/add.vue.d.ts +2 -0
  248. package/dist/runtime/pages/User/index.vue +23 -32
  249. package/dist/runtime/pages/User/index.vue.d.ts +2 -0
  250. package/dist/runtime/pages/User/profile.vue +52 -58
  251. package/dist/runtime/pages/User/profile.vue.d.ts +2 -0
  252. package/dist/runtime/pages/User/setting/bio-auth.vue +85 -95
  253. package/dist/runtime/pages/User/setting/bio-auth.vue.d.ts +2 -0
  254. package/dist/runtime/pages/User/setting/index.vue +27 -28
  255. package/dist/runtime/pages/User/setting/index.vue.d.ts +2 -0
  256. package/dist/runtime/pages/User/setting/information.vue +28 -27
  257. package/dist/runtime/pages/User/setting/information.vue.d.ts +2 -0
  258. package/dist/runtime/pages/User/setting/my_favorite.vue +29 -35
  259. package/dist/runtime/pages/User/setting/my_favorite.vue.d.ts +2 -0
  260. package/dist/runtime/pages/User/setting/open_id.vue +140 -165
  261. package/dist/runtime/pages/User/setting/open_id.vue.d.ts +2 -0
  262. package/dist/runtime/pages/User/setting/password.vue +37 -44
  263. package/dist/runtime/pages/User/setting/password.vue.d.ts +2 -0
  264. package/dist/runtime/pages/User/setting/style.vue +84 -102
  265. package/dist/runtime/pages/User/setting/style.vue.d.ts +2 -0
  266. package/dist/runtime/pages/User/setting/two-factor-auth.vue +51 -61
  267. package/dist/runtime/pages/User/setting/two-factor-auth.vue.d.ts +2 -0
  268. package/dist/runtime/pages/User/setting.vue +9 -9
  269. package/dist/runtime/pages/User/setting.vue.d.ts +2 -0
  270. package/dist/runtime/pages/UserLog/index.vue +7 -6
  271. package/dist/runtime/pages/UserLog/index.vue.d.ts +2 -0
  272. package/dist/types.d.mts +3 -1
  273. package/package.json +9 -11
  274. package/dist/module.cjs +0 -5
  275. package/dist/module.d.ts +0 -7
  276. package/dist/types.d.ts +0 -1
@@ -1,10 +1,11 @@
1
- <script setup>
2
- const props = defineProps({
3
- test: String
4
- })
5
- </script>
6
- <template>
1
+ <script setup>
2
+ const props = defineProps({
3
+ test: String
4
+ });
5
+ </script>
6
+
7
+ <template>
7
8
  <div>
8
9
  {{ props }}
9
10
  </div>
10
- </template>
11
+ </template>
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -1,15 +1,16 @@
1
- <script setup>
2
- const props = defineProps({
3
- label: {
4
- type: String,
5
- default: "Add"
6
- },
7
- to: String,
8
- color: String
9
- });
10
- </script>
11
- <template>
1
+ <script setup>
2
+ const props = defineProps({
3
+ label: {
4
+ type: String,
5
+ default: "Add"
6
+ },
7
+ to: String,
8
+ color: String
9
+ });
10
+ </script>
11
+
12
+ <template>
12
13
  <l-btn icon="sym_o_add" v-bind="$props" :to="to ?? $route.path + '/add'">
13
14
  <q-tooltip>{{ $t(label) }}</q-tooltip>
14
15
  </l-btn>
15
- </template>
16
+ </template>
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -1,31 +1,27 @@
1
- <script setup>
2
-
3
- import { computed } from 'vue'
4
-
5
- const props = defineProps({
6
- type: {
7
- type: String,
8
- default: 'info' //info, warning, negative, positive
9
- }
10
- })
11
-
12
-
13
- const icon = computed(() => {
14
- switch (props.type) {
15
- case 'info':
16
- return 'sym_o_info'
17
- case 'warning':
18
- return 'sym_o_warning'
19
- case 'negative':
20
- return 'sym_o_error'
21
- case 'positive':
22
- return 'sym_o_check_circle_outline'
23
- }
24
- })
25
-
26
- </script>
27
-
28
- <template>
1
+ <script setup>
2
+ import { computed } from "vue";
3
+ const props = defineProps({
4
+ type: {
5
+ type: String,
6
+ default: "info"
7
+ //info, warning, negative, positive
8
+ }
9
+ });
10
+ const icon = computed(() => {
11
+ switch (props.type) {
12
+ case "info":
13
+ return "sym_o_info";
14
+ case "warning":
15
+ return "sym_o_warning";
16
+ case "negative":
17
+ return "sym_o_error";
18
+ case "positive":
19
+ return "sym_o_check_circle_outline";
20
+ }
21
+ });
22
+ </script>
23
+
24
+ <template>
29
25
  <q-item :class="`bg-${type}`">
30
26
  <q-item-section avatar>
31
27
  <q-icon :name="icon" class="text-white" />
@@ -34,4 +30,4 @@ const icon = computed(() => {
34
30
  <slot></slot>
35
31
  </q-item-section>
36
32
  </q-item>
37
- </template>
33
+ </template>
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -1,298 +1,230 @@
1
- <script setup lang="ts">
2
- import { useRoute, useRouter } from 'vue-router';
3
- import { useLight, q, m } from "#imports";
4
- import { useQuasar } from 'quasar';
5
- import { useI18n } from 'vue-i18n';
6
- import { ref, computed, reactive, provide, watch, toRaw } from 'vue';
7
- import { useRuntimeConfig } from 'nuxt/app';
8
- import { api, } from '#imports';
9
-
10
-
11
- const emits = defineEmits(["logout"]);
12
- const $q = useQuasar();
13
- $q.loading.show()
14
-
15
- const config = useRuntimeConfig();
16
-
17
- const appVersion = config.public.appVersion ?? '0.0.1';
18
-
19
- const tt = await q({
20
- system: {
21
- devMode: true,
22
- time: true,
23
- storage: {
24
- freeSpace: true,
25
- usageSpace: true,
26
- totalSpace: true,
27
- }
28
- },
29
- app: {
30
- menus: true,
31
- viewAsMode: true,
32
- languages: true,
33
- copyrightName: true,
34
- copyrightYear: true,
35
- hasFavorite: true,
36
- i18nMessages: {
37
- name: true,
38
- value: true
39
- }
40
- }, my: {
41
- username: true,
42
- first_name: true,
43
- last_name: true,
44
- roles: true,
45
- styles: true,
46
- language: true,
47
- permissions: true,
48
- default_page: true,
49
- myFavorites: {
50
- my_favorite_id: true,
51
- label: true,
52
- path: true,
53
- icon: true
54
- }
55
- }
56
- })
57
-
58
-
59
- let app = tt.app
60
- let my = reactive(tt.my)
61
-
62
- const light = useLight();
63
-
64
- light.devMode = tt.system.devMode;
65
-
66
- light.init(my.styles);
67
-
68
- //set permission
69
- light.setPermissions(my.permissions);
70
-
71
- light.setMyFavorites(toRaw(my.myFavorites))
72
-
73
- const myFavorites = computed(() => {
74
- return light.getMyFavorites();
75
- });
76
-
77
- const myFavoritesCount = computed(() => {
78
- return light.getMyFavorites().length;
79
- });
80
-
81
- $q.dark.set(light.isDarkMode());
82
-
83
- const i18n = useI18n();
84
- i18n.locale = my.language || 'en';
85
-
86
- let system = tt.system;
87
-
88
- // message
89
- let messages = i18n.messages.value[i18n.locale];
90
- for (let t of app.i18nMessages) {
91
- messages[t.name] = t.value;
92
- }
93
- i18n.setLocaleMessage(i18n.locale, messages);
94
-
95
- //menu
96
- const menus = ref(app.menus)
97
-
98
-
99
- const leftDrawerOpen = ref(false)
100
- const rightDrawerOpen = ref(false)
101
-
102
- const toggleLeftDrawer = () => {
103
- leftDrawerOpen.value = !leftDrawerOpen.value
104
- }
105
-
106
- const toggleRightDrawer = () => {
107
- rightDrawerOpen.value = !rightDrawerOpen.value
108
- }
109
-
110
- let showViewAs = false;
111
- if (my && my.roles.indexOf('Administrators') != -1) {
112
- showViewAs = true;
113
- light.isAdmin = true;
114
- }
115
-
116
- const layoutView = computed(() => {
117
- let s = ''
118
- s += style.menuOverlayHeader ? 'l' : 'h'
119
- s += 'Hh LpR lFr'
120
- return s
121
- })
122
-
123
- const style = reactive({
124
- miniState: my.styles?.miniState || false,
125
- dense: my.styles?.dense || false,
126
- footer: my.styles?.footer || false,
127
- menuOverlayHeader: my.styles?.menuOverlayHeader || false
128
- });
129
-
130
- const isMouseOnDrawer = ref(false)
131
-
132
- const isMini = computed(() => {
133
- if (isMouseOnDrawer.value) {
134
- return false
135
- }
136
- if (style.miniState) {
137
- return true
138
- }
139
- return false
140
- })
141
-
142
- const menuDark = computed(() => {
143
-
144
- if (light.theme == 'dark') {
145
- return true
146
- }
147
- if (light.theme == 'semi-dark') {
148
- return true
149
- }
150
- return false
151
- })
152
-
153
- const languages = app.languages;
154
-
155
- const onChangeLocale = async (locale) => {
156
-
157
- localStorage.setItem("locale", locale);
158
- await m("updateMyLanguage", { name: locale })
159
- window.location.reload();
160
- }
161
-
162
-
163
- const reloadMenu = async () => {
164
- //menus.value = app.menus;
165
- let app = await q("app", ["menus"]);
166
- menus.value = app.menus
167
- }
168
-
169
- provide('reloadMenu', reloadMenu)
170
-
171
- watch(() => style.footer, async (value) => await light.setStyle("footer", value))
172
- watch(() => style.dense, async (value) => await light.setStyle("dense", value))
173
-
174
-
175
- watch(() => light.theme, async () => {
176
- $q.dark.set(light.isDarkMode());
177
- })
178
-
179
- watch(() => style.menuOverlayHeader, async (value) => {
180
- await light.setStyle("menuOverlayHeader", value)
181
- })
182
-
183
- watch(() => style.miniState, async (value) => {
184
- await m("updateMyStyle", {
185
- name: "miniState",
186
- value: value
187
- })
188
- });
189
-
190
- const exitViewAs = async () => {
191
- await m("cancelViewAs");
192
- window.location.reload();
193
- }
194
-
195
- const storageColor = computed(() => {
196
- if (system.storage) {
197
- const percent = system.storage.freeSpace / system.storage.totalSpace;
198
- if (percent < 0.05) {
199
- return "negative"
200
- }
201
- if (percent < 0.1) {
202
- return "warning"
203
- }
204
- }
205
- })
206
-
207
- const containerClass = computed(() => {
208
- return (light.theme == 'dark') ? {} : { 'bg-grey-2': true }
209
- })
210
-
211
- const containerStyle = computed(() => {
212
- if (light.theme == 'dark') {
213
- return {};
214
- }
215
- return {
216
- color: '#1f1f1f'
217
- }
218
- })
219
-
220
- const route = useRoute()
221
- const router = useRouter()
222
-
223
-
224
- const onToggleFav = async () => {
225
-
226
- if (isFav.value) {
227
- await m("removeMyFavorite", {
228
- path: route.fullPath,
229
- })
230
-
231
- //reload my.myFavorites
232
- light.reloadMyFavorites();
233
- return;
234
- }
235
-
236
- light.dialog({
237
- title: 'Add to favorite',
238
- message: 'Enter favorite label',
239
- prompt: {
240
- //get window title, remove - and replace with space
241
- model: route.name.replace(/-/g, ' '),
242
- isValid: (val) => val !== '',
243
- },
244
- cancel: true,
245
- persistent: true,
246
- }).onOk(async (data) => {
247
- if (await m("addMyFavorite", {
248
- path: route.fullPath,
249
- label: data,
250
- })) {
251
- light.reloadMyFavorites();
252
- }
253
- })
254
- }
255
-
256
- const isFav = computed(() => {
257
- //check my.myFavorites
258
- let fav = my.myFavorites.find((item) => {
259
- return item.path == route.fullPath;
260
- })
261
- return fav;
262
- })
263
-
264
- $q.loading.hide()
265
-
266
- const menuWidth = ref(my.styles.menuWidth || 280);
267
-
268
- watch(menuWidth, () => {
269
- light.setStyle("menuWidth", menuWidth.value)
270
- })
271
-
272
- const c1 = computed(() => {
273
- return light.getColorValue()
274
- })
275
-
276
- if (route.fullPath == "/" && my.default_page) {
277
- router.push(my.default_page);
278
-
279
- }
280
-
281
- const onLogout = async () => {
282
- await api.auth.logout();
283
- emits('logout');
284
- }
285
-
286
- </script>
287
-
288
-
289
-
1
+ <script setup>
2
+ import { useRoute, useRouter } from "vue-router";
3
+ import { useLight, q, m } from "#imports";
4
+ import { useQuasar } from "quasar";
5
+ import { useI18n } from "vue-i18n";
6
+ import { ref, computed, reactive, provide, watch, toRaw } from "vue";
7
+ import { useRuntimeConfig } from "nuxt/app";
8
+ import { api } from "#imports";
9
+ const emits = defineEmits(["logout"]);
10
+ const $q = useQuasar();
11
+ $q.loading.show();
12
+ const config = useRuntimeConfig();
13
+ const appVersion = config.public.appVersion ?? "0.0.1";
14
+ const tt = await q({
15
+ system: {
16
+ devMode: true,
17
+ time: true,
18
+ storage: {
19
+ freeSpace: true,
20
+ usageSpace: true,
21
+ totalSpace: true
22
+ }
23
+ },
24
+ app: {
25
+ menus: true,
26
+ viewAsMode: true,
27
+ languages: true,
28
+ copyrightName: true,
29
+ copyrightYear: true,
30
+ hasFavorite: true,
31
+ i18nMessages: {
32
+ name: true,
33
+ value: true
34
+ }
35
+ },
36
+ my: {
37
+ username: true,
38
+ first_name: true,
39
+ last_name: true,
40
+ roles: true,
41
+ styles: true,
42
+ language: true,
43
+ permissions: true,
44
+ default_page: true,
45
+ myFavorites: {
46
+ my_favorite_id: true,
47
+ label: true,
48
+ path: true,
49
+ icon: true
50
+ }
51
+ }
52
+ });
53
+ let app = tt.app;
54
+ let my = reactive(tt.my);
55
+ const light = useLight();
56
+ light.devMode = tt.system.devMode;
57
+ light.init(my.styles);
58
+ light.setPermissions(my.permissions);
59
+ light.setMyFavorites(toRaw(my.myFavorites));
60
+ const myFavorites = computed(() => {
61
+ return light.getMyFavorites();
62
+ });
63
+ const myFavoritesCount = computed(() => {
64
+ return light.getMyFavorites().length;
65
+ });
66
+ $q.dark.set(light.isDarkMode());
67
+ const i18n = useI18n();
68
+ i18n.locale = my.language || "en";
69
+ let system = tt.system;
70
+ let messages = i18n.messages.value[i18n.locale];
71
+ for (let t of app.i18nMessages) {
72
+ messages[t.name] = t.value;
73
+ }
74
+ i18n.setLocaleMessage(i18n.locale, messages);
75
+ const menus = ref(app.menus);
76
+ const leftDrawerOpen = ref(false);
77
+ const rightDrawerOpen = ref(false);
78
+ const toggleLeftDrawer = () => {
79
+ leftDrawerOpen.value = !leftDrawerOpen.value;
80
+ };
81
+ const toggleRightDrawer = () => {
82
+ rightDrawerOpen.value = !rightDrawerOpen.value;
83
+ };
84
+ let showViewAs = false;
85
+ if (my && my.roles.indexOf("Administrators") != -1) {
86
+ showViewAs = true;
87
+ light.isAdmin = true;
88
+ }
89
+ const layoutView = computed(() => {
90
+ let s = "";
91
+ s += style.menuOverlayHeader ? "l" : "h";
92
+ s += "Hh LpR lFr";
93
+ return s;
94
+ });
95
+ const style = reactive({
96
+ miniState: my.styles?.miniState || false,
97
+ dense: my.styles?.dense || false,
98
+ footer: my.styles?.footer || false,
99
+ menuOverlayHeader: my.styles?.menuOverlayHeader || false
100
+ });
101
+ const isMouseOnDrawer = ref(false);
102
+ const isMini = computed(() => {
103
+ if (isMouseOnDrawer.value) {
104
+ return false;
105
+ }
106
+ if (style.miniState) {
107
+ return true;
108
+ }
109
+ return false;
110
+ });
111
+ const menuDark = computed(() => {
112
+ if (light.theme == "dark") {
113
+ return true;
114
+ }
115
+ if (light.theme == "semi-dark") {
116
+ return true;
117
+ }
118
+ return false;
119
+ });
120
+ const languages = app.languages;
121
+ const onChangeLocale = async (locale) => {
122
+ localStorage.setItem("locale", locale);
123
+ await m("updateMyLanguage", { name: locale });
124
+ window.location.reload();
125
+ };
126
+ const reloadMenu = async () => {
127
+ let app2 = await q("app", ["menus"]);
128
+ menus.value = app2.menus;
129
+ };
130
+ provide("reloadMenu", reloadMenu);
131
+ watch(() => style.footer, async (value) => await light.setStyle("footer", value));
132
+ watch(() => style.dense, async (value) => await light.setStyle("dense", value));
133
+ watch(() => light.theme, async () => {
134
+ $q.dark.set(light.isDarkMode());
135
+ });
136
+ watch(() => style.menuOverlayHeader, async (value) => {
137
+ await light.setStyle("menuOverlayHeader", value);
138
+ });
139
+ watch(() => style.miniState, async (value) => {
140
+ await m("updateMyStyle", {
141
+ name: "miniState",
142
+ value
143
+ });
144
+ });
145
+ const exitViewAs = async () => {
146
+ await m("cancelViewAs");
147
+ window.location.reload();
148
+ };
149
+ const storageColor = computed(() => {
150
+ if (system.storage) {
151
+ const percent = system.storage.freeSpace / system.storage.totalSpace;
152
+ if (percent < 0.05) {
153
+ return "negative";
154
+ }
155
+ if (percent < 0.1) {
156
+ return "warning";
157
+ }
158
+ }
159
+ });
160
+ const containerClass = computed(() => {
161
+ return light.theme == "dark" ? {} : { "bg-grey-2": true };
162
+ });
163
+ const containerStyle = computed(() => {
164
+ if (light.theme == "dark") {
165
+ return {};
166
+ }
167
+ return {
168
+ color: "#1f1f1f"
169
+ };
170
+ });
171
+ const route = useRoute();
172
+ const router = useRouter();
173
+ const onToggleFav = async () => {
174
+ if (isFav.value) {
175
+ await m("removeMyFavorite", {
176
+ path: route.fullPath
177
+ });
178
+ light.reloadMyFavorites();
179
+ return;
180
+ }
181
+ light.dialog({
182
+ title: "Add to favorite",
183
+ message: "Enter favorite label",
184
+ prompt: {
185
+ //get window title, remove - and replace with space
186
+ model: route.name.replace(/-/g, " "),
187
+ isValid: (val) => val !== ""
188
+ },
189
+ cancel: true,
190
+ persistent: true
191
+ }).onOk(async (data) => {
192
+ if (await m("addMyFavorite", {
193
+ path: route.fullPath,
194
+ label: data
195
+ })) {
196
+ light.reloadMyFavorites();
197
+ }
198
+ });
199
+ };
200
+ const isFav = computed(() => {
201
+ let fav = my.myFavorites.find((item) => {
202
+ return item.path == route.fullPath;
203
+ });
204
+ return fav;
205
+ });
206
+ $q.loading.hide();
207
+ const menuWidth = ref(my.styles.menuWidth || 280);
208
+ watch(menuWidth, () => {
209
+ light.setStyle("menuWidth", menuWidth.value);
210
+ });
211
+ const c1 = computed(() => {
212
+ return light.getColorValue();
213
+ });
214
+ if (route.fullPath == "/" && my.default_page) {
215
+ router.push(my.default_page);
216
+ }
217
+ const onLogout = async () => {
218
+ await api.auth.logout();
219
+ emits("logout");
220
+ };
221
+ </script>
222
+
290
223
  <style scoped>
291
224
  .q-layout__section--marginal{background-color:v-bind(c1)}
292
- </style>
293
-
294
-
295
- <template>
225
+ </style>
226
+
227
+ <template>
296
228
  <q-layout :view="layoutView">
297
229
  <q-header bordered class="text-white" :class="`bg-${light.color}`">
298
230
  <q-toolbar>
@@ -464,4 +396,4 @@ const onLogout = async () => {
464
396
  </q-item>
465
397
  </q-footer>
466
398
  </q-layout>
467
- </template>
399
+ </template>
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;