@hostlink/nuxt-light 1.27.8 → 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 -37
  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,139 +1,103 @@
1
- <script setup>
2
- import { useQuasar } from "quasar"
3
- import { computed, ref, reactive } from "vue";
4
- import { q, m } from "#imports";
5
-
6
- import * as Diff2Html from 'diff2html';
7
- import 'diff2html/bundles/css/diff2html.min.css';
8
-
9
- const quasar = useQuasar();
10
- /* const diffs = '--- a/server/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go\n+++ b/server/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go\n@@ -1035,6 +1035,17 @@ func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (\n \n // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n \n+func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {\n+\tr0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))\n+\tn = int(r0)\n+\tif e1 != 0 {\n+\t\terr = errnoErr(e1)\n+\t}\n+\treturn\n+}\n+\n+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n+\n func read(fd int, p []byte) (n int, err error) {\n \tvar _p0 unsafe.Pointer\n \tif len(p) > 0 {\n';
11
- const html = Diff2Html.html(diffs, {
12
- drawFileList: true,
13
- matching: 'lines',
14
- outputFormat: 'side-by-side',
15
- });
16
- */
17
-
18
- const props = defineProps({
19
- modelId: {
20
- type: String,
21
- required: true
22
- },
23
- modelClass: {
24
- type: String,
25
- required: true
26
- }
27
- });
28
-
29
-
30
- const { revisionsByModel } = await q({
31
- "revisionsByModel": {
32
- __args: {
33
- model_id: parseInt(props.modelId),
34
- model_class: props.modelClass
35
- },
36
- revision_id: true,
37
- revisionBy: true,
38
- createdTime: true,
39
- content: true,
40
- delta: true,
41
- diff: true
42
- }
43
- })
44
-
45
-
46
- const num_of_revisions = computed(() => {
47
- return revisionsByModel.length;
48
- })
49
-
50
- const showDialog = ref(false);
51
-
52
- const selectedRevision = ref(null);
53
- const onClick = (revision) => {
54
- selectedRevision.value = revision;
55
-
56
- showDialog.value = true;
57
- }
58
-
59
- const onRestore = () => {
60
- //confirm restore
61
- quasar.dialog({
62
- title: 'Restore',
63
- message: 'Are you sure you want to restore selected fields?',
64
- ok: 'Yes',
65
- cancel: 'No'
66
- }).onOk(async () => {
67
- //restore
68
- if (await m("restoreRevision", {
69
- revision_id: selectedRevision.value.revision_id,
70
- fields: restore_fields.value
71
- })) {
72
- quasar.notify({
73
- message: 'Restored successfully',
74
- color: 'positive'
75
- })
76
-
77
- //reload
78
- window.location.reload();
79
-
80
- }
81
-
82
-
83
- })
84
-
85
- }
86
-
87
- const restore_fields = ref([]);
88
-
89
- const onToggleAll = () => {
90
- if (restore_fields.value.length === 0) {
91
- restore_fields.value = Object.keys(getFilteredContent.value);
92
- } else {
93
- restore_fields.value = [];
94
- }
95
- }
96
-
97
- const isCheckedAll = computed(() => {
98
- return restore_fields.value.length === Object.keys(getFilteredContent.value).length;
99
- })
100
-
101
- const isAllowRestore = computed(() => {
102
- return restore_fields.value.length > 0;
103
- })
104
- const showOnlyDelta = ref(false);
105
-
106
- const getFilteredContent = computed(() => {
107
- if (showOnlyDelta.value) {
108
- const contents = {};
109
-
110
- for (const key in selectedRevision.value.delta) {
111
- contents[key] = selectedRevision.value.content[key];
112
- }
113
-
114
- return contents;
115
- } else {
116
- return selectedRevision.value.content;
117
- }
118
- })
119
-
120
- const outputFormat = ref('side-by-side');
121
- const getDiffHtml = (diffs) => {
122
- if (!diffs) {
123
- return '';
124
- }
125
- return Diff2Html.html(diffs, {
126
- drawFileList: false,
127
- matching: 'lines',
128
- outputFormat: outputFormat.value,
129
- highlight: true
130
- });
131
- }
132
-
133
-
134
- </script>
135
-
136
- <template>
1
+ <script setup>
2
+ import { useQuasar } from "quasar";
3
+ import { computed, ref, reactive } from "vue";
4
+ import { q, m } from "#imports";
5
+ import * as Diff2Html from "diff2html";
6
+ import "diff2html/bundles/css/diff2html.min.css";
7
+ const quasar = useQuasar();
8
+ const props = defineProps({
9
+ modelId: {
10
+ type: String,
11
+ required: true
12
+ },
13
+ modelClass: {
14
+ type: String,
15
+ required: true
16
+ }
17
+ });
18
+ const { revisionsByModel } = await q({
19
+ "revisionsByModel": {
20
+ __args: {
21
+ model_id: parseInt(props.modelId),
22
+ model_class: props.modelClass
23
+ },
24
+ revision_id: true,
25
+ revisionBy: true,
26
+ createdTime: true,
27
+ content: true,
28
+ delta: true,
29
+ diff: true
30
+ }
31
+ });
32
+ const num_of_revisions = computed(() => {
33
+ return revisionsByModel.length;
34
+ });
35
+ const showDialog = ref(false);
36
+ const selectedRevision = ref(null);
37
+ const onClick = (revision) => {
38
+ selectedRevision.value = revision;
39
+ showDialog.value = true;
40
+ };
41
+ const onRestore = () => {
42
+ quasar.dialog({
43
+ title: "Restore",
44
+ message: "Are you sure you want to restore selected fields?",
45
+ ok: "Yes",
46
+ cancel: "No"
47
+ }).onOk(async () => {
48
+ if (await m("restoreRevision", {
49
+ revision_id: selectedRevision.value.revision_id,
50
+ fields: restore_fields.value
51
+ })) {
52
+ quasar.notify({
53
+ message: "Restored successfully",
54
+ color: "positive"
55
+ });
56
+ window.location.reload();
57
+ }
58
+ });
59
+ };
60
+ const restore_fields = ref([]);
61
+ const onToggleAll = () => {
62
+ if (restore_fields.value.length === 0) {
63
+ restore_fields.value = Object.keys(getFilteredContent.value);
64
+ } else {
65
+ restore_fields.value = [];
66
+ }
67
+ };
68
+ const isCheckedAll = computed(() => {
69
+ return restore_fields.value.length === Object.keys(getFilteredContent.value).length;
70
+ });
71
+ const isAllowRestore = computed(() => {
72
+ return restore_fields.value.length > 0;
73
+ });
74
+ const showOnlyDelta = ref(false);
75
+ const getFilteredContent = computed(() => {
76
+ if (showOnlyDelta.value) {
77
+ const contents = {};
78
+ for (const key in selectedRevision.value.delta) {
79
+ contents[key] = selectedRevision.value.content[key];
80
+ }
81
+ return contents;
82
+ } else {
83
+ return selectedRevision.value.content;
84
+ }
85
+ });
86
+ const outputFormat = ref("side-by-side");
87
+ const getDiffHtml = (diffs) => {
88
+ if (!diffs) {
89
+ return "";
90
+ }
91
+ return Diff2Html.html(diffs, {
92
+ drawFileList: false,
93
+ matching: "lines",
94
+ outputFormat: outputFormat.value,
95
+ highlight: true
96
+ });
97
+ };
98
+ </script>
99
+
100
+ <template>
137
101
  <div>
138
102
 
139
103
  <q-dialog v-model="showDialog" full-height full-width>
@@ -229,4 +193,4 @@ const getDiffHtml = (diffs) => {
229
193
  </q-list>
230
194
  </l-card>
231
195
  </div>
232
- </template>
196
+ </template>
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -1,32 +1,28 @@
1
- <script setup>
2
- import { computed } from 'vue';
3
- import { format } from "quasar"
4
- const { humanStorageSize } = format
5
- const props = defineProps({
6
- storage: {
7
- type: Object,
8
- required: true
9
- },
10
- })
11
-
12
-
13
- const usagePercent = computed(() => {
14
- //return 0.0 to 1.0
15
- return (props.storage.totalSpace - props.storage.freeSpace) / props.storage.totalSpace;
16
- })
17
-
18
- const progressColor = computed(() => {
19
- if (usagePercent.value > 0.95) {
20
- return "negative"
21
- }
22
- if (usagePercent.value > 0.9) {
23
- return "warning"
24
- }
25
- return "primary"
26
- })
27
-
28
- </script>
29
- <template>
1
+ <script setup>
2
+ import { computed } from "vue";
3
+ import { format } from "quasar";
4
+ const { humanStorageSize } = format;
5
+ const props = defineProps({
6
+ storage: {
7
+ type: Object,
8
+ required: true
9
+ }
10
+ });
11
+ const usagePercent = computed(() => {
12
+ return (props.storage.totalSpace - props.storage.freeSpace) / props.storage.totalSpace;
13
+ });
14
+ const progressColor = computed(() => {
15
+ if (usagePercent.value > 0.95) {
16
+ return "negative";
17
+ }
18
+ if (usagePercent.value > 0.9) {
19
+ return "warning";
20
+ }
21
+ return "primary";
22
+ });
23
+ </script>
24
+
25
+ <template>
30
26
  <q-card>
31
27
  <q-card-section>
32
28
  {{ $t("Storage") }}
@@ -34,4 +30,4 @@ const progressColor = computed(() => {
34
30
  {{ $t('storage_usage', [humanStorageSize(storage.freeSpace), humanStorageSize(storage.totalSpace)]) }}
35
31
  </q-card-section>
36
32
  </q-card>
37
- </template>
33
+ </template>
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -1,46 +1,24 @@
1
- <script setup lang="ts">
2
- import { useLight, m } from "#imports"
3
- const light = useLight()
4
-
5
-
6
- export interface LSystemSettingAuthenticationProps {
7
- authentication_password_based: string,
8
- authentication_google_client_id: string,
9
- authentication_facebook_app_id: string,
10
- authentication_microsoft_client_id: string,
11
- authentication_microsoft_tenant_id: string
12
- }
13
-
14
-
15
- withDefaults(defineProps<LSystemSettingAuthenticationProps>(), {
16
- authentication_password_based: "1",
17
- authentication_google_client_id: "",
18
- authentication_facebook_app_id: "",
19
- authentication_microsoft_client_id: "",
20
- authentication_microsoft_tenant_id: "",
21
- })
22
-
23
- const emits = defineEmits(["submit"])
24
-
25
- const onSubmit = async (d: LSystemSettingAuthenticationProps) => {
26
-
27
- //at least one authentication method should be enabled
28
- if (d.authentication_password_based === "0" && !d.authentication_google_client_id && !d.authentication_facebook_app_id && !d.authentication_microsoft_client_id) {
29
-
30
- light.notify({ message: "At least one authentication method should be enabled", color: "negative" })
31
- return
32
-
33
- }
34
-
35
-
36
-
37
- emits("submit", d)
38
- }
39
-
40
- </script>
41
- <template>
42
-
43
-
1
+ <script setup>
2
+ import { useLight, m } from "#imports";
3
+ const light = useLight();
4
+ defineProps({
5
+ authentication_password_based: { type: String, required: true, default: "1" },
6
+ authentication_google_client_id: { type: String, required: true, default: "" },
7
+ authentication_facebook_app_id: { type: String, required: true, default: "" },
8
+ authentication_microsoft_client_id: { type: String, required: true, default: "" },
9
+ authentication_microsoft_tenant_id: { type: String, required: true, default: "" }
10
+ });
11
+ const emits = defineEmits(["submit"]);
12
+ const onSubmit = async (d) => {
13
+ if (d.authentication_password_based === "0" && !d.authentication_google_client_id && !d.authentication_facebook_app_id && !d.authentication_microsoft_client_id) {
14
+ light.notify({ message: "At least one authentication method should be enabled", color: "negative" });
15
+ return;
16
+ }
17
+ emits("submit", d);
18
+ };
19
+ </script>
20
+
21
+ <template>
44
22
  <form-kit type="l-form" :bordered="false" @submit="onSubmit" :value="$props">
45
23
 
46
24
  <form-kit label="Password based" type="l-checkbox" name="authentication_password_based" true-value="1"
@@ -54,4 +32,4 @@ const onSubmit = async (d: LSystemSettingAuthenticationProps) => {
54
32
  <form-kit label="Microsoft Client ID" type="l-input" name="authentication_microsoft_client_id" />
55
33
  <form-kit label="Microsoft Tenant ID" type="l-input" name="authentication_microsoft_tenant_id" />
56
34
  </form-kit>
57
- </template>
35
+ </template>
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -1,68 +1,52 @@
1
- <script setup lang="ts">
2
- import { q, m } from '#imports'
3
- import { useQuasar } from 'quasar'
4
-
5
- const $q = useQuasar()
6
-
7
-
8
- export interface LSystemSettingDeveloperProps {
9
- mode: string,
10
- custom_field_models: string,
11
- }
12
-
13
- const modelValue = defineModel<LSystemSettingDeveloperProps>({
14
- required: true,
15
- })
16
-
17
- if (modelValue.value.mode != 'prod') {
18
- modelValue.value.mode = 'dev'
19
- } else {
20
- modelValue.value.mode = 'prod'
21
- }
22
-
23
- //split the custom_field_models by comma
24
- if (modelValue.value.custom_field_models) {
25
- modelValue.value.custom_field_models = modelValue.value.custom_field_models.split(',')
26
- } else {
27
- modelValue.value.custom_field_models = []
28
- }
29
-
30
-
31
- const onSubmit = async (d: LSystemSettingDeveloperProps) => {
32
- let data: { name: string, value: string }[] = [];
33
- Object.keys(d).forEach((key) => {
34
- data.push({
35
- name: key,
36
- value: d[key as keyof LSystemSettingDeveloperProps]
37
- })
38
- })
39
- await m("updateAppConfigs", { data })
40
- //update the modelValue
41
- Object.keys(d).forEach((key) => {
42
- modelValue.value[key as keyof LSystemSettingDeveloperProps] = d[key as keyof LSystemSettingDeveloperProps]
43
- })
44
-
45
- $q.notify({ message: "Settings saved", color: "positive" })
46
- }
47
-
48
- </script>
49
- <template>
50
- <FormKit type="l-form" :bordered="false" :value="{
51
- mode: modelValue.mode,
52
- custom_field_models: modelValue.custom_field_models
53
- }" @submit="onSubmit" #default="{ value }">
1
+ <script setup>
2
+ import { q, m } from "#imports";
3
+ import { useQuasar } from "quasar";
4
+ const $q = useQuasar();
5
+ const modelValue = defineModel({ type: Object, ...{
6
+ required: true
7
+ } });
8
+ if (modelValue.value.mode != "prod") {
9
+ modelValue.value.mode = "dev";
10
+ } else {
11
+ modelValue.value.mode = "prod";
12
+ }
13
+ if (modelValue.value.custom_field_models) {
14
+ modelValue.value.custom_field_models = modelValue.value.custom_field_models.split(",");
15
+ } else {
16
+ modelValue.value.custom_field_models = [];
17
+ }
18
+ const onSubmit = async (d) => {
19
+ let data = [];
20
+ Object.keys(d).forEach((key) => {
21
+ data.push({
22
+ name: key,
23
+ value: d[key]
24
+ });
25
+ });
26
+ await m("updateAppConfigs", { data });
27
+ Object.keys(d).forEach((key) => {
28
+ modelValue.value[key] = d[key];
29
+ });
30
+ $q.notify({ message: "Settings saved", color: "positive" });
31
+ };
32
+ </script>
33
+
34
+ <template>
35
+ <FormKit type="l-form" :bordered="false" :value="{
36
+ mode: modelValue.mode,
37
+ custom_field_models: modelValue.custom_field_models
38
+ }" @submit="onSubmit" #default="{ value }">
54
39
 
55
40
  <form-kit type="l-select" name="custom_field_models" label="Custom Field Model" use-input use-chips multiple
56
41
  hide-dropdown-icon input-debounce="0" new-value-mode="add-unique" />
57
42
 
58
- <FormKit label="Mode" type="l-select" :options="[
59
- { label: 'Production', value: 'prod' },
60
- { label: 'Development', value: 'dev' },
61
-
62
- ]" name="mode" validation="required">
43
+ <FormKit label="Mode" type="l-select" :options="[
44
+ { label: 'Production', value: 'prod' },
45
+ { label: 'Development', value: 'dev' }
46
+ ]" name="mode" validation="required">
63
47
 
64
48
  </FormKit>
65
49
 
66
50
 
67
51
  </FormKit>
68
- </template>
52
+ </template>
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -1,60 +1,44 @@
1
- <script setup lang="ts">
2
-
3
- import { q, m } from '#imports'
4
- import { useQuasar } from 'quasar'
5
- const $q = useQuasar()
6
-
7
- export type LSystemSettingForgetPasswordProps = {
8
- forget_password_enabled: string,
9
- forget_password_subject: string,
10
- forget_password_template: string,
11
- }
12
-
13
- const modelValue = defineModel<LSystemSettingForgetPasswordProps>({
14
- required: true,
15
- })
16
-
17
- if (modelValue.value.forget_password_enabled != "0") {
18
- modelValue.value.forget_password_enabled = "1"
19
- }
20
-
21
- if (!modelValue.value.forget_password_subject) {
22
- modelValue.value.forget_password_subject = "Password Reset Code"
23
- }
24
-
25
- if (!modelValue.value.forget_password_template) {
26
- modelValue.value.forget_password_template = "Your password reset code is: {code}"
27
- }
28
-
29
-
30
- const onSubmit = async (d: any) => {
31
- let data: any = [];
32
- Object.keys(d).forEach((key) => {
33
- if (d[key] === undefined) {
34
- d[key] = ""
35
- }
36
-
37
- data.push({
38
- name: key,
39
- value: d[key]
40
- })
41
- })
42
- await m("updateAppConfigs", { data })
43
-
44
- modelValue.value.forget_password_enabled = d.forget_password_enabled
45
- modelValue.value.forget_password_subject = d.forget_password_subject
46
- modelValue.value.forget_password_template = d.forget_password_template
47
-
48
- $q.notify({ message: "Settings saved", color: "positive" })
49
- }
50
-
51
- </script>
52
- <template>
53
- <form-kit type="l-form" :value="{
54
- forget_password_enabled: modelValue.forget_password_enabled,
55
- forget_password_subject: modelValue.forget_password_subject,
56
- forget_password_template: modelValue.forget_password_template,
57
- }" @submit="onSubmit">
1
+ <script setup>
2
+ import { q, m } from "#imports";
3
+ import { useQuasar } from "quasar";
4
+ const $q = useQuasar();
5
+ const modelValue = defineModel({ type: Object, ...{
6
+ required: true
7
+ } });
8
+ if (modelValue.value.forget_password_enabled != "0") {
9
+ modelValue.value.forget_password_enabled = "1";
10
+ }
11
+ if (!modelValue.value.forget_password_subject) {
12
+ modelValue.value.forget_password_subject = "Password Reset Code";
13
+ }
14
+ if (!modelValue.value.forget_password_template) {
15
+ modelValue.value.forget_password_template = "Your password reset code is: {code}";
16
+ }
17
+ const onSubmit = async (d) => {
18
+ let data = [];
19
+ Object.keys(d).forEach((key) => {
20
+ if (d[key] === void 0) {
21
+ d[key] = "";
22
+ }
23
+ data.push({
24
+ name: key,
25
+ value: d[key]
26
+ });
27
+ });
28
+ await m("updateAppConfigs", { data });
29
+ modelValue.value.forget_password_enabled = d.forget_password_enabled;
30
+ modelValue.value.forget_password_subject = d.forget_password_subject;
31
+ modelValue.value.forget_password_template = d.forget_password_template;
32
+ $q.notify({ message: "Settings saved", color: "positive" });
33
+ };
34
+ </script>
35
+
36
+ <template>
37
+ <form-kit type="l-form" :value="{
38
+ forget_password_enabled: modelValue.forget_password_enabled,
39
+ forget_password_subject: modelValue.forget_password_subject,
40
+ forget_password_template: modelValue.forget_password_template
41
+ }" @submit="onSubmit">
58
42
  <form-kit type="l-checkbox" label="Forget Password Enabled" name="forget_password_enabled" true-value="1"
59
43
  false-value="0" />
60
44
 
@@ -63,4 +47,4 @@ const onSubmit = async (d: any) => {
63
47
  input-type="textarea" />
64
48
 
65
49
  </form-kit>
66
- </template>
50
+ </template>
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;