@opengis/cms 0.0.21 → 0.0.22

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 (183) hide show
  1. package/package.json +2 -2
  2. package/src/App.css +52 -0
  3. package/src/App.vue +62 -0
  4. package/src/assets/image.png +0 -0
  5. package/src/assets/main.css +3 -0
  6. package/src/assets/tailwind-3.4.17.js +113 -0
  7. package/src/components/LanguageSwitcher.vue +73 -0
  8. package/src/components/SettingsCard.vue +40 -0
  9. package/src/components/builder/CreateForm.vue +128 -0
  10. package/src/components/builder/formTypeSchema.js +145 -0
  11. package/src/components/builder/tabs/index.ts +9 -0
  12. package/src/components/builder/tabs/vs-builder-edit.vue +133 -0
  13. package/src/components/builder/tabs/vs-builder-monaco.vue +29 -0
  14. package/src/components/builder/tabs/vs-builder-preview.vue +39 -0
  15. package/src/components/builder/vs-builder-datatable-controls.vue +138 -0
  16. package/src/components/builder/vs-builder-datatable-form.vue +80 -0
  17. package/src/components/builder/vs-builder-datatable.vue +191 -0
  18. package/src/components/builder/vs-builder-list-item.vue +110 -0
  19. package/src/components/collections/CollectionsBreadcrumb.vue +52 -0
  20. package/src/components/collections/CollectionsGrid.vue +176 -0
  21. package/src/components/collections/ContentBlock.vue +75 -0
  22. package/src/components/collections/formWrapper.vue +156 -0
  23. package/src/components/dashboard/ContentItem.vue +82 -0
  24. package/src/components/dashboard/DashboardHeader.vue +33 -0
  25. package/src/components/dashboard/QuickActions.vue +84 -0
  26. package/src/components/dashboard/RecentContent.vue +54 -0
  27. package/src/components/dashboard/StatCard.vue +63 -0
  28. package/src/components/dashboard/StatsGrid.vue +28 -0
  29. package/src/components/form-components/MonacoEditor.vue +104 -0
  30. package/src/components/form-components/VsFormMeta.vue +40 -0
  31. package/src/components/form-components/VsFormTags.vue +150 -0
  32. package/src/components/form-components/custom-datatable/vs-form-custom-datatable-add.vue +84 -0
  33. package/src/components/form-components/custom-datatable/vs-form-custom-datatable-controls.vue +106 -0
  34. package/src/components/form-components/index.js +23 -0
  35. package/src/components/form-components/reference/vs-form-reference-add.vue +92 -0
  36. package/src/components/form-components/reference/vs-form-reference-controls.vue +101 -0
  37. package/src/components/form-components/reference-list/referenceOptionList.js +78 -0
  38. package/src/components/form-components/reference-list/vs-form-reference-add.vue +145 -0
  39. package/src/components/form-components/reference-list/vs-form-reference-choce.vue +39 -0
  40. package/src/components/form-components/reference-list/vs-form-reference-controls.vue +110 -0
  41. package/src/components/form-components/reference-skeleton/about-skeleton.vue +37 -0
  42. package/src/components/form-components/reference-skeleton/banner-skeleton.vue +29 -0
  43. package/src/components/form-components/reference-skeleton/body-skeleton.vue +56 -0
  44. package/src/components/form-components/reference-skeleton/cards-skeleton.vue +47 -0
  45. package/src/components/form-components/reference-skeleton/documents-skeleton.vue +64 -0
  46. package/src/components/form-components/reference-skeleton/faq-skeleton.vue +64 -0
  47. package/src/components/form-components/reference-skeleton/form-skeleton.vue +41 -0
  48. package/src/components/form-components/reference-skeleton/index.js +36 -0
  49. package/src/components/form-components/reference-skeleton/infoLine-skeleton.vue +37 -0
  50. package/src/components/form-components/reference-skeleton/news-skeleton.vue +54 -0
  51. package/src/components/form-components/reference-skeleton/slider-skeleton.vue +41 -0
  52. package/src/components/form-components/reference-skeleton/tabs-skeleton.vue +40 -0
  53. package/src/components/form-components/reference-skeleton/team-skeleton.vue +103 -0
  54. package/src/components/form-components/reference-skeleton/usefulLinks-skeleton.vue +52 -0
  55. package/src/components/form-components/reference-skeleton/video-skeleton.vue +36 -0
  56. package/src/components/form-components/testReferenceTypes.js +773 -0
  57. package/src/components/form-components/vs-form-color-picker.vue +29 -0
  58. package/src/components/form-components/vs-form-custom-datatable.vue +214 -0
  59. package/src/components/form-components/vs-form-integer.vue +86 -0
  60. package/src/components/form-components/vs-form-key-value.vue +201 -0
  61. package/src/components/form-components/vs-form-marcdown-md.vue +3 -0
  62. package/src/components/form-components/vs-form-media-select.vue +780 -0
  63. package/src/components/form-components/vs-form-reference-list.vue +97 -0
  64. package/src/components/form-components/vs-form-reference.vue +59 -0
  65. package/src/components/form-components/vs-form-relation.vue +30 -0
  66. package/src/components/form-components/vs-form-reletion-link.vue +34 -0
  67. package/src/components/form-components/vs-form-select-collection.vue +0 -0
  68. package/src/components/form-components/vs-form-slug.vue +72 -0
  69. package/src/components/form-components/vs-form-tiptap.vue +7 -0
  70. package/src/components/form-components/vs-richtext-md.vue +3 -0
  71. package/src/components/icons/BellIcon.vue +17 -0
  72. package/src/components/icons/GlobeIcon.vue +18 -0
  73. package/src/components/icons/KeyIcon.vue +20 -0
  74. package/src/components/icons/PaletteIcon.vue +22 -0
  75. package/src/components/icons/SettingsIcon.vue +19 -0
  76. package/src/components/icons/ShieldIcon.vue +18 -0
  77. package/src/components/icons/UsersIcon.vue +19 -0
  78. package/src/components/icons/icon-chevron-right.vue +16 -0
  79. package/src/components/icons/icon-drag.vue +20 -0
  80. package/src/components/icons/icon-file-text.vue +21 -0
  81. package/src/components/icons/icon-folder.vue +18 -0
  82. package/src/components/icons/icon-grid.vue +17 -0
  83. package/src/components/icons/icon-group.vue +19 -0
  84. package/src/components/icons/icon-home.vue +16 -0
  85. package/src/components/icons/icon-image.vue +18 -0
  86. package/src/components/icons/icon-list.vue +20 -0
  87. package/src/components/icons/icon-more.vue +17 -0
  88. package/src/components/icons/icon-plus.vue +17 -0
  89. package/src/components/icons-types/icon-array.vue +22 -0
  90. package/src/components/icons-types/icon-boolean.vue +18 -0
  91. package/src/components/icons-types/icon-datalist.vue +22 -0
  92. package/src/components/icons-types/icon-date.vue +20 -0
  93. package/src/components/icons-types/icon-datetime.vue +20 -0
  94. package/src/components/icons-types/icon-file.vue +21 -0
  95. package/src/components/icons-types/icon-gallery.vue +18 -0
  96. package/src/components/icons-types/icon-image.vue +19 -0
  97. package/src/components/icons-types/icon-integer.vue +20 -0
  98. package/src/components/icons-types/icon-merkdown.vue +18 -0
  99. package/src/components/icons-types/icon-multiselect.vue +22 -0
  100. package/src/components/icons-types/icon-number.vue +20 -0
  101. package/src/components/icons-types/icon-radio.vue +22 -0
  102. package/src/components/icons-types/icon-reference-list.vue +22 -0
  103. package/src/components/icons-types/icon-reference.vue +20 -0
  104. package/src/components/icons-types/icon-relation.vue +22 -0
  105. package/src/components/icons-types/icon-richtext.vue +18 -0
  106. package/src/components/icons-types/icon-select.vue +22 -0
  107. package/src/components/icons-types/icon-slug.vue +19 -0
  108. package/src/components/icons-types/icon-text.vue +19 -0
  109. package/src/components/icons-types/index.js +43 -0
  110. package/src/components/layout/Layout.vue +67 -0
  111. package/src/components/layout/Sidebar.vue +128 -0
  112. package/src/components/media/FileUploadProgress.vue +29 -0
  113. package/src/components/media/MediaBreadcrumb.vue +42 -0
  114. package/src/components/media/MediaCreateFolder.vue +59 -0
  115. package/src/components/media/MediaFileInfo.vue +148 -0
  116. package/src/components/media/MediaGrid.vue +148 -0
  117. package/src/components/media/MediaList.vue +148 -0
  118. package/src/components/media/MediaViewControls.vue +38 -0
  119. package/src/components/media/TypeTag.vue +23 -0
  120. package/src/components/menu/AddNewItemInTree.vue +75 -0
  121. package/src/components/menu/MenuBody.vue +149 -0
  122. package/src/components/menu/MenuItem.vue +73 -0
  123. package/src/components/menu/MenuList.vue +101 -0
  124. package/src/components/referencec/index.ts +7 -0
  125. package/src/components/referencec/vs-reference-faq.vue +61 -0
  126. package/src/components/referencec/vs-reference-user-card.vue +40 -0
  127. package/src/components/settings/NotificationSettings.vue +32 -0
  128. package/src/components/settings/SettingsTable.vue +50 -0
  129. package/src/components/settings/SettingsTitle.vue +33 -0
  130. package/src/components/settings/SettingsToggleItem.vue +25 -0
  131. package/src/components/sidebar/DropdownMenu.vue +34 -0
  132. package/src/components/sidebar/SettingsSidebar.vue +121 -0
  133. package/src/components/sidebar/SidebarFooter.vue +52 -0
  134. package/src/components/sidebar/SidebarHeader.vue +57 -0
  135. package/src/components/sidebar/SidebarMenu.vue +78 -0
  136. package/src/components/ui/EmptyData.vue +76 -0
  137. package/src/components/ui/UniversalTable.vue +310 -0
  138. package/src/components/ui/UniversalTableFilters.vue +0 -0
  139. package/src/components/ui/UniversalTablePagination.vue +118 -0
  140. package/src/components/ui/VsPreview.vue +75 -0
  141. package/src/composables/useCollectionView.ts +21 -0
  142. package/src/composables/useDebounce.ts +26 -0
  143. package/src/composables/useMonaco.ts +28 -0
  144. package/src/composables/useTheme.ts +40 -0
  145. package/src/content/test-slug/metadata.json +1 -0
  146. package/src/i18n.ts +75 -0
  147. package/src/index.css +3 -0
  148. package/src/locales/en.json +778 -0
  149. package/src/locales/uk.json +797 -0
  150. package/src/main.ts +41 -0
  151. package/src/pages/Dashboard.vue +168 -0
  152. package/src/pages/EmailPage.vue +183 -0
  153. package/src/pages/FeedbackPage.vue +232 -0
  154. package/src/pages/MediaPage.vue +372 -0
  155. package/src/pages/TagsPage.vue +207 -0
  156. package/src/pages/builder/BuilderPage.vue +195 -0
  157. package/src/pages/builder/EditCollectionPage.vue +163 -0
  158. package/src/pages/collections/ArticlesPage.vue +385 -0
  159. package/src/pages/collections/CollectionsPage.vue +146 -0
  160. package/src/pages/collections/SingletonsPage.vue +119 -0
  161. package/src/pages/collections/contentForm.vue +484 -0
  162. package/src/pages/collections/schema/seo.ts +27 -0
  163. package/src/pages/menu/MenuAddPage.vue +123 -0
  164. package/src/pages/menu/MenuItemPage.vue +183 -0
  165. package/src/pages/menu/MenuPage.vue +133 -0
  166. package/src/pages/settings/ApiKeys.vue +75 -0
  167. package/src/pages/settings/Appearance.vue +80 -0
  168. package/src/pages/settings/Logs.vue +260 -0
  169. package/src/pages/settings/PermissionsPage.vue +237 -0
  170. package/src/pages/settings/Settings.vue +186 -0
  171. package/src/pages/settings/Users.vue +109 -0
  172. package/src/pages/settings/general.vue +154 -0
  173. package/src/pages/settings/generalScheme.js +132 -0
  174. package/src/pages/users/AddUser.vue +106 -0
  175. package/src/pages/users/UsersPage.vue +98 -0
  176. package/src/props/builder.ts +67 -0
  177. package/src/props/content.ts +56 -0
  178. package/src/props/media.ts +63 -0
  179. package/src/router/index.ts +181 -0
  180. package/src/types/fastify-auth.d.ts +4 -0
  181. package/src/utils/getField.js +270 -0
  182. package/src/utils/translit.js +19 -0
  183. package/src/vite-env.d.ts +1 -0
@@ -0,0 +1,22 @@
1
+ <template>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="w-4 h-4 text-gray-700 lucide lucide-list"
13
+ __v0_r="0,5361,5384"
14
+ >
15
+ <line x1="8" x2="21" y1="6" y2="6"></line>
16
+ <line x1="8" x2="21" y1="12" y2="12"></line>
17
+ <line x1="8" x2="21" y1="18" y2="18"></line>
18
+ <line x1="3" x2="3.01" y1="6" y2="6"></line>
19
+ <line x1="3" x2="3.01" y1="12" y2="12"></line>
20
+ <line x1="3" x2="3.01" y1="18" y2="18"></line>
21
+ </svg>
22
+ </template>
@@ -0,0 +1,18 @@
1
+ <template>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="w-4 h-4 text-gray-700 lucide lucide-toggle-left"
13
+ __v0_r="0,5361,5384"
14
+ >
15
+ <rect width="20" height="12" x="2" y="6" rx="6" ry="6"></rect>
16
+ <circle cx="8" cy="12" r="2"></circle>
17
+ </svg>
18
+ </template>
@@ -0,0 +1,22 @@
1
+ <template>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="w-4 h-4 text-gray-700 lucide lucide-list"
13
+ __v0_r="0,5361,5384"
14
+ >
15
+ <line x1="8" x2="21" y1="6" y2="6"></line>
16
+ <line x1="8" x2="21" y1="12" y2="12"></line>
17
+ <line x1="8" x2="21" y1="18" y2="18"></line>
18
+ <line x1="3" x2="3.01" y1="6" y2="6"></line>
19
+ <line x1="3" x2="3.01" y1="12" y2="12"></line>
20
+ <line x1="3" x2="3.01" y1="18" y2="18"></line>
21
+ </svg>
22
+ </template>
@@ -0,0 +1,20 @@
1
+ <template>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="w-4 h-4 text-gray-700 lucide lucide-calendar"
13
+ __v0_r="0,5361,5384"
14
+ >
15
+ <path d="M8 2v4"></path>
16
+ <path d="M16 2v4"></path>
17
+ <rect width="18" height="18" x="3" y="4" rx="2"></rect>
18
+ <path d="M3 10h18"></path>
19
+ </svg>
20
+ </template>
@@ -0,0 +1,20 @@
1
+ <template>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="w-4 h-4 text-gray-700 lucide lucide-calendar"
13
+ __v0_r="0,5361,5384"
14
+ >
15
+ <path d="M8 2v4"></path>
16
+ <path d="M16 2v4"></path>
17
+ <rect width="18" height="18" x="3" y="4" rx="2"></rect>
18
+ <path d="M3 10h18"></path>
19
+ </svg>
20
+ </template>
@@ -0,0 +1,21 @@
1
+ <template>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="w-4 h-4 text-gray-700 lucide lucide-file-text"
13
+ __v0_r="0,5361,5384"
14
+ >
15
+ <path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path>
16
+ <path d="M14 2v4a2 2 0 0 0 2 2h4"></path>
17
+ <path d="M10 9H8"></path>
18
+ <path d="M16 13H8"></path>
19
+ <path d="M16 17H8"></path>
20
+ </svg>
21
+ </template>
@@ -0,0 +1,18 @@
1
+ <template>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="lucide lucide-image-icon w-5 h-5 mr-3"
13
+ >
14
+ <rect width="18" height="18" x="3" y="3" rx="2" ry="2"></rect>
15
+ <circle cx="9" cy="9" r="2"></circle>
16
+ <path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"></path>
17
+ </svg>
18
+ </template>
@@ -0,0 +1,19 @@
1
+ <template>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="w-4 h-4 text-gray-700 lucide lucide-image"
13
+ __v0_r="0,5361,5384"
14
+ >
15
+ <rect width="18" height="18" x="3" y="3" rx="2" ry="2"></rect>
16
+ <circle cx="9" cy="9" r="2"></circle>
17
+ <path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"></path>
18
+ </svg>
19
+ </template>
@@ -0,0 +1,20 @@
1
+ <template>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="w-4 h-4 text-gray-700 lucide lucide-hash"
13
+ __v0_r="0,5361,5384"
14
+ >
15
+ <line x1="4" x2="20" y1="9" y2="9"></line>
16
+ <line x1="4" x2="20" y1="15" y2="15"></line>
17
+ <line x1="10" x2="8" y1="3" y2="21"></line>
18
+ <line x1="16" x2="14" y1="3" y2="21"></line>
19
+ </svg>
20
+ </template>
@@ -0,0 +1,18 @@
1
+ <template>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="w-4 h-4 text-gray-700 lucide lucide-code"
13
+ __v0_r="0,5361,5384"
14
+ >
15
+ <polyline points="16 18 22 12 16 6"></polyline>
16
+ <polyline points="8 6 2 12 8 18"></polyline>
17
+ </svg>
18
+ </template>
@@ -0,0 +1,22 @@
1
+ <template>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="w-4 h-4 text-gray-700 lucide lucide-list"
13
+ __v0_r="0,5361,5384"
14
+ >
15
+ <line x1="8" x2="21" y1="6" y2="6"></line>
16
+ <line x1="8" x2="21" y1="12" y2="12"></line>
17
+ <line x1="8" x2="21" y1="18" y2="18"></line>
18
+ <line x1="3" x2="3.01" y1="6" y2="6"></line>
19
+ <line x1="3" x2="3.01" y1="12" y2="12"></line>
20
+ <line x1="3" x2="3.01" y1="18" y2="18"></line>
21
+ </svg>
22
+ </template>
@@ -0,0 +1,20 @@
1
+ <template>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="w-4 h-4 text-gray-700 lucide lucide-hash"
13
+ __v0_r="0,5361,5384"
14
+ >
15
+ <line x1="4" x2="20" y1="9" y2="9"></line>
16
+ <line x1="4" x2="20" y1="15" y2="15"></line>
17
+ <line x1="10" x2="8" y1="3" y2="21"></line>
18
+ <line x1="16" x2="14" y1="3" y2="21"></line>
19
+ </svg>
20
+ </template>
@@ -0,0 +1,22 @@
1
+ <template>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="w-4 h-4 text-gray-700 lucide lucide-list"
13
+ __v0_r="0,5361,5384"
14
+ >
15
+ <line x1="8" x2="21" y1="6" y2="6"></line>
16
+ <line x1="8" x2="21" y1="12" y2="12"></line>
17
+ <line x1="8" x2="21" y1="18" y2="18"></line>
18
+ <line x1="3" x2="3.01" y1="6" y2="6"></line>
19
+ <line x1="3" x2="3.01" y1="12" y2="12"></line>
20
+ <line x1="3" x2="3.01" y1="18" y2="18"></line>
21
+ </svg>
22
+ </template>
@@ -0,0 +1,22 @@
1
+ <template>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="w-4 h-4 text-gray-700 lucide lucide-list"
13
+ __v0_r="0,5361,5384"
14
+ >
15
+ <line x1="8" x2="21" y1="6" y2="6"></line>
16
+ <line x1="8" x2="21" y1="12" y2="12"></line>
17
+ <line x1="8" x2="21" y1="18" y2="18"></line>
18
+ <line x1="3" x2="3.01" y1="6" y2="6"></line>
19
+ <line x1="3" x2="3.01" y1="12" y2="12"></line>
20
+ <line x1="3" x2="3.01" y1="18" y2="18"></line>
21
+ </svg>
22
+ </template>
@@ -0,0 +1,20 @@
1
+ <template>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="w-4 h-4 text-gray-700 lucide lucide-link2"
13
+ __v0_r="0,5361,5384"
14
+ >
15
+ <path d="M9 17H7A5 5 0 0 1 7 7h2"></path>
16
+ <path d="M15 7h2a5 5 0 1 1 0 10h-2"></path>
17
+ <line x1="8" x2="16" y1="12" y2="12"></line>
18
+ </svg>
19
+ </template>
20
+
@@ -0,0 +1,22 @@
1
+ <template>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="w-4 h-4 text-gray-700 lucide lucide-list"
13
+ __v0_r="0,5361,5384"
14
+ >
15
+ <line x1="8" x2="21" y1="6" y2="6"></line>
16
+ <line x1="8" x2="21" y1="12" y2="12"></line>
17
+ <line x1="8" x2="21" y1="18" y2="18"></line>
18
+ <line x1="3" x2="3.01" y1="6" y2="6"></line>
19
+ <line x1="3" x2="3.01" y1="12" y2="12"></line>
20
+ <line x1="3" x2="3.01" y1="18" y2="18"></line>
21
+ </svg>
22
+ </template>
@@ -0,0 +1,18 @@
1
+ <template>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="w-4 h-4 text-gray-700 lucide lucide-code"
13
+ __v0_r="0,5361,5384"
14
+ >
15
+ <polyline points="16 18 22 12 16 6"></polyline>
16
+ <polyline points="8 6 2 12 8 18"></polyline>
17
+ </svg>
18
+ </template>
@@ -0,0 +1,22 @@
1
+ <template>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="w-4 h-4 text-gray-700 lucide lucide-list"
13
+ __v0_r="0,5361,5384"
14
+ >
15
+ <line x1="8" x2="21" y1="6" y2="6"></line>
16
+ <line x1="8" x2="21" y1="12" y2="12"></line>
17
+ <line x1="8" x2="21" y1="18" y2="18"></line>
18
+ <line x1="3" x2="3.01" y1="6" y2="6"></line>
19
+ <line x1="3" x2="3.01" y1="12" y2="12"></line>
20
+ <line x1="3" x2="3.01" y1="18" y2="18"></line>
21
+ </svg>
22
+ </template>
@@ -0,0 +1,19 @@
1
+ <template>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="w-4 h-4 text-gray-700 lucide lucide-link2"
13
+ __v0_r="0,5361,5384"
14
+ >
15
+ <path d="M9 17H7A5 5 0 0 1 7 7h2"></path>
16
+ <path d="M15 7h2a5 5 0 1 1 0 10h-2"></path>
17
+ <line x1="8" x2="16" y1="12" y2="12"></line>
18
+ </svg>
19
+ </template>
@@ -0,0 +1,19 @@
1
+ <template>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="w-4 h-4 text-gray-700 lucide lucide-type"
13
+ __v0_r="0,5361,5384"
14
+ >
15
+ <polyline points="4 7 4 4 20 4 20 7"></polyline>
16
+ <line x1="9" x2="15" y1="20" y2="20"></line>
17
+ <line x1="12" x2="12" y1="4" y2="20"></line>
18
+ </svg>
19
+ </template>
@@ -0,0 +1,43 @@
1
+ import IconText from "./icon-text.vue";
2
+ import IconNumber from "./icon-number.vue";
3
+ import IconDate from "./icon-date.vue";
4
+ import IconDatetime from "./icon-datetime.vue";
5
+ import IconRichtext from "./icon-richtext.vue";
6
+ import IconBoolean from "./icon-boolean.vue";
7
+ import IconFile from "./icon-file.vue";
8
+ import IconImage from "./icon-image.vue";
9
+ import IconArray from "./icon-array.vue";
10
+ import IconSelect from "./icon-select.vue";
11
+ import IconSlug from "./icon-slug.vue";
12
+ import IconDatalist from "./icon-datalist.vue";
13
+ import IconReference from "./icon-reference.vue";
14
+ import IconReferenceList from "./icon-reference-list.vue";
15
+ import IconRelation from "./icon-relation.vue";
16
+ import IconMultiselect from "./icon-multiselect.vue";
17
+ import IconRadio from "./icon-radio.vue";
18
+ import IconInteger from "./icon-integer.vue";
19
+ import IconGallery from "./icon-gallery.vue";
20
+ import IconMarkdown from "./icon-merkdown.vue";
21
+
22
+ export default {
23
+ IconText,
24
+ IconNumber,
25
+ IconDate,
26
+ IconDatetime,
27
+ IconRichtext,
28
+ IconBoolean,
29
+ IconFile,
30
+ IconImage,
31
+ IconArray,
32
+ IconSelect,
33
+ IconSlug,
34
+ IconDatalist,
35
+ IconReference,
36
+ IconReferenceList,
37
+ IconRelation,
38
+ IconMultiselect,
39
+ IconRadio,
40
+ IconInteger,
41
+ IconGallery,
42
+ IconMarkdown,
43
+ };
@@ -0,0 +1,67 @@
1
+ <template>
2
+ <div
3
+ class="flex-1 min-h-screen overflow-y-auto bg-gradient-to-br from-slate-50 via-blue-50 to-indigo-50 dark:from-slate-900 dark:via-slate-800 dark:to-slate-900"
4
+ >
5
+ <div class="flex h-screen transition-colors">
6
+ <SettingsSidebar v-if="route.path.includes('/settings')" />
7
+ <Sidebar v-else />
8
+
9
+ <main class="flex-1 p-4 overflow-y-auto md:p-6">
10
+ <router-view></router-view>
11
+ </main>
12
+ </div>
13
+ </div>
14
+ </template>
15
+
16
+ <script setup lang="ts">
17
+ import { onMounted, ref, provide, getCurrentInstance } from "vue";
18
+ import { useTheme } from "../../composables/useTheme";
19
+ import Sidebar from "./Sidebar.vue";
20
+ import SettingsSidebar from "../sidebar/SettingsSidebar.vue";
21
+ import { useRoute } from "vue-router";
22
+ const { theme } = useTheme();
23
+ const route = useRoute();
24
+ // Динамічний список типів контенту
25
+ const contentTypes = ref<any[]>([]);
26
+ const menu = ref<any[]>([]);
27
+ const app = getCurrentInstance();
28
+
29
+ async function fetchContentTypes() {
30
+ try {
31
+ const res = await fetch("/api/cms-type?type=collection");
32
+ if (!res.ok) throw new Error("Failed to fetch content types");
33
+ const data = await res.json();
34
+ // Вибираємо тільки типи-колекції (type === 'collection')
35
+ const sortedData = data.rows.sort((a: any, b: any) => {
36
+ // "сторінки" (id='pages') завжди перші
37
+ if (a.id === "pages") return -1;
38
+ if (b.id === "pages") return 1;
39
+ return 0;
40
+ });
41
+ menu.value = sortedData;
42
+ contentTypes.value = sortedData;
43
+ } catch (e) {
44
+ console.error("Error fetching content types:", e);
45
+ }
46
+ }
47
+
48
+ async function fetchSettings() {
49
+ const res = await fetch("/api/settings");
50
+ const data = await res.json();
51
+ // Звернення до глобальної змінної через getCurrentInstance
52
+ if (app && app.appContext.config.globalProperties.$settings) {
53
+ app.appContext.config.globalProperties.$settings.locales =
54
+ data.settings.locales;
55
+ app.appContext.config.globalProperties.$settings.locale =
56
+ data.settings.locale;
57
+ }
58
+ }
59
+
60
+ provide("menu", menu);
61
+ provide("fetchContentTypes", fetchContentTypes);
62
+
63
+ onMounted(() => {
64
+ fetchContentTypes();
65
+ fetchSettings();
66
+ });
67
+ </script>
@@ -0,0 +1,128 @@
1
+ <template>
2
+ <aside
3
+ class="flex-col hidden w-64 transition-colors duration-200 bg-white border-r border-gray-200 md:flex dark:border-gray-700 dark:bg-gray-800"
4
+ >
5
+ <SidebarHeader />
6
+
7
+ <nav class="sidebar-menu flex-1 p-2 overflow-y-auto bg-white dark:bg-slate-800">
8
+ <SidebarMenu
9
+ :navigation-items="navigationItems"
10
+ />
11
+ </nav>
12
+
13
+ <SidebarFooter />
14
+ </aside>
15
+ </template>
16
+
17
+ <script setup lang="ts">
18
+ import { computed, ref, onMounted } from "vue";
19
+ import SidebarMenu from "../sidebar/SidebarMenu.vue";
20
+ import SidebarFooter from "../sidebar/SidebarFooter.vue";
21
+ import SidebarHeader from "../sidebar/SidebarHeader.vue";
22
+ import {
23
+ Home,
24
+ FileText,
25
+ Image,
26
+ Menu,
27
+ Settings,
28
+ Tag,
29
+ Users,
30
+ } from "lucide-vue-next";
31
+
32
+ const userType = ref<string | null>(null);
33
+
34
+ const fetchUserData = async () => {
35
+ try {
36
+ const response = await fetch('/user');
37
+ const data = await response.json();
38
+ userType.value = data?.user?.user_type || null;
39
+ } catch (error) {
40
+ console.error('Error fetching user data:', error);
41
+ }
42
+ };
43
+
44
+ onMounted(() => {
45
+ fetchUserData();
46
+ });
47
+
48
+ const navigationItems = computed(() => {
49
+ const allNavigationItems = [
50
+ {
51
+ id: "dashboard",
52
+ path: "/",
53
+ label: "navigation.dashboard",
54
+ icon: Home,
55
+ },
56
+ {
57
+ id: "content",
58
+ path: "/collections",
59
+ label: "common.content",
60
+ icon: FileText,
61
+ },
62
+ {
63
+ id: "menu",
64
+ path: "/menu",
65
+ label: "navigation.singletonsMenu",
66
+ icon: Menu,
67
+ },
68
+ // {
69
+ // id: "feedback",
70
+ // path: "/feedback",
71
+ // label: "navigation.feedback",
72
+ // icon: FolderUp,
73
+ // },
74
+ // {
75
+ // id: "email",
76
+ // path: "/email",
77
+ // label: "navigation.email",
78
+ // icon: Mail,
79
+ // },
80
+ {
81
+ id: "tags",
82
+ path: "/tags",
83
+ label: "navigation.tags",
84
+ icon: Tag,
85
+ },
86
+ {
87
+ id: "users",
88
+ path: "/users",
89
+ label: "navigation.users",
90
+ icon: Users,
91
+ },
92
+ {
93
+ id: "media",
94
+ path: "/media",
95
+ label: "navigation.media",
96
+ icon: Image,
97
+ },
98
+ {
99
+ id: "settings",
100
+ path: "/settings",
101
+ label: "navigation.settings",
102
+ icon: Settings,
103
+ },
104
+ ];
105
+
106
+ // If user_type is not "admin", filter out "users" and "settings"
107
+ if (userType.value !== "admin") {
108
+ return allNavigationItems.filter(item => item.id !== "users" && item.id !== "settings");
109
+ }
110
+ return allNavigationItems;
111
+ });
112
+ </script>
113
+
114
+ <style scoped>
115
+ .sidebar-menu {
116
+ overflow-y: auto;
117
+ scrollbar-width: thin;
118
+ scrollbar-color: #e0e0e0 #f5f5f5;
119
+ }
120
+
121
+ .sidebar-menu::-webkit-scrollbar {
122
+ width: 4px;
123
+ }
124
+
125
+ .sidebar-menu::-webkit-scrollbar-thumb {
126
+ border-radius: 0;
127
+ }
128
+ </style>