@nuxt-atelier/admin 0.0.0-stage → 0.1.1
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.
- package/LICENSE +21 -0
- package/README.md +6 -2
- package/dist/module.d.mts +52 -0
- package/dist/module.json +12 -0
- package/dist/module.mjs +188 -0
- package/dist/runtime/admin.css +1 -0
- package/dist/runtime/ai-off.d.ts +1 -0
- package/dist/runtime/ai-off.js +1 -0
- package/dist/runtime/appearance.d.ts +59 -0
- package/dist/runtime/appearance.js +111 -0
- package/dist/runtime/branding.d.ts +11 -0
- package/dist/runtime/branding.js +14 -0
- package/dist/runtime/components/App.d.vue.ts +6 -0
- package/dist/runtime/components/App.vue +170 -0
- package/dist/runtime/components/App.vue.d.ts +6 -0
- package/dist/runtime/components/AppearanceModal.d.vue.ts +3 -0
- package/dist/runtime/components/AppearanceModal.vue +267 -0
- package/dist/runtime/components/AppearanceModal.vue.d.ts +3 -0
- package/dist/runtime/components/AuthFrame.d.vue.ts +15 -0
- package/dist/runtime/components/AuthFrame.vue +56 -0
- package/dist/runtime/components/AuthFrame.vue.d.ts +15 -0
- package/dist/runtime/components/BlocksField.d.vue.ts +14 -0
- package/dist/runtime/components/BlocksField.vue +167 -0
- package/dist/runtime/components/BlocksField.vue.d.ts +14 -0
- package/dist/runtime/components/Brand.d.vue.ts +6 -0
- package/dist/runtime/components/Brand.vue +22 -0
- package/dist/runtime/components/Brand.vue.d.ts +6 -0
- package/dist/runtime/components/CollectionList.d.vue.ts +6 -0
- package/dist/runtime/components/CollectionList.vue +312 -0
- package/dist/runtime/components/CollectionList.vue.d.ts +6 -0
- package/dist/runtime/components/CommentsPanel.d.vue.ts +9 -0
- package/dist/runtime/components/CommentsPanel.vue +228 -0
- package/dist/runtime/components/CommentsPanel.vue.d.ts +9 -0
- package/dist/runtime/components/EntryEdit.d.vue.ts +9 -0
- package/dist/runtime/components/EntryEdit.vue +457 -0
- package/dist/runtime/components/EntryEdit.vue.d.ts +9 -0
- package/dist/runtime/components/FieldInput.d.vue.ts +13 -0
- package/dist/runtime/components/FieldInput.vue +356 -0
- package/dist/runtime/components/FieldInput.vue.d.ts +13 -0
- package/dist/runtime/components/FormSubmissions.d.vue.ts +6 -0
- package/dist/runtime/components/FormSubmissions.vue +197 -0
- package/dist/runtime/components/FormSubmissions.vue.d.ts +6 -0
- package/dist/runtime/components/GlobalSearch.d.vue.ts +10 -0
- package/dist/runtime/components/GlobalSearch.vue +145 -0
- package/dist/runtime/components/GlobalSearch.vue.d.ts +10 -0
- package/dist/runtime/components/Home.d.vue.ts +3 -0
- package/dist/runtime/components/Home.vue +247 -0
- package/dist/runtime/components/Home.vue.d.ts +3 -0
- package/dist/runtime/components/Icon.d.ts +14 -0
- package/dist/runtime/components/Icon.js +12 -0
- package/dist/runtime/components/MediaDetails.d.vue.ts +11 -0
- package/dist/runtime/components/MediaDetails.vue +222 -0
- package/dist/runtime/components/MediaDetails.vue.d.ts +11 -0
- package/dist/runtime/components/MediaField.d.vue.ts +14 -0
- package/dist/runtime/components/MediaField.vue +86 -0
- package/dist/runtime/components/MediaField.vue.d.ts +14 -0
- package/dist/runtime/components/MediaGrid.d.vue.ts +13 -0
- package/dist/runtime/components/MediaGrid.vue +49 -0
- package/dist/runtime/components/MediaGrid.vue.d.ts +13 -0
- package/dist/runtime/components/MediaLibrary.d.vue.ts +12 -0
- package/dist/runtime/components/MediaLibrary.vue +151 -0
- package/dist/runtime/components/MediaLibrary.vue.d.ts +12 -0
- package/dist/runtime/components/NotFound.d.vue.ts +6 -0
- package/dist/runtime/components/NotFound.vue +29 -0
- package/dist/runtime/components/NotFound.vue.d.ts +6 -0
- package/dist/runtime/components/NotificationBell.d.vue.ts +3 -0
- package/dist/runtime/components/NotificationBell.vue +53 -0
- package/dist/runtime/components/NotificationBell.vue.d.ts +3 -0
- package/dist/runtime/components/Page.d.vue.ts +28 -0
- package/dist/runtime/components/Page.vue +84 -0
- package/dist/runtime/components/Page.vue.d.ts +28 -0
- package/dist/runtime/components/RelatedCreate.d.vue.ts +16 -0
- package/dist/runtime/components/RelatedCreate.vue +86 -0
- package/dist/runtime/components/RelatedCreate.vue.d.ts +16 -0
- package/dist/runtime/components/RevisionHistory.d.vue.ts +16 -0
- package/dist/runtime/components/RevisionHistory.vue +145 -0
- package/dist/runtime/components/RevisionHistory.vue.d.ts +16 -0
- package/dist/runtime/components/RichTextEditor.d.vue.ts +15 -0
- package/dist/runtime/components/RichTextEditor.vue +190 -0
- package/dist/runtime/components/RichTextEditor.vue.d.ts +15 -0
- package/dist/runtime/components/RobotsSettings.d.vue.ts +3 -0
- package/dist/runtime/components/RobotsSettings.vue +173 -0
- package/dist/runtime/components/RobotsSettings.vue.d.ts +3 -0
- package/dist/runtime/components/RoleEdit.d.vue.ts +6 -0
- package/dist/runtime/components/RoleEdit.vue +234 -0
- package/dist/runtime/components/RoleEdit.vue.d.ts +6 -0
- package/dist/runtime/components/Roles.d.vue.ts +3 -0
- package/dist/runtime/components/Roles.vue +129 -0
- package/dist/runtime/components/Roles.vue.d.ts +3 -0
- package/dist/runtime/components/ScheduleSection.d.vue.ts +12 -0
- package/dist/runtime/components/ScheduleSection.vue +120 -0
- package/dist/runtime/components/ScheduleSection.vue.d.ts +12 -0
- package/dist/runtime/components/SeoPanel.d.vue.ts +7 -0
- package/dist/runtime/components/SeoPanel.vue +81 -0
- package/dist/runtime/components/SeoPanel.vue.d.ts +7 -0
- package/dist/runtime/components/Setup.d.vue.ts +3 -0
- package/dist/runtime/components/Setup.vue +79 -0
- package/dist/runtime/components/Setup.vue.d.ts +3 -0
- package/dist/runtime/components/SharedBlockUsage.d.vue.ts +7 -0
- package/dist/runtime/components/SharedBlockUsage.vue +91 -0
- package/dist/runtime/components/SharedBlockUsage.vue.d.ts +7 -0
- package/dist/runtime/components/Shell.d.vue.ts +15 -0
- package/dist/runtime/components/Shell.vue +281 -0
- package/dist/runtime/components/Shell.vue.d.ts +15 -0
- package/dist/runtime/components/SignIn.d.vue.ts +3 -0
- package/dist/runtime/components/SignIn.vue +106 -0
- package/dist/runtime/components/SignIn.vue.d.ts +3 -0
- package/dist/runtime/components/Toaster.d.vue.ts +3 -0
- package/dist/runtime/components/Toaster.vue +24 -0
- package/dist/runtime/components/Toaster.vue.d.ts +3 -0
- package/dist/runtime/components/Users.d.vue.ts +3 -0
- package/dist/runtime/components/Users.vue +226 -0
- package/dist/runtime/components/Users.vue.d.ts +3 -0
- package/dist/runtime/composables/debounced.d.ts +3 -0
- package/dist/runtime/composables/debounced.js +11 -0
- package/dist/runtime/composables/useAtelierAdmin.d.ts +17 -0
- package/dist/runtime/composables/useAtelierAdmin.js +53 -0
- package/dist/runtime/composables/useAtelierAdminPortal.d.ts +3 -0
- package/dist/runtime/composables/useAtelierAdminPortal.js +5 -0
- package/dist/runtime/composables/useAtelierAdminSchema.d.ts +182 -0
- package/dist/runtime/composables/useAtelierAdminSchema.js +26 -0
- package/dist/runtime/composables/useAtelierCollection.d.ts +49 -0
- package/dist/runtime/composables/useAtelierCollection.js +77 -0
- package/dist/runtime/composables/useAtelierComments.d.ts +50 -0
- package/dist/runtime/composables/useAtelierComments.js +46 -0
- package/dist/runtime/composables/useAtelierDashboard.d.ts +42 -0
- package/dist/runtime/composables/useAtelierDashboard.js +16 -0
- package/dist/runtime/composables/useAtelierEntryForm.d.ts +77 -0
- package/dist/runtime/composables/useAtelierEntryForm.js +184 -0
- package/dist/runtime/composables/useAtelierGlobalSearch.d.ts +12 -0
- package/dist/runtime/composables/useAtelierGlobalSearch.js +17 -0
- package/dist/runtime/composables/useAtelierMediaLibrary.d.ts +75 -0
- package/dist/runtime/composables/useAtelierMediaLibrary.js +85 -0
- package/dist/runtime/composables/useAtelierNavigation.d.ts +20 -0
- package/dist/runtime/composables/useAtelierNavigation.js +37 -0
- package/dist/runtime/composables/useAtelierNotifications.d.ts +21 -0
- package/dist/runtime/composables/useAtelierNotifications.js +34 -0
- package/dist/runtime/composables/useAtelierPermissions.d.ts +11 -0
- package/dist/runtime/composables/useAtelierPermissions.js +15 -0
- package/dist/runtime/composables/useAtelierPresence.d.ts +32 -0
- package/dist/runtime/composables/useAtelierPresence.js +95 -0
- package/dist/runtime/composables/useAtelierRealtime.d.ts +10 -0
- package/dist/runtime/composables/useAtelierRealtime.js +74 -0
- package/dist/runtime/composables/useAtelierRoles.d.ts +13 -0
- package/dist/runtime/composables/useAtelierRoles.js +15 -0
- package/dist/runtime/composables/useAtelierSeo.d.ts +34 -0
- package/dist/runtime/composables/useAtelierSeo.js +57 -0
- package/dist/runtime/composables/useAtelierSession.d.ts +35 -0
- package/dist/runtime/composables/useAtelierSession.js +36 -0
- package/dist/runtime/composables/useAtelierSetting.d.ts +11 -0
- package/dist/runtime/composables/useAtelierSetting.js +16 -0
- package/dist/runtime/composables/useAtelierUsers.d.ts +18 -0
- package/dist/runtime/composables/useAtelierUsers.js +16 -0
- package/dist/runtime/crystal-neuo/VERSION +3 -0
- package/dist/runtime/crystal-neuo/components/Alert.d.vue.ts +25 -0
- package/dist/runtime/crystal-neuo/components/Alert.vue +25 -0
- package/dist/runtime/crystal-neuo/components/Alert.vue.d.ts +25 -0
- package/dist/runtime/crystal-neuo/components/Avatar.d.vue.ts +15 -0
- package/dist/runtime/crystal-neuo/components/Avatar.vue +25 -0
- package/dist/runtime/crystal-neuo/components/Avatar.vue.d.ts +15 -0
- package/dist/runtime/crystal-neuo/components/Badge.d.vue.ts +25 -0
- package/dist/runtime/crystal-neuo/components/Badge.vue +17 -0
- package/dist/runtime/crystal-neuo/components/Badge.vue.d.ts +25 -0
- package/dist/runtime/crystal-neuo/components/Breadcrumb.d.vue.ts +16 -0
- package/dist/runtime/crystal-neuo/components/Breadcrumb.vue +26 -0
- package/dist/runtime/crystal-neuo/components/Breadcrumb.vue.d.ts +16 -0
- package/dist/runtime/crystal-neuo/components/Button.d.vue.ts +35 -0
- package/dist/runtime/crystal-neuo/components/Button.vue +31 -0
- package/dist/runtime/crystal-neuo/components/Button.vue.d.ts +35 -0
- package/dist/runtime/crystal-neuo/components/Card.d.vue.ts +25 -0
- package/dist/runtime/crystal-neuo/components/Card.vue +17 -0
- package/dist/runtime/crystal-neuo/components/Card.vue.d.ts +25 -0
- package/dist/runtime/crystal-neuo/components/Checkbox.d.vue.ts +23 -0
- package/dist/runtime/crystal-neuo/components/Checkbox.vue +45 -0
- package/dist/runtime/crystal-neuo/components/Checkbox.vue.d.ts +23 -0
- package/dist/runtime/crystal-neuo/components/DatePicker.d.vue.ts +24 -0
- package/dist/runtime/crystal-neuo/components/DatePicker.vue +43 -0
- package/dist/runtime/crystal-neuo/components/DatePicker.vue.d.ts +24 -0
- package/dist/runtime/crystal-neuo/components/Dialog.d.vue.ts +41 -0
- package/dist/runtime/crystal-neuo/components/Dialog.vue +63 -0
- package/dist/runtime/crystal-neuo/components/Dialog.vue.d.ts +41 -0
- package/dist/runtime/crystal-neuo/components/Drawer.d.vue.ts +34 -0
- package/dist/runtime/crystal-neuo/components/Drawer.vue +45 -0
- package/dist/runtime/crystal-neuo/components/Drawer.vue.d.ts +34 -0
- package/dist/runtime/crystal-neuo/components/FileUpload.d.vue.ts +32 -0
- package/dist/runtime/crystal-neuo/components/FileUpload.vue +94 -0
- package/dist/runtime/crystal-neuo/components/FileUpload.vue.d.ts +32 -0
- package/dist/runtime/crystal-neuo/components/Input.d.vue.ts +26 -0
- package/dist/runtime/crystal-neuo/components/Input.vue +48 -0
- package/dist/runtime/crystal-neuo/components/Input.vue.d.ts +26 -0
- package/dist/runtime/crystal-neuo/components/List.d.vue.ts +25 -0
- package/dist/runtime/crystal-neuo/components/List.vue +19 -0
- package/dist/runtime/crystal-neuo/components/List.vue.d.ts +25 -0
- package/dist/runtime/crystal-neuo/components/ListItem.d.vue.ts +20 -0
- package/dist/runtime/crystal-neuo/components/ListItem.vue +13 -0
- package/dist/runtime/crystal-neuo/components/ListItem.vue.d.ts +20 -0
- package/dist/runtime/crystal-neuo/components/Menu.d.vue.ts +26 -0
- package/dist/runtime/crystal-neuo/components/Menu.vue +120 -0
- package/dist/runtime/crystal-neuo/components/Menu.vue.d.ts +26 -0
- package/dist/runtime/crystal-neuo/components/Modal.d.vue.ts +32 -0
- package/dist/runtime/crystal-neuo/components/Modal.vue +37 -0
- package/dist/runtime/crystal-neuo/components/Modal.vue.d.ts +32 -0
- package/dist/runtime/crystal-neuo/components/Nav.d.vue.ts +24 -0
- package/dist/runtime/crystal-neuo/components/Nav.vue +15 -0
- package/dist/runtime/crystal-neuo/components/Nav.vue.d.ts +24 -0
- package/dist/runtime/crystal-neuo/components/NavLink.d.vue.ts +22 -0
- package/dist/runtime/crystal-neuo/components/NavLink.vue +23 -0
- package/dist/runtime/crystal-neuo/components/NavLink.vue.d.ts +22 -0
- package/dist/runtime/crystal-neuo/components/Pagination.d.vue.ts +23 -0
- package/dist/runtime/crystal-neuo/components/Pagination.vue +58 -0
- package/dist/runtime/crystal-neuo/components/Pagination.vue.d.ts +23 -0
- package/dist/runtime/crystal-neuo/components/Progress.d.vue.ts +18 -0
- package/dist/runtime/crystal-neuo/components/Progress.vue +35 -0
- package/dist/runtime/crystal-neuo/components/Progress.vue.d.ts +18 -0
- package/dist/runtime/crystal-neuo/components/Radio.d.vue.ts +28 -0
- package/dist/runtime/crystal-neuo/components/Radio.vue +40 -0
- package/dist/runtime/crystal-neuo/components/Radio.vue.d.ts +28 -0
- package/dist/runtime/crystal-neuo/components/SegmentedControl.d.vue.ts +31 -0
- package/dist/runtime/crystal-neuo/components/SegmentedControl.vue +39 -0
- package/dist/runtime/crystal-neuo/components/SegmentedControl.vue.d.ts +31 -0
- package/dist/runtime/crystal-neuo/components/Select.d.vue.ts +28 -0
- package/dist/runtime/crystal-neuo/components/Select.vue +48 -0
- package/dist/runtime/crystal-neuo/components/Select.vue.d.ts +28 -0
- package/dist/runtime/crystal-neuo/components/Sheet.d.vue.ts +29 -0
- package/dist/runtime/crystal-neuo/components/Sheet.vue +37 -0
- package/dist/runtime/crystal-neuo/components/Sheet.vue.d.ts +29 -0
- package/dist/runtime/crystal-neuo/components/Skeleton.d.vue.ts +13 -0
- package/dist/runtime/crystal-neuo/components/Skeleton.vue +17 -0
- package/dist/runtime/crystal-neuo/components/Skeleton.vue.d.ts +13 -0
- package/dist/runtime/crystal-neuo/components/Slider.d.vue.ts +28 -0
- package/dist/runtime/crystal-neuo/components/Slider.vue +41 -0
- package/dist/runtime/crystal-neuo/components/Slider.vue.d.ts +28 -0
- package/dist/runtime/crystal-neuo/components/TabBar.d.vue.ts +28 -0
- package/dist/runtime/crystal-neuo/components/TabBar.vue +29 -0
- package/dist/runtime/crystal-neuo/components/TabBar.vue.d.ts +28 -0
- package/dist/runtime/crystal-neuo/components/Table.d.vue.ts +31 -0
- package/dist/runtime/crystal-neuo/components/Table.vue +36 -0
- package/dist/runtime/crystal-neuo/components/Table.vue.d.ts +31 -0
- package/dist/runtime/crystal-neuo/components/Tabs.d.vue.ts +40 -0
- package/dist/runtime/crystal-neuo/components/Tabs.vue +79 -0
- package/dist/runtime/crystal-neuo/components/Tabs.vue.d.ts +40 -0
- package/dist/runtime/crystal-neuo/components/Textarea.d.vue.ts +25 -0
- package/dist/runtime/crystal-neuo/components/Textarea.vue +48 -0
- package/dist/runtime/crystal-neuo/components/Textarea.vue.d.ts +25 -0
- package/dist/runtime/crystal-neuo/components/Toast.d.vue.ts +32 -0
- package/dist/runtime/crystal-neuo/components/Toast.vue +67 -0
- package/dist/runtime/crystal-neuo/components/Toast.vue.d.ts +32 -0
- package/dist/runtime/crystal-neuo/components/Toggle.d.vue.ts +21 -0
- package/dist/runtime/crystal-neuo/components/Toggle.vue +43 -0
- package/dist/runtime/crystal-neuo/components/Toggle.vue.d.ts +21 -0
- package/dist/runtime/crystal-neuo/components/Tooltip.d.vue.ts +23 -0
- package/dist/runtime/crystal-neuo/components/Tooltip.vue +38 -0
- package/dist/runtime/crystal-neuo/components/Tooltip.vue.d.ts +23 -0
- package/dist/runtime/crystal-neuo/components/cn.d.ts +1 -0
- package/dist/runtime/crystal-neuo/components/cn.js +3 -0
- package/dist/runtime/crystal-neuo/components/useControlAttrs.d.ts +15 -0
- package/dist/runtime/crystal-neuo/components/useControlAttrs.js +11 -0
- package/dist/runtime/crystal-neuo/components/useFocusTrap.d.ts +9 -0
- package/dist/runtime/crystal-neuo/components/useFocusTrap.js +55 -0
- package/dist/runtime/crystal-neuo/components/useModalDialog.d.ts +11 -0
- package/dist/runtime/crystal-neuo/components/useModalDialog.js +42 -0
- package/dist/runtime/crystal-neuo/contract/alert.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/alert.contract.js +18 -0
- package/dist/runtime/crystal-neuo/contract/avatar.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/avatar.contract.js +18 -0
- package/dist/runtime/crystal-neuo/contract/badge.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/badge.contract.js +18 -0
- package/dist/runtime/crystal-neuo/contract/breadcrumb.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/breadcrumb.contract.js +19 -0
- package/dist/runtime/crystal-neuo/contract/button.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/button.contract.js +22 -0
- package/dist/runtime/crystal-neuo/contract/card.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/card.contract.js +18 -0
- package/dist/runtime/crystal-neuo/contract/checkbox.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/checkbox.contract.js +19 -0
- package/dist/runtime/crystal-neuo/contract/date-picker.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/date-picker.contract.js +22 -0
- package/dist/runtime/crystal-neuo/contract/dialog.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/dialog.contract.js +23 -0
- package/dist/runtime/crystal-neuo/contract/drawer.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/drawer.contract.js +23 -0
- package/dist/runtime/crystal-neuo/contract/file-upload.contract.d.ts +17 -0
- package/dist/runtime/crystal-neuo/contract/file-upload.contract.js +36 -0
- package/dist/runtime/crystal-neuo/contract/index.d.ts +67 -0
- package/dist/runtime/crystal-neuo/contract/index.js +96 -0
- package/dist/runtime/crystal-neuo/contract/input.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/input.contract.js +19 -0
- package/dist/runtime/crystal-neuo/contract/list.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/list.contract.js +21 -0
- package/dist/runtime/crystal-neuo/contract/menu.contract.d.ts +21 -0
- package/dist/runtime/crystal-neuo/contract/menu.contract.js +51 -0
- package/dist/runtime/crystal-neuo/contract/modal.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/modal.contract.js +24 -0
- package/dist/runtime/crystal-neuo/contract/nav.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/nav.contract.js +18 -0
- package/dist/runtime/crystal-neuo/contract/pagination.contract.d.ts +11 -0
- package/dist/runtime/crystal-neuo/contract/pagination.contract.js +32 -0
- package/dist/runtime/crystal-neuo/contract/progress.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/progress.contract.js +19 -0
- package/dist/runtime/crystal-neuo/contract/radio.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/radio.contract.js +24 -0
- package/dist/runtime/crystal-neuo/contract/segmented-control.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/segmented-control.contract.js +23 -0
- package/dist/runtime/crystal-neuo/contract/select.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/select.contract.js +24 -0
- package/dist/runtime/crystal-neuo/contract/sheet.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/sheet.contract.js +23 -0
- package/dist/runtime/crystal-neuo/contract/skeleton.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/skeleton.contract.js +18 -0
- package/dist/runtime/crystal-neuo/contract/slider.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/slider.contract.js +24 -0
- package/dist/runtime/crystal-neuo/contract/tab-bar.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/tab-bar.contract.js +19 -0
- package/dist/runtime/crystal-neuo/contract/table.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/table.contract.js +18 -0
- package/dist/runtime/crystal-neuo/contract/tabs.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/tabs.contract.js +26 -0
- package/dist/runtime/crystal-neuo/contract/textarea.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/textarea.contract.js +19 -0
- package/dist/runtime/crystal-neuo/contract/toast.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/toast.contract.js +18 -0
- package/dist/runtime/crystal-neuo/contract/toggle.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/toggle.contract.js +22 -0
- package/dist/runtime/crystal-neuo/contract/tooltip.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/tooltip.contract.js +18 -0
- package/dist/runtime/crystal-neuo/contract/types.d.ts +76 -0
- package/dist/runtime/crystal-neuo/contract/types.js +12 -0
- package/dist/runtime/crystal-neuo/css/crystal-neuo.css +1 -0
- package/dist/runtime/crystal-neuo/runtime/axes.d.ts +16 -0
- package/dist/runtime/crystal-neuo/runtime/axes.js +9 -0
- package/dist/runtime/crystal-neuo/runtime/index.d.ts +62 -0
- package/dist/runtime/crystal-neuo/runtime/index.js +115 -0
- package/dist/runtime/crystal-neuo/runtime/platform.d.ts +11 -0
- package/dist/runtime/crystal-neuo/runtime/platform.js +18 -0
- package/dist/runtime/crystal-neuo/runtime/refraction.d.ts +42 -0
- package/dist/runtime/crystal-neuo/runtime/refraction.js +183 -0
- package/dist/runtime/css/shell.css +1 -0
- package/dist/runtime/i18n/en.d.ts +2 -0
- package/dist/runtime/i18n/en.js +543 -0
- package/dist/runtime/i18n/index.d.ts +15 -0
- package/dist/runtime/i18n/index.js +52 -0
- package/dist/runtime/overrides.d.ts +5 -0
- package/dist/runtime/overrides.js +6 -0
- package/dist/runtime/pages/AdminPage.d.vue.ts +3 -0
- package/dist/runtime/pages/AdminPage.vue +49 -0
- package/dist/runtime/pages/AdminPage.vue.d.ts +3 -0
- package/dist/runtime/passkeys-off.d.ts +1 -0
- package/dist/runtime/passkeys-off.js +3 -0
- package/dist/runtime/passkeys.d.ts +1 -0
- package/dist/runtime/passkeys.js +6 -0
- package/dist/runtime/toast.d.ts +15 -0
- package/dist/runtime/toast.js +19 -0
- package/dist/runtime/types.d.ts +133 -0
- package/dist/runtime/types.js +0 -0
- package/dist/types.d.mts +3 -0
- package/package.json +59 -4
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
name?: string;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, reactive, ref, watch } from "vue";
|
|
3
|
+
import { navigateTo } from "#imports";
|
|
4
|
+
import { useAtelierAdmin } from "../composables/useAtelierAdmin";
|
|
5
|
+
import { useAtelierAdminSchema } from "../composables/useAtelierAdminSchema";
|
|
6
|
+
import { humanize } from "../composables/useAtelierNavigation";
|
|
7
|
+
import { useAtelierPermissions } from "../composables/useAtelierPermissions";
|
|
8
|
+
import { useAtelierRoles } from "../composables/useAtelierRoles";
|
|
9
|
+
import CnAlert from "../crystal-neuo/components/Alert.vue";
|
|
10
|
+
import CnButton from "../crystal-neuo/components/Button.vue";
|
|
11
|
+
import CnCheckbox from "../crystal-neuo/components/Checkbox.vue";
|
|
12
|
+
import CnInput from "../crystal-neuo/components/Input.vue";
|
|
13
|
+
import CnSelect from "../crystal-neuo/components/Select.vue";
|
|
14
|
+
import { useAdminToast } from "../toast";
|
|
15
|
+
import NotFound from "./NotFound.vue";
|
|
16
|
+
import Page from "./Page.vue";
|
|
17
|
+
import { useAdminI18n } from "../i18n";
|
|
18
|
+
const { t } = useAdminI18n();
|
|
19
|
+
const props = defineProps({
|
|
20
|
+
name: { type: String, required: false }
|
|
21
|
+
});
|
|
22
|
+
const { to } = useAtelierAdmin();
|
|
23
|
+
const { manages } = useAtelierPermissions();
|
|
24
|
+
const { schema } = useAtelierAdminSchema();
|
|
25
|
+
const { roles, save } = useAtelierRoles();
|
|
26
|
+
const toast = useAdminToast();
|
|
27
|
+
const ACTIONS = ["create", "read", "update", "delete", "publish", "comment"];
|
|
28
|
+
const CAPABILITIES = [
|
|
29
|
+
{ value: "users", label: "capability.users" },
|
|
30
|
+
{ value: "roles", label: "capability.roles" },
|
|
31
|
+
{ value: "media", label: "capability.media" },
|
|
32
|
+
{ value: "redirects", label: "capability.redirects" },
|
|
33
|
+
{ value: "settings", label: "capability.settings" },
|
|
34
|
+
{ value: "forms", label: "capability.forms" },
|
|
35
|
+
{ value: "ai", label: "capability.ai" }
|
|
36
|
+
];
|
|
37
|
+
const existing = computed(() => props.name ? roles.value.find((r) => r.name === props.name) : void 0);
|
|
38
|
+
const form = reactive({ name: "", label: "", capabilities: [], content: {} });
|
|
39
|
+
const error = ref("");
|
|
40
|
+
watch(existing, (entry) => {
|
|
41
|
+
if (!entry)
|
|
42
|
+
return;
|
|
43
|
+
form.name = entry.name;
|
|
44
|
+
form.label = entry.role.label ?? "";
|
|
45
|
+
form.capabilities = [...entry.role.capabilities ?? []];
|
|
46
|
+
form.content = JSON.parse(JSON.stringify(entry.role.content ?? {}));
|
|
47
|
+
}, { immediate: true });
|
|
48
|
+
const types = computed(() => [
|
|
49
|
+
{ name: "*", label: t("roles.everyOther"), fields: {} },
|
|
50
|
+
...(schema.value?.collections ?? []).map((c) => ({ name: c.name, label: c.labels?.plural ?? humanize(c.name), fields: c.fields })),
|
|
51
|
+
...(schema.value?.singletons ?? []).map((s) => ({ name: s.name, label: s.label ?? humanize(s.name), fields: s.fields }))
|
|
52
|
+
]);
|
|
53
|
+
const rule = (type) => form.content[type] ??= { actions: [] };
|
|
54
|
+
const has = (type, action) => form.content[type]?.actions.includes(action) ?? false;
|
|
55
|
+
function toggle(type, action, on) {
|
|
56
|
+
const r = rule(type);
|
|
57
|
+
r.actions = on ? [.../* @__PURE__ */ new Set([...r.actions, action])] : r.actions.filter((a) => a !== action);
|
|
58
|
+
if (!r.actions.length)
|
|
59
|
+
form.content = Object.fromEntries(Object.entries(form.content).filter(([name]) => name !== type));
|
|
60
|
+
else if (r.ownOnly?.length)
|
|
61
|
+
r.ownOnly = r.actions.filter((a) => a !== "create");
|
|
62
|
+
}
|
|
63
|
+
const ownOnly = (type) => !!form.content[type]?.ownOnly?.length;
|
|
64
|
+
function setOwnOnly(type, on) {
|
|
65
|
+
const r = rule(type);
|
|
66
|
+
r.ownOnly = on ? r.actions.filter((a) => a !== "create") : void 0;
|
|
67
|
+
}
|
|
68
|
+
const fieldAccess = (type, field) => form.content[type]?.hidden?.includes(field) ? "hidden" : form.content[type]?.readOnly?.includes(field) ? "readOnly" : "";
|
|
69
|
+
function setFieldAccess(type, field, access) {
|
|
70
|
+
const r = rule(type);
|
|
71
|
+
r.hidden = (r.hidden ?? []).filter((f) => f !== field);
|
|
72
|
+
r.readOnly = (r.readOnly ?? []).filter((f) => f !== field);
|
|
73
|
+
if (access === "hidden")
|
|
74
|
+
r.hidden.push(field);
|
|
75
|
+
if (access === "readOnly")
|
|
76
|
+
r.readOnly.push(field);
|
|
77
|
+
}
|
|
78
|
+
const ACCESS = computed(() => [{ value: "", label: t("roles.canChange") }, { value: "readOnly", label: t("roles.readOnly") }, { value: "hidden", label: t("roles.hidden") }]);
|
|
79
|
+
async function submit() {
|
|
80
|
+
error.value = "";
|
|
81
|
+
const content = Object.fromEntries(Object.entries(form.content).map(([type, r]) => [type, {
|
|
82
|
+
actions: r.actions,
|
|
83
|
+
...r.ownOnly?.length ? { ownOnly: r.ownOnly } : {},
|
|
84
|
+
...r.hidden?.length ? { hidden: r.hidden } : {},
|
|
85
|
+
...r.readOnly?.length ? { readOnly: r.readOnly } : {}
|
|
86
|
+
}]));
|
|
87
|
+
const role = { ...form.label ? { label: form.label } : {}, capabilities: form.capabilities, content };
|
|
88
|
+
try {
|
|
89
|
+
await save.mutateAsync({ name: form.name, role });
|
|
90
|
+
toast.add({ color: "success", title: t("roles.saved") });
|
|
91
|
+
if (!props.name)
|
|
92
|
+
await navigateTo(to("roles", form.name), { replace: true });
|
|
93
|
+
} catch (e) {
|
|
94
|
+
error.value = e.errors?.map((x) => `${x.path}: ${x.message}`).join(". ") || e.message;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
</script>
|
|
98
|
+
|
|
99
|
+
<template>
|
|
100
|
+
<NotFound
|
|
101
|
+
v-if="!manages('roles') || name && roles.length && existing?.source !== 'database'"
|
|
102
|
+
:forbidden="manages('roles')"
|
|
103
|
+
/>
|
|
104
|
+
<Page
|
|
105
|
+
v-else
|
|
106
|
+
:title="name ? t('roles.title', { name: form.label || name }) : t('roles.new')"
|
|
107
|
+
:breadcrumb="[{ label: t('nav.roles'), to: to('roles') }, { label: name ?? t('roles.new') }]"
|
|
108
|
+
>
|
|
109
|
+
<form
|
|
110
|
+
class="app-form"
|
|
111
|
+
@submit.prevent="submit"
|
|
112
|
+
>
|
|
113
|
+
<CnInput
|
|
114
|
+
v-if="!name"
|
|
115
|
+
v-model="form.name"
|
|
116
|
+
:label="t('common.name')"
|
|
117
|
+
:hint="t('roles.nameHint')"
|
|
118
|
+
required
|
|
119
|
+
pattern="[a-z][a-z0-9-]*"
|
|
120
|
+
/>
|
|
121
|
+
<CnInput
|
|
122
|
+
v-model="form.label"
|
|
123
|
+
:label="t('roles.label')"
|
|
124
|
+
:hint="t('roles.labelHint')"
|
|
125
|
+
/>
|
|
126
|
+
|
|
127
|
+
<fieldset class="app-fieldset">
|
|
128
|
+
<legend class="cn-label">
|
|
129
|
+
{{ t("roles.manages") }}
|
|
130
|
+
</legend>
|
|
131
|
+
<CnCheckbox
|
|
132
|
+
v-for="c in CAPABILITIES"
|
|
133
|
+
:key="c.value"
|
|
134
|
+
:label="t(c.label)"
|
|
135
|
+
:checked="form.capabilities.includes(c.value)"
|
|
136
|
+
@update:checked="(on) => form.capabilities = on ? [...form.capabilities, c.value] : form.capabilities.filter((x) => x !== c.value)"
|
|
137
|
+
/>
|
|
138
|
+
</fieldset>
|
|
139
|
+
|
|
140
|
+
<div class="app-table-wrap">
|
|
141
|
+
<table class="cn-table app-permissions">
|
|
142
|
+
<caption class="cn-label">
|
|
143
|
+
{{ t("roles.content") }}
|
|
144
|
+
</caption>
|
|
145
|
+
<thead>
|
|
146
|
+
<tr>
|
|
147
|
+
<th scope="col">
|
|
148
|
+
{{ t("roles.type") }}
|
|
149
|
+
</th>
|
|
150
|
+
<th
|
|
151
|
+
v-for="a in ACTIONS"
|
|
152
|
+
:key="a"
|
|
153
|
+
scope="col"
|
|
154
|
+
>
|
|
155
|
+
{{ t(`action.${a}`) }}
|
|
156
|
+
</th>
|
|
157
|
+
<th scope="col">
|
|
158
|
+
{{ t("roles.ownOnly") }}
|
|
159
|
+
</th>
|
|
160
|
+
</tr>
|
|
161
|
+
</thead>
|
|
162
|
+
<tbody>
|
|
163
|
+
<tr
|
|
164
|
+
v-for="ty in types"
|
|
165
|
+
:key="ty.name"
|
|
166
|
+
>
|
|
167
|
+
<th scope="row">
|
|
168
|
+
{{ ty.label }}
|
|
169
|
+
</th>
|
|
170
|
+
<td
|
|
171
|
+
v-for="a in ACTIONS"
|
|
172
|
+
:key="a"
|
|
173
|
+
>
|
|
174
|
+
<CnCheckbox
|
|
175
|
+
:label="t('roles.actionOn', { action: t(`action.${a}`), type: ty.label })"
|
|
176
|
+
class="app-check"
|
|
177
|
+
:checked="has(ty.name, a)"
|
|
178
|
+
@update:checked="(on) => toggle(ty.name, a, on)"
|
|
179
|
+
/>
|
|
180
|
+
</td>
|
|
181
|
+
<td>
|
|
182
|
+
<CnCheckbox
|
|
183
|
+
:label="t('roles.ownOnlyOf', { type: ty.label })"
|
|
184
|
+
class="app-check"
|
|
185
|
+
:disabled="!form.content[ty.name]"
|
|
186
|
+
:checked="ownOnly(ty.name)"
|
|
187
|
+
@update:checked="(on) => setOwnOnly(ty.name, on)"
|
|
188
|
+
/>
|
|
189
|
+
</td>
|
|
190
|
+
</tr>
|
|
191
|
+
</tbody>
|
|
192
|
+
</table>
|
|
193
|
+
</div>
|
|
194
|
+
|
|
195
|
+
<template
|
|
196
|
+
v-for="ty in types"
|
|
197
|
+
:key="ty.name"
|
|
198
|
+
>
|
|
199
|
+
<details
|
|
200
|
+
v-if="form.content[ty.name] && Object.keys(ty.fields).length"
|
|
201
|
+
class="app-fieldset"
|
|
202
|
+
>
|
|
203
|
+
<summary class="cn-label">
|
|
204
|
+
{{ t("roles.fieldsOf", { type: ty.label }) }}
|
|
205
|
+
</summary>
|
|
206
|
+
<CnSelect
|
|
207
|
+
v-for="(field, key) in ty.fields"
|
|
208
|
+
:key="key"
|
|
209
|
+
:label="field.label ?? humanize(String(key))"
|
|
210
|
+
:options="ACCESS"
|
|
211
|
+
:model-value="fieldAccess(ty.name, String(key))"
|
|
212
|
+
@update:model-value="(v) => setFieldAccess(ty.name, String(key), v)"
|
|
213
|
+
/>
|
|
214
|
+
</details>
|
|
215
|
+
</template>
|
|
216
|
+
|
|
217
|
+
<CnAlert
|
|
218
|
+
v-if="error"
|
|
219
|
+
variant="danger"
|
|
220
|
+
live
|
|
221
|
+
>
|
|
222
|
+
{{ error }}
|
|
223
|
+
</CnAlert>
|
|
224
|
+
<div class="app-form__actions">
|
|
225
|
+
<CnButton
|
|
226
|
+
type="submit"
|
|
227
|
+
:loading="save.isPending.value"
|
|
228
|
+
>
|
|
229
|
+
{{ t("roles.save") }}
|
|
230
|
+
</CnButton>
|
|
231
|
+
</div>
|
|
232
|
+
</form>
|
|
233
|
+
</Page>
|
|
234
|
+
</template>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
name?: string;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, ref } from "vue";
|
|
3
|
+
import { NuxtLink } from "#components";
|
|
4
|
+
import { useAtelierAdmin } from "../composables/useAtelierAdmin";
|
|
5
|
+
import { useAtelierPermissions } from "../composables/useAtelierPermissions";
|
|
6
|
+
import { useAtelierRoles } from "../composables/useAtelierRoles";
|
|
7
|
+
import CnBadge from "../crystal-neuo/components/Badge.vue";
|
|
8
|
+
import CnButton from "../crystal-neuo/components/Button.vue";
|
|
9
|
+
import CnDialog from "../crystal-neuo/components/Dialog.vue";
|
|
10
|
+
import { useAdminToast } from "../toast";
|
|
11
|
+
import Icon from "./Icon";
|
|
12
|
+
import NotFound from "./NotFound.vue";
|
|
13
|
+
import Page from "./Page.vue";
|
|
14
|
+
import { useAdminI18n } from "../i18n";
|
|
15
|
+
const { t } = useAdminI18n();
|
|
16
|
+
const { to } = useAtelierAdmin();
|
|
17
|
+
const { manages } = useAtelierPermissions();
|
|
18
|
+
const { roles, loading, remove } = useAtelierRoles();
|
|
19
|
+
const toast = useAdminToast();
|
|
20
|
+
const SOURCE = { builtin: "roles.builtin", code: "roles.code", database: "roles.database" };
|
|
21
|
+
const deleting = ref(null);
|
|
22
|
+
const confirmOpen = computed({ get: () => !!deleting.value, set: (on) => !on && (deleting.value = null) });
|
|
23
|
+
async function confirmDelete() {
|
|
24
|
+
const role = deleting.value;
|
|
25
|
+
try {
|
|
26
|
+
await remove.mutateAsync(role.name);
|
|
27
|
+
toast.add({ color: "success", title: t("roles.deleted", { name: role.role.label ?? role.name }) });
|
|
28
|
+
} catch (e) {
|
|
29
|
+
toast.add({ color: "error", title: t("common.notDeleted"), description: e.message });
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<template>
|
|
35
|
+
<NotFound
|
|
36
|
+
v-if="!manages('roles')"
|
|
37
|
+
forbidden
|
|
38
|
+
/>
|
|
39
|
+
<Page
|
|
40
|
+
v-else
|
|
41
|
+
:title="t('nav.roles')"
|
|
42
|
+
icon="shield"
|
|
43
|
+
:description="t('roles.description')"
|
|
44
|
+
>
|
|
45
|
+
<template #actions>
|
|
46
|
+
<NuxtLink
|
|
47
|
+
:to="to('roles', 'new')"
|
|
48
|
+
class="cn-button cn-button--primary cn-button--size-md"
|
|
49
|
+
>
|
|
50
|
+
<Icon name="plus" />
|
|
51
|
+
{{ t("roles.new") }}
|
|
52
|
+
</NuxtLink>
|
|
53
|
+
</template>
|
|
54
|
+
<div class="app-table-wrap">
|
|
55
|
+
<table class="cn-table">
|
|
56
|
+
<caption class="sr-only">
|
|
57
|
+
{{ t("nav.roles") }}
|
|
58
|
+
</caption>
|
|
59
|
+
<thead>
|
|
60
|
+
<tr>
|
|
61
|
+
<th scope="col">
|
|
62
|
+
{{ t("common.role") }}
|
|
63
|
+
</th>
|
|
64
|
+
<th scope="col">
|
|
65
|
+
{{ t("common.name") }}
|
|
66
|
+
</th>
|
|
67
|
+
<th scope="col">
|
|
68
|
+
{{ t("roles.source") }}
|
|
69
|
+
</th>
|
|
70
|
+
<th scope="col">
|
|
71
|
+
<span class="sr-only">{{ t("common.actions") }}</span>
|
|
72
|
+
</th>
|
|
73
|
+
</tr>
|
|
74
|
+
</thead>
|
|
75
|
+
<tbody>
|
|
76
|
+
<tr v-if="loading">
|
|
77
|
+
<td colspan="4">
|
|
78
|
+
{{ t("common.loading") }}
|
|
79
|
+
</td>
|
|
80
|
+
</tr>
|
|
81
|
+
<tr
|
|
82
|
+
v-for="entry in roles"
|
|
83
|
+
:key="entry.name"
|
|
84
|
+
>
|
|
85
|
+
<td>
|
|
86
|
+
<NuxtLink
|
|
87
|
+
v-if="entry.source === 'database'"
|
|
88
|
+
:to="to('roles', entry.name)"
|
|
89
|
+
>
|
|
90
|
+
{{ entry.role.label ?? entry.name }}
|
|
91
|
+
</NuxtLink>
|
|
92
|
+
<template v-else>
|
|
93
|
+
{{ entry.role.label ?? entry.name }}
|
|
94
|
+
</template>
|
|
95
|
+
</td>
|
|
96
|
+
<td><code>{{ entry.name }}</code></td>
|
|
97
|
+
<td>
|
|
98
|
+
<CnBadge
|
|
99
|
+
:variant="entry.source === 'database' ? 'success' : 'neutral'"
|
|
100
|
+
size="sm"
|
|
101
|
+
>
|
|
102
|
+
{{ t(SOURCE[entry.source]) }}
|
|
103
|
+
</CnBadge>
|
|
104
|
+
</td>
|
|
105
|
+
<td class="app-actions-cell">
|
|
106
|
+
<CnButton
|
|
107
|
+
v-if="entry.source === 'database'"
|
|
108
|
+
variant="ghost"
|
|
109
|
+
size="sm"
|
|
110
|
+
:aria-label="t('roles.deleteOne', { name: entry.name })"
|
|
111
|
+
@click="deleting = entry"
|
|
112
|
+
>
|
|
113
|
+
<Icon name="trash-2" />
|
|
114
|
+
</CnButton>
|
|
115
|
+
</td>
|
|
116
|
+
</tr>
|
|
117
|
+
</tbody>
|
|
118
|
+
</table>
|
|
119
|
+
</div>
|
|
120
|
+
<CnDialog
|
|
121
|
+
v-model:open="confirmOpen"
|
|
122
|
+
:title="t('roles.deleteTitle', { name: deleting?.role.label ?? deleting?.name })"
|
|
123
|
+
:description="t('roles.deleteBody')"
|
|
124
|
+
:confirm-label="t('common.delete')"
|
|
125
|
+
variant="destructive"
|
|
126
|
+
@confirm="confirmDelete"
|
|
127
|
+
/>
|
|
128
|
+
</Page>
|
|
129
|
+
</template>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** The entry's API path (`/collections/posts/<id>`, `/singletons/home`), and its locale query. */
|
|
3
|
+
url: string;
|
|
4
|
+
query: Record<string, string>;
|
|
5
|
+
/** The saved version: what a publish scheduled now goes live with. */
|
|
6
|
+
version: number | null;
|
|
7
|
+
/** Unsaved changes aren't in that version: scheduling waits for a save. */
|
|
8
|
+
dirty: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useMutation, useQuery, useQueryClient } from "@tanstack/vue-query";
|
|
3
|
+
import { computed, ref } from "vue";
|
|
4
|
+
import { atelierFetch } from "../composables/useAtelierAdmin";
|
|
5
|
+
import CnBadge from "../crystal-neuo/components/Badge.vue";
|
|
6
|
+
import CnButton from "../crystal-neuo/components/Button.vue";
|
|
7
|
+
import CnInput from "../crystal-neuo/components/Input.vue";
|
|
8
|
+
import CnSelect from "../crystal-neuo/components/Select.vue";
|
|
9
|
+
import { useAdminToast } from "../toast";
|
|
10
|
+
import { useAdminI18n } from "../i18n";
|
|
11
|
+
const props = defineProps({
|
|
12
|
+
url: { type: String, required: true },
|
|
13
|
+
query: { type: Object, required: true },
|
|
14
|
+
version: { type: [Number, null], required: true },
|
|
15
|
+
dirty: { type: Boolean, required: true }
|
|
16
|
+
});
|
|
17
|
+
const { t } = useAdminI18n();
|
|
18
|
+
const toast = useAdminToast();
|
|
19
|
+
const client = useQueryClient();
|
|
20
|
+
const queryKey = computed(() => ["atelier", "schedule", props.url, props.query]);
|
|
21
|
+
const schedules = useQuery({ queryKey, queryFn: () => atelierFetch(`${props.url}/schedule`, { query: props.query }) });
|
|
22
|
+
const refresh = () => client.invalidateQueries({ queryKey: queryKey.value });
|
|
23
|
+
const failed = (s) => s.status === "failed";
|
|
24
|
+
const action = ref("publish");
|
|
25
|
+
const at = ref("");
|
|
26
|
+
const actions = computed(() => [{ value: "publish", label: t("schedule.publish") }, { value: "unpublish", label: t("schedule.unpublish") }]);
|
|
27
|
+
const schedule = useMutation({
|
|
28
|
+
// datetime-local is the user's local time: Date reads it so, and sends it as UTC
|
|
29
|
+
mutationFn: () => atelierFetch(`${props.url}/schedule`, { method: "POST", query: props.query, body: { action: action.value, at: new Date(at.value).toISOString(), version: props.version } }),
|
|
30
|
+
onSuccess: () => {
|
|
31
|
+
toast.add({ color: "success", title: t("schedule.done") });
|
|
32
|
+
at.value = "";
|
|
33
|
+
return refresh();
|
|
34
|
+
},
|
|
35
|
+
onError: (e) => toast.add({ color: "error", title: e.message })
|
|
36
|
+
});
|
|
37
|
+
const cancel = useMutation({
|
|
38
|
+
mutationFn: (which) => atelierFetch(`${props.url}/schedule/${which}`, { method: "DELETE", query: props.query }),
|
|
39
|
+
onSuccess: refresh,
|
|
40
|
+
onError: (e) => toast.add({ color: "error", title: e.message })
|
|
41
|
+
});
|
|
42
|
+
const when = (iso) => new Date(iso).toLocaleString();
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<template>
|
|
46
|
+
<section
|
|
47
|
+
class="app-comments"
|
|
48
|
+
aria-labelledby="atelier-schedule"
|
|
49
|
+
data-schedule
|
|
50
|
+
>
|
|
51
|
+
<h2
|
|
52
|
+
id="atelier-schedule"
|
|
53
|
+
class="app-section__title"
|
|
54
|
+
>
|
|
55
|
+
{{ t("schedule.title") }}
|
|
56
|
+
</h2>
|
|
57
|
+
<ul v-if="schedules.data.value?.length">
|
|
58
|
+
<li
|
|
59
|
+
v-for="s in schedules.data.value"
|
|
60
|
+
:key="s.action"
|
|
61
|
+
class="app-row"
|
|
62
|
+
:data-scheduled="s.action"
|
|
63
|
+
>
|
|
64
|
+
<span>{{ s.action === "publish" ? t("schedule.publishAt", { time: when(s.at), version: s.version ?? "" }) : t("schedule.unpublishAt", { time: when(s.at) }) }}</span>
|
|
65
|
+
<CnBadge
|
|
66
|
+
v-if="failed(s)"
|
|
67
|
+
variant="danger"
|
|
68
|
+
size="sm"
|
|
69
|
+
:title="s.lastError ?? void 0"
|
|
70
|
+
>
|
|
71
|
+
{{ t("schedule.failed", { reason: s.lastError ?? "" }) }}
|
|
72
|
+
</CnBadge>
|
|
73
|
+
<CnButton
|
|
74
|
+
variant="ghost"
|
|
75
|
+
size="sm"
|
|
76
|
+
:loading="cancel.isPending.value && cancel.variables.value === s.action"
|
|
77
|
+
@click="cancel.mutate(s.action)"
|
|
78
|
+
>
|
|
79
|
+
{{ t("schedule.cancel") }}
|
|
80
|
+
</CnButton>
|
|
81
|
+
</li>
|
|
82
|
+
</ul>
|
|
83
|
+
<p
|
|
84
|
+
v-else-if="schedules.data.value"
|
|
85
|
+
class="app-muted"
|
|
86
|
+
>
|
|
87
|
+
{{ t("schedule.none") }}
|
|
88
|
+
</p>
|
|
89
|
+
<form
|
|
90
|
+
class="app-row"
|
|
91
|
+
@submit.prevent="schedule.mutate()"
|
|
92
|
+
>
|
|
93
|
+
<CnSelect
|
|
94
|
+
v-model="action"
|
|
95
|
+
:label="t('schedule.action')"
|
|
96
|
+
:options="actions"
|
|
97
|
+
/>
|
|
98
|
+
<CnInput
|
|
99
|
+
v-model="at"
|
|
100
|
+
:label="t('schedule.at')"
|
|
101
|
+
type="datetime-local"
|
|
102
|
+
required
|
|
103
|
+
/>
|
|
104
|
+
<CnButton
|
|
105
|
+
type="submit"
|
|
106
|
+
variant="secondary"
|
|
107
|
+
:disabled="dirty || !at"
|
|
108
|
+
:loading="schedule.isPending.value"
|
|
109
|
+
>
|
|
110
|
+
{{ t("schedule.submit") }}
|
|
111
|
+
</CnButton>
|
|
112
|
+
</form>
|
|
113
|
+
<p
|
|
114
|
+
v-if="dirty"
|
|
115
|
+
class="app-muted"
|
|
116
|
+
>
|
|
117
|
+
{{ t("schedule.saveFirst") }}
|
|
118
|
+
</p>
|
|
119
|
+
</section>
|
|
120
|
+
</template>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** The entry's API path (`/collections/posts/<id>`, `/singletons/home`), and its locale query. */
|
|
3
|
+
url: string;
|
|
4
|
+
query: Record<string, string>;
|
|
5
|
+
/** The saved version: what a publish scheduled now goes live with. */
|
|
6
|
+
version: number | null;
|
|
7
|
+
/** Unsaved changes aren't in that version: scheduling waits for a save. */
|
|
8
|
+
dirty: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SeoInput } from '../composables/useAtelierSeo.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
input: SeoInput;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { SEO_LIMITS, useAtelierSeo } from "../composables/useAtelierSeo";
|
|
3
|
+
import CnAlert from "../crystal-neuo/components/Alert.vue";
|
|
4
|
+
import { useAdminI18n } from "../i18n";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
input: { type: Object, required: true }
|
|
7
|
+
});
|
|
8
|
+
const { t } = useAdminI18n();
|
|
9
|
+
const { search, social, robots, checks } = useAtelierSeo(() => props.input);
|
|
10
|
+
const limits = { min: SEO_LIMITS.descriptionMin, max: SEO_LIMITS.description };
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<section
|
|
15
|
+
class="app-section app-seo"
|
|
16
|
+
data-seo-panel
|
|
17
|
+
>
|
|
18
|
+
<h2 class="app-section__title">
|
|
19
|
+
{{ t("seo.title") }}
|
|
20
|
+
</h2>
|
|
21
|
+
<div class="app-seo__previews">
|
|
22
|
+
<figure class="cn-card cn-card--raised cn-card--size-sm app-seo__search">
|
|
23
|
+
<figcaption class="cn-label">
|
|
24
|
+
{{ t("seo.search") }}
|
|
25
|
+
</figcaption>
|
|
26
|
+
<p class="app-seo__url">
|
|
27
|
+
{{ search.url }}
|
|
28
|
+
</p>
|
|
29
|
+
<p class="app-seo__headline">
|
|
30
|
+
{{ search.title }}
|
|
31
|
+
</p>
|
|
32
|
+
<p class="app-muted">
|
|
33
|
+
{{ search.description || t("seo.noDescription") }}
|
|
34
|
+
</p>
|
|
35
|
+
</figure>
|
|
36
|
+
<figure class="cn-card cn-card--raised cn-card--size-sm app-seo__social">
|
|
37
|
+
<figcaption class="cn-label">
|
|
38
|
+
{{ t("seo.social") }}
|
|
39
|
+
</figcaption>
|
|
40
|
+
<img
|
|
41
|
+
v-if="social.image"
|
|
42
|
+
:src="social.image"
|
|
43
|
+
alt=""
|
|
44
|
+
class="app-seo__image"
|
|
45
|
+
>
|
|
46
|
+
<p class="app-seo__headline">
|
|
47
|
+
{{ social.title }}
|
|
48
|
+
</p>
|
|
49
|
+
<p class="app-muted">
|
|
50
|
+
{{ social.description }}
|
|
51
|
+
</p>
|
|
52
|
+
</figure>
|
|
53
|
+
</div>
|
|
54
|
+
<p
|
|
55
|
+
v-if="robots?.includes('noindex')"
|
|
56
|
+
class="app-muted"
|
|
57
|
+
>
|
|
58
|
+
{{ t("seo.noindex") }}
|
|
59
|
+
</p>
|
|
60
|
+
<ul
|
|
61
|
+
v-if="checks.length"
|
|
62
|
+
class="app-list"
|
|
63
|
+
data-seo-checks
|
|
64
|
+
>
|
|
65
|
+
<li
|
|
66
|
+
v-for="check in checks"
|
|
67
|
+
:key="check"
|
|
68
|
+
>
|
|
69
|
+
<CnAlert variant="warning">
|
|
70
|
+
{{ t(`seo.check.${check}`, check === "title-long" ? { max: SEO_LIMITS.title } : limits) }}
|
|
71
|
+
</CnAlert>
|
|
72
|
+
</li>
|
|
73
|
+
</ul>
|
|
74
|
+
<p
|
|
75
|
+
v-else
|
|
76
|
+
class="app-muted"
|
|
77
|
+
>
|
|
78
|
+
{{ t("seo.allGood") }}
|
|
79
|
+
</p>
|
|
80
|
+
</section>
|
|
81
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SeoInput } from '../composables/useAtelierSeo.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
input: SeoInput;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|