@vitnode/core 1.2.0-canary.60 → 1.2.0-canary.62

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 (274) hide show
  1. package/dist/scripts/get-config.js +15 -0
  2. package/dist/scripts/plugin.js +188 -0
  3. package/dist/scripts/prepare-database.js +177 -0
  4. package/dist/scripts/prepare-plugins-files.js +134 -0
  5. package/dist/scripts/run-interactive-shell-command.js +21 -0
  6. package/dist/scripts/scripts.js +39 -13
  7. package/dist/scripts/shared/file-utils.js +203 -0
  8. package/dist/src/api/adapters/sso/discord.js +1 -77
  9. package/dist/src/api/adapters/sso/facebook.js +1 -76
  10. package/dist/src/api/adapters/sso/google.js +1 -87
  11. package/dist/src/api/config.js +1 -67
  12. package/dist/src/api/lib/check-plugin-id.js +1 -43
  13. package/dist/src/api/lib/cron.js +1 -22
  14. package/dist/src/api/lib/logger-middleware.js +1 -35
  15. package/dist/src/api/lib/module.js +1 -22
  16. package/dist/src/api/lib/plugin.js +1 -22
  17. package/dist/src/api/lib/route.js +1 -27
  18. package/dist/src/api/lib/with-pagination.js +1 -83
  19. package/dist/src/api/middlewares/captcha.middleware.js +1 -63
  20. package/dist/src/api/middlewares/cron-auth.middleware.js +1 -19
  21. package/dist/src/api/middlewares/global.middleware.js +1 -93
  22. package/dist/src/api/middlewares/rate-limiter.middleware.js +1 -32
  23. package/dist/src/api/models/device.js +1 -61
  24. package/dist/src/api/models/email.js +1 -76
  25. package/dist/src/api/models/password.js +1 -36
  26. package/dist/src/api/models/session-admin.js +1 -106
  27. package/dist/src/api/models/session.js +1 -85
  28. package/dist/src/api/models/sso.js +1 -120
  29. package/dist/src/api/models/user/get-user-by-id.js +1 -19
  30. package/dist/src/api/models/user/sign-in-with-passwords.js +1 -22
  31. package/dist/src/api/models/user/sign-up.js +1 -73
  32. package/dist/src/api/models/user.js +1 -8
  33. package/dist/src/api/modules/admin/admin.module.js +1 -19
  34. package/dist/src/api/modules/admin/advanced/advanced.admin.module.js +1 -11
  35. package/dist/src/api/modules/admin/advanced/cron/cron.admin.module.js +1 -12
  36. package/dist/src/api/modules/admin/advanced/cron/routes/get.route.js +1 -66
  37. package/dist/src/api/modules/admin/advanced/cron/routes/run.route.js +1 -95
  38. package/dist/src/api/modules/admin/debug/debug.admin.module.js +1 -10
  39. package/dist/src/api/modules/admin/debug/routes/logs.route.js +1 -94
  40. package/dist/src/api/modules/admin/routes/session.route.js +1 -47
  41. package/dist/src/api/modules/admin/users/routes/list.route.js +1 -79
  42. package/dist/src/api/modules/admin/users/routes/users.route.js +1 -84
  43. package/dist/src/api/modules/admin/users/users.admin.module.js +1 -10
  44. package/dist/src/api/modules/cron/cron/clean.cron.js +1 -24
  45. package/dist/src/api/modules/cron/cron.module.js +1 -14
  46. package/dist/src/api/modules/cron/helpers/process-cron-jobs.d.ts.map +1 -1
  47. package/dist/src/api/modules/cron/helpers/process-cron-jobs.js +1 -76
  48. package/dist/src/api/modules/cron/routes/cron.route.js +1 -101
  49. package/dist/src/api/modules/middleware/middleware.module.js +1 -10
  50. package/dist/src/api/modules/middleware/route.js +1 -49
  51. package/dist/src/api/modules/users/avatar-color.js +1 -43
  52. package/dist/src/api/modules/users/routes/change-password.route.js +1 -58
  53. package/dist/src/api/modules/users/routes/reset-passowrd.route.js +1 -91
  54. package/dist/src/api/modules/users/routes/session.route.js +1 -46
  55. package/dist/src/api/modules/users/routes/sign-in.route.js +1 -71
  56. package/dist/src/api/modules/users/routes/sign-out.route.js +1 -43
  57. package/dist/src/api/modules/users/routes/sign-up.route.js +1 -77
  58. package/dist/src/api/modules/users/routes/test.route.js +1 -33
  59. package/dist/src/api/modules/users/sso/routes/callback.route.js +1 -52
  60. package/dist/src/api/modules/users/sso/routes/create-url.route.js +1 -36
  61. package/dist/src/api/modules/users/sso/sso.module.js +1 -12
  62. package/dist/src/api/modules/users/users.module.js +1 -26
  63. package/dist/src/api/plugin.js +1 -15
  64. package/dist/src/app/login/page.js +1 -16
  65. package/dist/src/app/login/reset-password/page.js +1 -18
  66. package/dist/src/app/login/sso/[providerId]/page.js +1 -10
  67. package/dist/src/app/register/page.js +1 -16
  68. package/dist/src/app_admin/core/advanced/cron/page.js +1 -42
  69. package/dist/src/app_admin/core/debug/page.js +1 -45
  70. package/dist/src/app_admin/core/page.js +1 -5
  71. package/dist/src/app_admin/core/test/page.js +1 -5
  72. package/dist/src/app_admin/core/users/page.js +1 -38
  73. package/dist/src/components/avatar.js +1 -14
  74. package/dist/src/components/confirm-action/confirm-action-alert-dialog.js +1 -42
  75. package/dist/src/components/confirm-action/content.js +1 -31
  76. package/dist/src/components/date-format.js +1 -41
  77. package/dist/src/components/form/auto-form.js +1 -103
  78. package/dist/src/components/form/common/desc.js +1 -9
  79. package/dist/src/components/form/common/label.js +1 -18
  80. package/dist/src/components/form/fields/checkbox.js +1 -37
  81. package/dist/src/components/form/fields/combobox-async.js +1 -123
  82. package/dist/src/components/form/fields/combobox.js +1 -87
  83. package/dist/src/components/form/fields/input.js +1 -39
  84. package/dist/src/components/form/fields/radio-group.js +1 -50
  85. package/dist/src/components/form/fields/select.js +1 -58
  86. package/dist/src/components/form/fields/switch.js +1 -36
  87. package/dist/src/components/form/fields/textarea.js +1 -36
  88. package/dist/src/components/i18n-provider.js +1 -43
  89. package/dist/src/components/logo-vitnode.js +1 -119
  90. package/dist/src/components/switchers/langs/language-switcher.js +1 -47
  91. package/dist/src/components/switchers/themes/theme-switcher.js +1 -28
  92. package/dist/src/components/table/content.js +1 -81
  93. package/dist/src/components/table/data-table.js +1 -68
  94. package/dist/src/components/table/order-table-head.js +1 -50
  95. package/dist/src/components/table/pagination.js +1 -122
  96. package/dist/src/components/tiptap/extension.js +1 -33
  97. package/dist/src/components/tiptap/toolbar/actions/alignment-action.js +1 -91
  98. package/dist/src/components/tiptap/toolbar/actions/bold-action.js +1 -39
  99. package/dist/src/components/tiptap/toolbar/actions/headings-action.js +1 -93
  100. package/dist/src/components/tiptap/toolbar/actions/italic-action.js +1 -38
  101. package/dist/src/components/tiptap/toolbar/actions/list-action.js +1 -61
  102. package/dist/src/components/tiptap/toolbar/actions/text-format-more/text-format-more.js +1 -59
  103. package/dist/src/components/tiptap/toolbar/actions/underline-action.js +1 -38
  104. package/dist/src/components/tiptap/toolbar/actions/undo-redo-actions.js +1 -63
  105. package/dist/src/components/tiptap/toolbar/actions/utils/tooltip-shortcut.js +1 -11
  106. package/dist/src/components/tiptap/toolbar/tiptap-toolbar.js +1 -55
  107. package/dist/src/components/tiptap/toolbar/use-toolbar-editor.js +1 -5
  108. package/dist/src/components/ui/accordion.js +1 -46
  109. package/dist/src/components/ui/alert-dialog.js +1 -123
  110. package/dist/src/components/ui/alert.js +1 -39
  111. package/dist/src/components/ui/badge.js +1 -28
  112. package/dist/src/components/ui/button-client.js +1 -57
  113. package/dist/src/components/ui/button.js +1 -32
  114. package/dist/src/components/ui/card.js +1 -52
  115. package/dist/src/components/ui/checkbox.js +1 -20
  116. package/dist/src/components/ui/collapsible.js +1 -22
  117. package/dist/src/components/ui/command.js +1 -98
  118. package/dist/src/components/ui/context-menu.js +1 -140
  119. package/dist/src/components/ui/dialog.js +1 -189
  120. package/dist/src/components/ui/drawer.js +1 -83
  121. package/dist/src/components/ui/dropdown-menu.js +1 -141
  122. package/dist/src/components/ui/editor-content.js +1 -10
  123. package/dist/src/components/ui/editor.js +1 -35
  124. package/dist/src/components/ui/form.js +1 -148
  125. package/dist/src/components/ui/header-content.js +1 -30
  126. package/dist/src/components/ui/hover-card.js +1 -29
  127. package/dist/src/components/ui/input-otp.js +1 -48
  128. package/dist/src/components/ui/input.js +1 -11
  129. package/dist/src/components/ui/label.js +1 -12
  130. package/dist/src/components/ui/loader.js +1 -16
  131. package/dist/src/components/ui/menubar.js +1 -151
  132. package/dist/src/components/ui/navigation-menu.js +1 -82
  133. package/dist/src/components/ui/popover.js +1 -35
  134. package/dist/src/components/ui/progress.js +1 -19
  135. package/dist/src/components/ui/radio-group.js +1 -27
  136. package/dist/src/components/ui/scroll-area.js +1 -33
  137. package/dist/src/components/ui/select.js +1 -113
  138. package/dist/src/components/ui/separator.js +1 -14
  139. package/dist/src/components/ui/sheet.js +1 -92
  140. package/dist/src/components/ui/sidebar.js +1 -433
  141. package/dist/src/components/ui/skeleton.js +1 -10
  142. package/dist/src/components/ui/slider.js +1 -50
  143. package/dist/src/components/ui/sonner.js +1 -26
  144. package/dist/src/components/ui/switch.js +1 -16
  145. package/dist/src/components/ui/table.js +1 -63
  146. package/dist/src/components/ui/tabs.js +1 -33
  147. package/dist/src/components/ui/textarea.js +1 -10
  148. package/dist/src/components/ui/toggle-group.js +1 -45
  149. package/dist/src/components/ui/toggle.js +1 -34
  150. package/dist/src/components/ui/tooltip.js +1 -57
  151. package/dist/src/config.js +1 -4
  152. package/dist/src/database/admins.js +1 -74
  153. package/dist/src/database/cron.js +1 -22
  154. package/dist/src/database/languages.js +1 -52
  155. package/dist/src/database/logs.js +1 -34
  156. package/dist/src/database/moderators.js +1 -37
  157. package/dist/src/database/roles.js +1 -13
  158. package/dist/src/database/sessions.js +1 -60
  159. package/dist/src/database/users.js +1 -145
  160. package/dist/src/drizzle.config.js +1 -67
  161. package/dist/src/emails/default-template.js +1 -99
  162. package/dist/src/emails/reset-password.js +1 -132
  163. package/dist/src/emails/ui/button.js +1 -36
  164. package/dist/src/emails/ui/card.js +1 -39
  165. package/dist/src/hooks/use-before-unload.js +1 -30
  166. package/dist/src/hooks/use-captcha.js +1 -122
  167. package/dist/src/hooks/use-mobile.js +1 -16
  168. package/dist/src/lib/api/get-middleware-api.js +1 -13
  169. package/dist/src/lib/api/get-next-cron-run-date.js +1 -14
  170. package/dist/src/lib/api/get-next-cron-run-date.test.js +1 -55
  171. package/dist/src/lib/api/get-session-admin-api.js +1 -19
  172. package/dist/src/lib/api/get-session-api.js +1 -14
  173. package/dist/src/lib/api/should-cron-job-run.js +1 -16
  174. package/dist/src/lib/api/should-cron-job-run.test.js +1 -213
  175. package/dist/src/lib/api/validate-cron-schedule.d.ts +2 -0
  176. package/dist/src/lib/api/validate-cron-schedule.d.ts.map +1 -0
  177. package/dist/src/lib/api/validate-cron-schedule.js +1 -0
  178. package/dist/src/lib/api/validate-cron-schedule.test.d.ts +2 -0
  179. package/dist/src/lib/api/validate-cron-schedule.test.d.ts.map +1 -0
  180. package/dist/src/lib/api/validate-cron-schedule.test.js +1 -0
  181. package/dist/src/lib/colors.js +1 -140
  182. package/dist/src/lib/colors.test.js +1 -173
  183. package/dist/src/lib/config.js +1 -14
  184. package/dist/src/lib/ctrl-or-command-character.js +1 -5
  185. package/dist/src/lib/fetcher/cookie-from-string-to-object.js +1 -12
  186. package/dist/src/lib/fetcher/cookie-from-string-to-object.test.js +1 -78
  187. package/dist/src/lib/fetcher/core.js +3 -48
  188. package/dist/src/lib/fetcher/helpers-server.js +1 -18
  189. package/dist/src/lib/fetcher/helpers.js +1 -16
  190. package/dist/src/lib/fetcher/helpers.test.js +1 -37
  191. package/dist/src/lib/fetcher/types.js +1 -1
  192. package/dist/src/lib/fetcher-client.js +1 -17
  193. package/dist/src/lib/fetcher.js +1 -33
  194. package/dist/src/lib/helpers/auto-form.js +1 -98
  195. package/dist/src/lib/helpers/auto-form.test.js +1 -336
  196. package/dist/src/lib/navigation.js +1 -11
  197. package/dist/src/lib/plugin.js +1 -3
  198. package/dist/src/lib/special-characters.js +1 -4
  199. package/dist/src/lib/special-characters.test.js +1 -56
  200. package/dist/src/lib/utils.js +1 -5
  201. package/dist/src/locales/en.json +308 -0
  202. package/dist/src/tests/setup.js +1 -6
  203. package/dist/src/views/admin/layouts/admin-layout.js +1 -73
  204. package/dist/src/views/admin/layouts/sidebar/nav/item.js +1 -98
  205. package/dist/src/views/admin/layouts/sidebar/nav/nav.js +1 -60
  206. package/dist/src/views/admin/layouts/sidebar/sidebar.js +1 -28
  207. package/dist/src/views/admin/layouts/sidebar/sign-out.js +1 -14
  208. package/dist/src/views/admin/layouts/user-bar/client.js +1 -69
  209. package/dist/src/views/admin/layouts/user-bar/user-bar.js +1 -32
  210. package/dist/src/views/admin/sign-in/sign-in-admin-view.js +1 -27
  211. package/dist/src/views/admin/views/core/advanced/cron/cron-table-view.js +1 -97
  212. package/dist/src/views/admin/views/core/advanced/cron/run-action/mutation-api.js +1 -23
  213. package/dist/src/views/admin/views/core/advanced/cron/run-action/run-action.js +1 -38
  214. package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.js +1 -44
  215. package/dist/src/views/admin/views/core/debug/actions/clear-cache/clear-cache.js +1 -35
  216. package/dist/src/views/admin/views/core/debug/actions/clear-cache/mutation-api.js +1 -5
  217. package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.js +1 -281
  218. package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.js +1 -67
  219. package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-status.js +1 -14
  220. package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-type-log.js +1 -30
  221. package/dist/src/views/admin/views/core/debug/system-logs/system-logs-view.js +1 -96
  222. package/dist/src/views/admin/views/core/test.js +1 -161
  223. package/dist/src/views/admin/views/core/users/users-admin-view.js +1 -89
  224. package/dist/src/views/auth/password-reset/change-password-form/form.js +1 -48
  225. package/dist/src/views/auth/password-reset/change-password-form/mutation-api.js +1 -22
  226. package/dist/src/views/auth/password-reset/change-password-form/use-form.js +1 -36
  227. package/dist/src/views/auth/password-reset/form/form.js +1 -104
  228. package/dist/src/views/auth/password-reset/form/mutation-api.js +1 -21
  229. package/dist/src/views/auth/password-reset/form/use-form.js +1 -33
  230. package/dist/src/views/auth/password-reset/password-reset-view.js +1 -37
  231. package/dist/src/views/auth/sign-in/form/form.js +1 -64
  232. package/dist/src/views/auth/sign-in/form/mutation-api.js +1 -33
  233. package/dist/src/views/auth/sign-in/form/use-form.js +1 -38
  234. package/dist/src/views/auth/sign-in/sign-in-view.js +1 -61
  235. package/dist/src/views/auth/sign-up/components/password-input.js +1 -96
  236. package/dist/src/views/auth/sign-up/email-confirmation-view.js +1 -55
  237. package/dist/src/views/auth/sign-up/form/form.js +1 -89
  238. package/dist/src/views/auth/sign-up/form/mutation-api.js +1 -30
  239. package/dist/src/views/auth/sign-up/form/use-form.js +1 -70
  240. package/dist/src/views/auth/sign-up/sign-up-view.js +1 -65
  241. package/dist/src/views/auth/sign-up/wrapper.js +1 -22
  242. package/dist/src/views/auth/sso/buttons/client.js +1 -22
  243. package/dist/src/views/auth/sso/buttons/mutation-api.js +1 -24
  244. package/dist/src/views/auth/sso/buttons/sso-buttons.js +1 -56
  245. package/dist/src/views/auth/sso/callback/callback-sso-view.js +1 -32
  246. package/dist/src/views/auth/sso/callback/client/client.js +1 -68
  247. package/dist/src/views/auth/sso/callback/client/mutation-api.js +1 -32
  248. package/dist/src/views/error/back-button.js +1 -14
  249. package/dist/src/views/error/error-view.js +1 -58
  250. package/dist/src/views/error/global-error-view.js +1 -50
  251. package/dist/src/views/layouts/provider.js +1 -44
  252. package/dist/src/views/layouts/root-layout.js +1 -25
  253. package/dist/src/views/layouts/theme/header/header.js +1 -38
  254. package/dist/src/views/layouts/theme/header/user/auth/auth.js +1 -33
  255. package/dist/src/views/layouts/theme/header/user/auth/client.js +1 -47
  256. package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.js +1 -27
  257. package/dist/src/views/layouts/theme/header/user/user.js +1 -32
  258. package/dist/src/views/layouts/theme/layout.js +1 -16
  259. package/dist/src/vitnode.config.js +1 -42
  260. package/dist/tsconfig.tsbuildinfo +1 -1
  261. package/dist/tsup.config.js +18 -0
  262. package/dist/vitest.config.d.ts.map +1 -1
  263. package/dist/vitest.config.js +49 -0
  264. package/eslint.config.mjs +2 -0
  265. package/package.json +6 -10
  266. package/dist/src/api/adapters/cron/node-cron.adapter.d.ts +0 -3
  267. package/dist/src/api/adapters/cron/node-cron.adapter.d.ts.map +0 -1
  268. package/dist/src/api/adapters/cron/node-cron.adapter.js +0 -11
  269. package/dist/src/api/adapters/email/nodemailer.d.ts +0 -10
  270. package/dist/src/api/adapters/email/nodemailer.d.ts.map +0 -1
  271. package/dist/src/api/adapters/email/nodemailer.js +0 -30
  272. package/dist/src/api/adapters/email/resend.d.ts +0 -6
  273. package/dist/src/api/adapters/email/resend.d.ts.map +0 -1
  274. package/dist/src/api/adapters/email/resend.js +0 -21
@@ -0,0 +1,308 @@
1
+ {
2
+ "core": {
3
+ "global": {
4
+ "editor": {
5
+ "undo": "Undo",
6
+ "redo": "Redo",
7
+ "paragraph": "Paragraph",
8
+ "heading": "Heading {level}",
9
+ "bold": "Bold",
10
+ "italic": "Italic",
11
+ "underline": "Underline",
12
+ "ordered_list": "Ordered List",
13
+ "bullet_list": "Bullet List",
14
+ "text_format_more": {
15
+ "label": "More text formats",
16
+ "strike": "Strike"
17
+ },
18
+ "alignments": {
19
+ "left": "Left align",
20
+ "center": "Center align",
21
+ "right": "Right align",
22
+ "justify": "Justify align"
23
+ }
24
+ },
25
+ "theme_switcher": "Toggle Theme",
26
+ "language_switcher": "Switch Language",
27
+ "toggle_sidebar": "Toggle Sidebar",
28
+ "no_results": {
29
+ "title": "No results found",
30
+ "desc": "Try adjusting your search or filter criteria."
31
+ },
32
+ "are_you_sure_want_to_leave_form": {
33
+ "title": "Are you sure you want to leave this form?",
34
+ "desc": "Your changes will not be saved.",
35
+ "cancel": "Cancel",
36
+ "confirm": "Yes, leave"
37
+ },
38
+ "confirm_action": {
39
+ "title": "Are you sure?",
40
+ "desc": "This action cannot be undone.",
41
+ "cancel": "Cancel",
42
+ "confirm": "Yes, confirm"
43
+ },
44
+ "search_placeholder": "Search...",
45
+ "results_not_found": "No results found",
46
+ "date": "{date, date}",
47
+ "date_medium": "{date, date, medium}",
48
+ "date_short": "{date, date, short}",
49
+ "register": "Register",
50
+ "login": "Login",
51
+ "save": "Save",
52
+ "submit": "Submit",
53
+ "cancel": "Cancel",
54
+ "optional": "Optional",
55
+ "loading": "Loading...",
56
+ "or": "or",
57
+ "back_home": "Back to home",
58
+ "go_back": "Go back",
59
+ "select_option": "Select an option",
60
+ "select_options": "Select options",
61
+ "go_to_prev_page": "Go to previous page",
62
+ "go_to_next_page": "Go to next page",
63
+ "errors": {
64
+ "title": "Oops! Something went wrong.",
65
+ "internal_server_error": "Internal server error.",
66
+ "field_required": "This field is required.",
67
+ "field_min_length": "This field must be at least {min} characters.",
68
+ "captcha_internal_error": "Captcha validation failed. Please try again later.",
69
+ "404": {
70
+ "title": "Page Not Found",
71
+ "desc": "Oops! The page you're looking for doesn't exist."
72
+ },
73
+ "500": {
74
+ "title": "Internal Server Error",
75
+ "desc": "Sorry, we're experiencing technical difficulties on our server."
76
+ },
77
+ "400": {
78
+ "title": "Bad Request",
79
+ "desc": "The request couldn't be processed due to invalid parameters."
80
+ },
81
+ "403": {
82
+ "title": "Forbidden",
83
+ "desc": "You don't have permission to access this resource."
84
+ },
85
+ "409": {
86
+ "title": "Conflict",
87
+ "desc": "The request could not be completed due to a conflict with the current state of the resource."
88
+ }
89
+ },
90
+ "user_bar": {
91
+ "log_out": "Log out",
92
+ "admin_cp": "Admin CP"
93
+ }
94
+ },
95
+ "auth": {
96
+ "sso": {
97
+ "or": "Or continue With",
98
+ "access_denied": "You have denied access to the application or the request has expired. Please try again.",
99
+ "email_exists": {
100
+ "title": "You cannot sign in with <provider></provider>",
101
+ "desc": "An account with this email already exists. Please sign in with another method and connect your <provider></provider> account in your profile settings.",
102
+ "sign_in": "Go to Login Page"
103
+ }
104
+ },
105
+ "sign_up": {
106
+ "desc": "Hello there! Create your account to get started.",
107
+ "already_have_account": "You already have an account? <link>Sign in</link>.",
108
+ "submit": "Register",
109
+ "username": {
110
+ "label": "Username",
111
+ "min_length": "Username must be at least 3 characters long.",
112
+ "max_length": "Username must be at most 32 characters long.",
113
+ "exists": "Username already exists.",
114
+ "your_user_code": "Your user code: <code></code>"
115
+ },
116
+ "email": {
117
+ "label": "Email",
118
+ "invalid": "Invalid email address.",
119
+ "exists": "Email already exists."
120
+ },
121
+ "password": {
122
+ "label": "Password",
123
+ "invalid": "Password is too weak.",
124
+ "requirements": {
125
+ "label": "Password should contain:",
126
+ "min_length": "At least 8 characters",
127
+ "uppercase": "At least one uppercase letter",
128
+ "number": "At least one number",
129
+ "special_char": "At least one special character"
130
+ }
131
+ },
132
+ "terms": {
133
+ "label": "Accept terms and conditions",
134
+ "required": "You must accept the terms and conditions.",
135
+ "desc": "You agree to our <link>Legal documents & Policies</link>."
136
+ },
137
+ "newsletter": {
138
+ "label": "Newsletter",
139
+ "desc": "Receive the latest news and updates."
140
+ },
141
+ "email_confirmation": {
142
+ "title": "Check your email",
143
+ "desc": "We've sent a confirmation link to your email address",
144
+ "check_spam": "If you don't see the email in your inbox, please check your spam folder."
145
+ }
146
+ },
147
+ "sign_in": {
148
+ "desc": "Welcome back! Sign in to your account.",
149
+ "do_not_have_account": "Don't have an account? <link>Sign up</link>.",
150
+ "email": {
151
+ "label": "Email",
152
+ "invalid": "Invalid email address."
153
+ },
154
+ "password": {
155
+ "label": "Password",
156
+ "required": "Password is required.",
157
+ "reset": "Forgot password?"
158
+ },
159
+ "errors": {
160
+ "access_denied": {
161
+ "title": "Invalid credentials",
162
+ "desc": "The email address or password was incorrect. Please try again (make sure your caps lock is off)."
163
+ }
164
+ },
165
+ "submit": "Login"
166
+ },
167
+ "reset_password": {
168
+ "title": "Reset Password",
169
+ "desc": "Please enter your email address below to receive a password reset link.",
170
+ "submit": "Send Reset Link",
171
+ "confirmation": {
172
+ "title": "Check your email",
173
+ "desc": "We've sent a password reset link to your email address:",
174
+ "check_spam": "If you don't see the email in your inbox, please check your spam folder."
175
+ },
176
+ "email": {
177
+ "subject": "Reset your password",
178
+ "greeting": "Hello {name}!",
179
+ "intro": "We received a request to reset your password for your account.",
180
+ "button": "Reset Password",
181
+ "instructions": "Click the button above to reset your password. This link will expire in 30 minutes for security reasons.",
182
+ "no_action": "If you didn't request a password reset, you can safely ignore this email. Your password will remain unchanged.",
183
+ "security_note": "For your security, this request was made from IP address: {ip}",
184
+ "help": "If you're having trouble with the button above, copy and paste the URL below into your web browser:",
185
+ "expire_time": "This link will expire on {date}"
186
+ }
187
+ },
188
+ "change_password": {
189
+ "title": "Change Password",
190
+ "desc": "Please enter your new password below.",
191
+ "submit": "Change Password",
192
+ "success": {
193
+ "title": "Password changed successfully",
194
+ "desc": "You can now log in with your new password."
195
+ }
196
+ }
197
+ }
198
+ },
199
+ "admin": {
200
+ "dashboard": {
201
+ "dev_mode": "Development Mode",
202
+ "version": "Version: {version}"
203
+ },
204
+ "global": {
205
+ "nav": {
206
+ "core": "Core",
207
+ "dashboard": "Dashboard",
208
+ "users": {
209
+ "title": "Users",
210
+ "list": "User List"
211
+ },
212
+ "user_bar": {
213
+ "home_page": "Home Page",
214
+ "debug": "Debug Panel",
215
+ "log_out": "Log Out"
216
+ },
217
+ "advanced": {
218
+ "title": "Advanced",
219
+ "cron": "Cron Jobs"
220
+ }
221
+ }
222
+ },
223
+ "advanced": {
224
+ "cron": {
225
+ "title": "Cron Jobs",
226
+ "desc": "Manage and monitor scheduled tasks.",
227
+ "list": {
228
+ "name": "Name",
229
+ "pluginId": "Plugin ID",
230
+ "module": "Module",
231
+ "schedule": "Schedule",
232
+ "lastRun": {
233
+ "title": "Last Run",
234
+ "never": "Never"
235
+ },
236
+ "nextRun": {
237
+ "title": "Next Run",
238
+ "never": "Never"
239
+ },
240
+ "actions": {
241
+ "runNow": {
242
+ "label": "Run Job Now",
243
+ "success": "Cron job executed successfully."
244
+ }
245
+ }
246
+ }
247
+ }
248
+ },
249
+ "user": {
250
+ "list": {
251
+ "desc": "Manage users of your application.",
252
+ "user": "User",
253
+ "createdAt": "Created At",
254
+ "emailNotVerified": "Email Not Verified"
255
+ }
256
+ },
257
+ "debug": {
258
+ "title": "Debug Panel",
259
+ "desc": "Check logs, errors, and other debug information.",
260
+ "actions": {
261
+ "clear_cache": {
262
+ "label": "Clear Cache",
263
+ "title": "Are you sure you want to clear the cache?",
264
+ "desc": "This action will remove all cached data, which may affect performance temporarily.",
265
+ "success": "Cache cleared successfully.",
266
+ "confirm": "Yes, clear cache"
267
+ }
268
+ },
269
+ "logs": {
270
+ "title": "System Logs",
271
+ "created_at": "Created At",
272
+ "plugin": "Plugin",
273
+ "content": "Content",
274
+ "type": "Type",
275
+ "types": {
276
+ "warn": "Warning",
277
+ "error": "Error",
278
+ "debug": "Debug"
279
+ },
280
+ "status_code": "Status Code",
281
+ "more": {
282
+ "title": "More Details",
283
+ "desc": "Log ID: <logId></logId>",
284
+ "log_overview": {
285
+ "title": "Log Overview",
286
+ "log_type": "Log Type",
287
+ "status_code": "Status Code",
288
+ "log_id": "Log ID",
289
+ "created_at": "Created At",
290
+ "plugin": "Plugin",
291
+ "user": "User"
292
+ },
293
+ "request_information": {
294
+ "title": "Request Information",
295
+ "ip_address": "IP Address",
296
+ "request_method": "Request Method",
297
+ "request_url": "Request URL",
298
+ "user_agent": "User Agent"
299
+ },
300
+ "log_content": {
301
+ "title": "Log Content",
302
+ "full_log": "Full Log Message"
303
+ }
304
+ }
305
+ }
306
+ }
307
+ }
308
+ }
@@ -1,6 +1 @@
1
- import "@testing-library/react"; // import { expect, vi } from 'vitest';
2
- // Set up global mocks if needed
3
- // vi.stubGlobal('fetch', vi.fn());
4
- // Custom matchers can be added here if needed
5
- // expect.extend({ ... });
6
- // Add global environment setup
1
+ import"@testing-library/react";
@@ -1,73 +1 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { getTranslations } from "next-intl/server";
3
- import { cookies } from "next/headers";
4
- import { ThemeSwitcher } from "../../../components/switchers/themes/theme-switcher.js";
5
- import { SidebarInset, SidebarProvider, SidebarTrigger } from "../../../components/ui/sidebar.js";
6
- import { getSessionAdminApi } from "../../../lib/api/get-session-admin-api.js";
7
- import { I18nProvider } from "../../../components/i18n-provider.js";
8
- import { LanguageSwitcher } from "../../../components/switchers/langs/language-switcher.js";
9
- import { SidebarAdmin } from "./sidebar/sidebar.js";
10
- import { UserBarAdmin } from "./user-bar/user-bar.js";
11
- export const AdminLayout = async ({ children, vitNodeConfig })=>{
12
- const t = await getTranslations();
13
- const session = await getSessionAdminApi();
14
- const cookieStore = await cookies();
15
- const defaultOpen = !cookieStore.get("vitnode_admin_sidebar_state") || cookieStore.get("vitnode_admin_sidebar_state")?.value === "true";
16
- if (!session) return null;
17
- const pluginNav = vitNodeConfig.plugins.filter((plugin)=>plugin.admin?.nav).map((plugin)=>({
18
- id: plugin.pluginId,
19
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
20
- // @ts-expect-error
21
- title: t(`${plugin.pluginId}.title`),
22
- items: (plugin.admin?.nav ?? []).map((item)=>({
23
- ...item,
24
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
25
- // @ts-expect-error
26
- title: t(`${plugin.pluginId}.admin.nav.${item.id}`),
27
- items: item.items?.map((subItem)=>({
28
- ...subItem,
29
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
30
- // @ts-expect-error
31
- title: t(`${plugin.pluginId}.admin.nav.${item.id}.${subItem.id}`)
32
- })) ?? []
33
- }))
34
- }));
35
- return /*#__PURE__*/ _jsx(I18nProvider, {
36
- namespaces: [
37
- "admin.global"
38
- ],
39
- children: /*#__PURE__*/ _jsxs(SidebarProvider, {
40
- defaultOpen: defaultOpen,
41
- children: [
42
- /*#__PURE__*/ _jsx(SidebarAdmin, {
43
- pluginNav: pluginNav
44
- }),
45
- /*#__PURE__*/ _jsxs(SidebarInset, {
46
- children: [
47
- /*#__PURE__*/ _jsxs("header", {
48
- className: "flex h-16 shrink-0 items-center gap-2 border-b px-4",
49
- children: [
50
- /*#__PURE__*/ _jsx(SidebarTrigger, {
51
- className: "-ml-1"
52
- }),
53
- /*#__PURE__*/ _jsxs("div", {
54
- className: "ml-auto flex items-center justify-center gap-2 px-2",
55
- children: [
56
- vitNodeConfig.i18n.locales.length > 1 && /*#__PURE__*/ _jsx(LanguageSwitcher, {
57
- locales: vitNodeConfig.i18n.locales
58
- }),
59
- /*#__PURE__*/ _jsx(ThemeSwitcher, {}),
60
- /*#__PURE__*/ _jsx(UserBarAdmin, {
61
- user: session.user
62
- })
63
- ]
64
- })
65
- ]
66
- }),
67
- children
68
- ]
69
- })
70
- ]
71
- })
72
- });
73
- };
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{getTranslations}from"next-intl/server";import{cookies}from"next/headers";import{ThemeSwitcher}from"../../../components/switchers/themes/theme-switcher.js";import{SidebarInset,SidebarProvider,SidebarTrigger}from"../../../components/ui/sidebar.js";import{getSessionAdminApi}from"../../../lib/api/get-session-admin-api.js";import{I18nProvider}from"../../../components/i18n-provider.js";import{LanguageSwitcher}from"../../../components/switchers/langs/language-switcher.js";import{SidebarAdmin}from"./sidebar/sidebar.js";import{UserBarAdmin}from"./user-bar/user-bar.js";export const AdminLayout=async({children,vitNodeConfig})=>{const t=await getTranslations();const session=await getSessionAdminApi();const cookieStore=await cookies();const defaultOpen=!cookieStore.get("vitnode_admin_sidebar_state")||cookieStore.get("vitnode_admin_sidebar_state")?.value==="true";if(!session)return null;const pluginNav=vitNodeConfig.plugins.filter(plugin=>plugin.admin?.nav).map(plugin=>({id:plugin.pluginId,title:t(`${plugin.pluginId}.title`),items:(plugin.admin?.nav??[]).map(item=>({...item,title:t(`${plugin.pluginId}.admin.nav.${item.id}`),items:item.items?.map(subItem=>({...subItem,title:t(`${plugin.pluginId}.admin.nav.${item.id}.${subItem.id}`)}))??[]}))}));return _jsx(I18nProvider,{namespaces:["admin.global"],children:_jsxs(SidebarProvider,{defaultOpen:defaultOpen,children:[_jsx(SidebarAdmin,{pluginNav:pluginNav}),_jsxs(SidebarInset,{children:[_jsxs("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b px-4",children:[_jsx(SidebarTrigger,{className:"-ml-1"}),_jsxs("div",{className:"ml-auto flex items-center justify-center gap-2 px-2",children:[vitNodeConfig.i18n.locales.length>1&&_jsx(LanguageSwitcher,{locales:vitNodeConfig.i18n.locales}),_jsx(ThemeSwitcher,{}),_jsx(UserBarAdmin,{user:session.user})]})]}),children]})]})})};
@@ -1,98 +1 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { ChevronRight, MenuIcon } from "lucide-react";
4
- import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../../../components/ui/collapsible.js";
5
- import { SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, useSidebar } from "../../../../../components/ui/sidebar.js";
6
- import { useIsMobile } from "../../../../../hooks/use-mobile.js";
7
- import { Link, usePathname } from "../../../../../lib/navigation.js";
8
- import { cn } from "../../../../../lib/utils.js";
9
- export const ItemNavAdmin = ({ href, title, icon, items = [], isOpenInNewTab })=>{
10
- const { toggleSidebar } = useSidebar();
11
- const isMobile = useIsMobile();
12
- const pathname = usePathname();
13
- // Helper function to normalize URLs for comparison
14
- const normalizeUrl = (url)=>{
15
- return url.endsWith("/") && url.length > 1 ? url.slice(0, -1) : url;
16
- };
17
- // Check if current path matches href (with normalization)
18
- const isActive = normalizeUrl(pathname) === normalizeUrl(href);
19
- // Check if any child item is active
20
- const hasActiveChild = items.some((item)=>normalizeUrl(pathname) === normalizeUrl(item.href));
21
- // Open collapsible by default if has active child
22
- const defaultOpen = hasActiveChild;
23
- const content = /*#__PURE__*/ _jsxs(_Fragment, {
24
- children: [
25
- icon ?? /*#__PURE__*/ _jsx(MenuIcon, {}),
26
- /*#__PURE__*/ _jsx("span", {
27
- children: title
28
- })
29
- ]
30
- });
31
- if (!items.length) {
32
- return /*#__PURE__*/ _jsx(SidebarMenuItem, {
33
- children: /*#__PURE__*/ _jsx(SidebarMenuButton, {
34
- asChild: true,
35
- isActive: isActive,
36
- tooltip: title,
37
- children: /*#__PURE__*/ _jsx(Link, {
38
- href: href,
39
- onClick: ()=>{
40
- if (isMobile) {
41
- toggleSidebar();
42
- }
43
- },
44
- rel: isOpenInNewTab ? "noopener noreferrer" : undefined,
45
- target: isOpenInNewTab ? "_blank" : undefined,
46
- children: content
47
- })
48
- })
49
- });
50
- }
51
- return /*#__PURE__*/ _jsx(Collapsible, {
52
- asChild: true,
53
- className: "group/collapsible",
54
- defaultOpen: defaultOpen,
55
- children: /*#__PURE__*/ _jsxs(SidebarMenuItem, {
56
- children: [
57
- /*#__PURE__*/ _jsx(CollapsibleTrigger, {
58
- asChild: true,
59
- children: /*#__PURE__*/ _jsxs(SidebarMenuButton, {
60
- isActive: isActive || hasActiveChild,
61
- tooltip: title,
62
- children: [
63
- content,
64
- /*#__PURE__*/ _jsx(ChevronRight, {
65
- className: "ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"
66
- })
67
- ]
68
- })
69
- }),
70
- /*#__PURE__*/ _jsx(CollapsibleContent, {
71
- className: cn("text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 outline-none"),
72
- children: /*#__PURE__*/ _jsx(SidebarMenuSub, {
73
- children: items.map((item)=>{
74
- const isChildActive = normalizeUrl(pathname) === normalizeUrl(item.href);
75
- return /*#__PURE__*/ _jsx(SidebarMenuSubItem, {
76
- children: /*#__PURE__*/ _jsx(SidebarMenuSubButton, {
77
- asChild: true,
78
- isActive: isChildActive,
79
- children: /*#__PURE__*/ _jsx(Link, {
80
- href: item.href,
81
- onClick: ()=>{
82
- if (isMobile) {
83
- toggleSidebar();
84
- }
85
- },
86
- rel: item.isOpenInNewTab ? "noopener noreferrer" : undefined,
87
- target: item.isOpenInNewTab ? "_blank" : undefined,
88
- children: item.title
89
- })
90
- })
91
- }, item.href);
92
- })
93
- })
94
- })
95
- ]
96
- })
97
- });
98
- };
1
+ "use client";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{ChevronRight,MenuIcon}from"lucide-react";import{Collapsible,CollapsibleContent,CollapsibleTrigger}from"../../../../../components/ui/collapsible.js";import{SidebarMenuButton,SidebarMenuItem,SidebarMenuSub,SidebarMenuSubButton,SidebarMenuSubItem,useSidebar}from"../../../../../components/ui/sidebar.js";import{useIsMobile}from"../../../../../hooks/use-mobile.js";import{Link,usePathname}from"../../../../../lib/navigation.js";import{cn}from"../../../../../lib/utils.js";export const ItemNavAdmin=({href,title,icon,items=[],isOpenInNewTab})=>{const{toggleSidebar}=useSidebar();const isMobile=useIsMobile();const pathname=usePathname();const normalizeUrl=url=>{return url.endsWith("/")&&url.length>1?url.slice(0,-1):url};const isActive=normalizeUrl(pathname)===normalizeUrl(href);const hasActiveChild=items.some(item=>normalizeUrl(pathname)===normalizeUrl(item.href));const defaultOpen=hasActiveChild;const content=_jsxs(_Fragment,{children:[icon??_jsx(MenuIcon,{}),_jsx("span",{children:title})]});if(!items.length){return _jsx(SidebarMenuItem,{children:_jsx(SidebarMenuButton,{asChild:true,isActive:isActive,tooltip:title,children:_jsx(Link,{href:href,onClick:()=>{if(isMobile){toggleSidebar()}},rel:isOpenInNewTab?"noopener noreferrer":undefined,target:isOpenInNewTab?"_blank":undefined,children:content})})})}return _jsx(Collapsible,{asChild:true,className:"group/collapsible",defaultOpen:defaultOpen,children:_jsxs(SidebarMenuItem,{children:[_jsx(CollapsibleTrigger,{asChild:true,children:_jsxs(SidebarMenuButton,{isActive:isActive||hasActiveChild,tooltip:title,children:[content,_jsx(ChevronRight,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"})]})}),_jsx(CollapsibleContent,{className:cn("text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 outline-none"),children:_jsx(SidebarMenuSub,{children:items.map(item=>{const isChildActive=normalizeUrl(pathname)===normalizeUrl(item.href);return _jsx(SidebarMenuSubItem,{children:_jsx(SidebarMenuSubButton,{asChild:true,isActive:isChildActive,children:_jsx(Link,{href:item.href,onClick:()=>{if(isMobile){toggleSidebar()}},rel:item.isOpenInNewTab?"noopener noreferrer":undefined,target:item.isOpenInNewTab?"_blank":undefined,children:item.title})})},item.href)})})})]})})};
@@ -1,60 +1 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { LayoutDashboardIcon, UsersRoundIcon, WrenchIcon } from "lucide-react";
3
- import { getTranslations } from "next-intl/server";
4
- import { SidebarGroup, SidebarGroupLabel, SidebarMenu } from "../../../../../components/ui/sidebar.js";
5
- import { ItemNavAdmin } from "./item.js";
6
- export const NavSidebarAdmin = async ({ pluginNav })=>{
7
- const t = await getTranslations("admin.global.nav");
8
- const rootItems = [
9
- {
10
- id: "core",
11
- title: t("core"),
12
- items: [
13
- {
14
- href: "/admin/core/",
15
- icon: /*#__PURE__*/ _jsx(LayoutDashboardIcon, {}),
16
- title: t("dashboard")
17
- },
18
- {
19
- href: "/admin/core/users",
20
- title: t("users.title"),
21
- icon: /*#__PURE__*/ _jsx(UsersRoundIcon, {}),
22
- items: [
23
- {
24
- title: t("users.list"),
25
- href: "/admin/core/users"
26
- },
27
- {
28
- title: "test",
29
- href: "/admin/core/test"
30
- }
31
- ]
32
- },
33
- {
34
- href: "/admin/core/advanced",
35
- title: t("advanced.title"),
36
- icon: /*#__PURE__*/ _jsx(WrenchIcon, {}),
37
- items: [
38
- {
39
- title: t("advanced.cron"),
40
- href: "/admin/core/advanced/cron"
41
- }
42
- ]
43
- }
44
- ]
45
- },
46
- ...pluginNav
47
- ];
48
- return rootItems.map((parent)=>/*#__PURE__*/ _jsxs(SidebarGroup, {
49
- children: [
50
- /*#__PURE__*/ _jsx(SidebarGroupLabel, {
51
- children: parent.title
52
- }),
53
- /*#__PURE__*/ _jsx(SidebarMenu, {
54
- children: parent.items.map((item)=>/*#__PURE__*/ _jsx(ItemNavAdmin, {
55
- ...item
56
- }, item.href))
57
- })
58
- ]
59
- }, parent.title));
60
- };
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{LayoutDashboardIcon,UsersRoundIcon,WrenchIcon}from"lucide-react";import{getTranslations}from"next-intl/server";import{SidebarGroup,SidebarGroupLabel,SidebarMenu}from"../../../../../components/ui/sidebar.js";import{ItemNavAdmin}from"./item.js";export const NavSidebarAdmin=async({pluginNav})=>{const t=await getTranslations("admin.global.nav");const rootItems=[{id:"core",title:t("core"),items:[{href:"/admin/core/",icon:_jsx(LayoutDashboardIcon,{}),title:t("dashboard")},{href:"/admin/core/users",title:t("users.title"),icon:_jsx(UsersRoundIcon,{}),items:[{title:t("users.list"),href:"/admin/core/users"},{title:"test",href:"/admin/core/test"}]},{href:"/admin/core/advanced",title:t("advanced.title"),icon:_jsx(WrenchIcon,{}),items:[{title:t("advanced.cron"),href:"/admin/core/advanced/cron"}]}]},...pluginNav];return rootItems.map(parent=>_jsxs(SidebarGroup,{children:[_jsx(SidebarGroupLabel,{children:parent.title}),_jsx(SidebarMenu,{children:parent.items.map(item=>_jsx(ItemNavAdmin,{...item},item.href))})]},parent.title))};
@@ -1,28 +1 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { LogoVitNode } from "../../../../components/logo-vitnode.js";
3
- import { Sidebar, SidebarContent, SidebarHeader } from "../../../../components/ui/sidebar.js";
4
- import { Link } from "../../../../lib/navigation.js";
5
- import { NavSidebarAdmin } from "./nav/nav.js";
6
- export const SidebarAdmin = ({ pluginNav })=>{
7
- return /*#__PURE__*/ _jsxs(Sidebar, {
8
- variant: "floating",
9
- children: [
10
- /*#__PURE__*/ _jsx(SidebarHeader, {
11
- className: "flex h-16 flex-row items-center border-b",
12
- children: /*#__PURE__*/ _jsx(Link, {
13
- className: "px-2",
14
- href: "/admin/core",
15
- children: /*#__PURE__*/ _jsx(LogoVitNode, {
16
- className: "size-8",
17
- small: true
18
- })
19
- })
20
- }),
21
- /*#__PURE__*/ _jsx(SidebarContent, {
22
- children: /*#__PURE__*/ _jsx(NavSidebarAdmin, {
23
- pluginNav: pluginNav
24
- })
25
- })
26
- ]
27
- });
28
- };
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{LogoVitNode}from"../../../../components/logo-vitnode.js";import{Sidebar,SidebarContent,SidebarHeader}from"../../../../components/ui/sidebar.js";import{Link}from"../../../../lib/navigation.js";import{NavSidebarAdmin}from"./nav/nav.js";export const SidebarAdmin=({pluginNav})=>{return _jsxs(Sidebar,{variant:"floating",children:[_jsx(SidebarHeader,{className:"flex h-16 flex-row items-center border-b",children:_jsx(Link,{className:"px-2",href:"/admin/core",children:_jsx(LogoVitNode,{className:"size-8",small:true})})}),_jsx(SidebarContent,{children:_jsx(NavSidebarAdmin,{pluginNav:pluginNav})})]})};
@@ -1,14 +1 @@
1
- "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { DropdownMenuItem } from "../../../../components/ui/dropdown-menu.js";
4
- import { logOutMutationApi } from "../../../layouts/theme/header/user/auth/log-out-mutation-api.js";
5
- export const SignOutUserFooterSidebarAdmin = ({ children })=>{
6
- return /*#__PURE__*/ _jsx(DropdownMenuItem, {
7
- onClick: async ()=>{
8
- await logOutMutationApi({
9
- isAdmin: true
10
- });
11
- },
12
- children: children
13
- });
14
- };
1
+ "use client";import{jsx as _jsx}from"react/jsx-runtime";import{DropdownMenuItem}from"../../../../components/ui/dropdown-menu.js";import{logOutMutationApi}from"../../../layouts/theme/header/user/auth/log-out-mutation-api.js";export const SignOutUserFooterSidebarAdmin=({children})=>{return _jsx(DropdownMenuItem,{onClick:async()=>{await logOutMutationApi({isAdmin:true})},children:children})};