├── .changeset ├── README.md ├── config.json └── pre.json ├── .dockerignore ├── .editorconfig ├── .env.development ├── .env.production ├── .eslintrc.cjs ├── .github ├── pull_request_template.md └── workflows │ └── main.yml ├── .gitignore ├── .gitpod.yml ├── .husky └── pre-commit ├── .npmignore ├── .npmrc ├── .prettierignore ├── .vscode ├── extensions.json └── settings.json ├── Dockerfile ├── LICENSE ├── Makefile ├── OWNERS ├── README.md ├── cypress.json ├── cypress ├── fixtures │ └── example.json ├── integration │ └── example.spec.ts ├── plugins │ ├── index.ts │ └── tsconfig.json ├── support │ ├── commands.ts │ └── index.ts └── tsconfig.json ├── docs ├── custom-formkit-input │ └── README.md ├── extension-points │ └── editor.md └── routes-generation │ └── README.md ├── env.d.ts ├── index.html ├── package.json ├── packages ├── api-client │ ├── .eslintignore │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc.js │ ├── README.md │ ├── build.config.ts │ ├── openapitools.json │ ├── package.json │ ├── src │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .openapi-generator-ignore │ │ ├── .openapi-generator │ │ │ ├── FILES │ │ │ └── VERSION │ │ ├── .openapi_config.yaml │ │ ├── api.ts │ │ ├── api │ │ │ ├── api-console-halo-run-v1alpha1-attachment-api.ts │ │ │ ├── api-console-halo-run-v1alpha1-comment-api.ts │ │ │ ├── api-console-halo-run-v1alpha1-indices-api.ts │ │ │ ├── api-console-halo-run-v1alpha1-plugin-api.ts │ │ │ ├── api-console-halo-run-v1alpha1-post-api.ts │ │ │ ├── api-console-halo-run-v1alpha1-reply-api.ts │ │ │ ├── api-console-halo-run-v1alpha1-single-page-api.ts │ │ │ ├── api-console-halo-run-v1alpha1-stats-api.ts │ │ │ ├── api-console-halo-run-v1alpha1-theme-api.ts │ │ │ ├── api-console-halo-run-v1alpha1-user-api.ts │ │ │ ├── api-halo-run-v1alpha1-comment-api.ts │ │ │ ├── api-halo-run-v1alpha1-post-api.ts │ │ │ ├── api-halo-run-v1alpha1-tracker-api.ts │ │ │ ├── content-halo-run-v1alpha1-category-api.ts │ │ │ ├── content-halo-run-v1alpha1-comment-api.ts │ │ │ ├── content-halo-run-v1alpha1-post-api.ts │ │ │ ├── content-halo-run-v1alpha1-reply-api.ts │ │ │ ├── content-halo-run-v1alpha1-single-page-api.ts │ │ │ ├── content-halo-run-v1alpha1-snapshot-api.ts │ │ │ ├── content-halo-run-v1alpha1-tag-api.ts │ │ │ ├── metrics-halo-run-v1alpha1-counter-api.ts │ │ │ ├── plugin-halo-run-v1alpha1-plugin-api.ts │ │ │ ├── plugin-halo-run-v1alpha1-reverse-proxy-api.ts │ │ │ ├── plugin-halo-run-v1alpha1-search-engine-api.ts │ │ │ ├── storage-halo-run-v1alpha1-attachment-api.ts │ │ │ ├── storage-halo-run-v1alpha1-group-api.ts │ │ │ ├── storage-halo-run-v1alpha1-policy-api.ts │ │ │ ├── storage-halo-run-v1alpha1-policy-template-api.ts │ │ │ ├── theme-halo-run-v1alpha1-theme-api.ts │ │ │ ├── v1alpha1-annotation-setting-api.ts │ │ │ ├── v1alpha1-config-map-api.ts │ │ │ ├── v1alpha1-menu-api.ts │ │ │ ├── v1alpha1-menu-item-api.ts │ │ │ ├── v1alpha1-personal-access-token-api.ts │ │ │ ├── v1alpha1-role-api.ts │ │ │ ├── v1alpha1-role-binding-api.ts │ │ │ ├── v1alpha1-setting-api.ts │ │ │ └── v1alpha1-user-api.ts │ │ ├── base.ts │ │ ├── common.ts │ │ ├── configuration.ts │ │ ├── git_push.sh │ │ ├── index.ts │ │ └── models │ │ │ ├── annotation-setting-list.ts │ │ │ ├── annotation-setting-spec.ts │ │ │ ├── annotation-setting.ts │ │ │ ├── attachment-list.ts │ │ │ ├── attachment-spec.ts │ │ │ ├── attachment-status.ts │ │ │ ├── attachment.ts │ │ │ ├── author.ts │ │ │ ├── category-list.ts │ │ │ ├── category-spec.ts │ │ │ ├── category-status.ts │ │ │ ├── category.ts │ │ │ ├── change-password-request.ts │ │ │ ├── comment-email-owner.ts │ │ │ ├── comment-list.ts │ │ │ ├── comment-owner.ts │ │ │ ├── comment-request.ts │ │ │ ├── comment-spec.ts │ │ │ ├── comment-status.ts │ │ │ ├── comment-vo-list.ts │ │ │ ├── comment-vo.ts │ │ │ ├── comment.ts │ │ │ ├── condition.ts │ │ │ ├── config-map-list.ts │ │ │ ├── config-map.ts │ │ │ ├── content-wrapper.ts │ │ │ ├── content.ts │ │ │ ├── contributor.ts │ │ │ ├── counter-list.ts │ │ │ ├── counter-request.ts │ │ │ ├── counter.ts │ │ │ ├── custom-templates.ts │ │ │ ├── dashboard-stats.ts │ │ │ ├── detailed-user.ts │ │ │ ├── excerpt.ts │ │ │ ├── extension.ts │ │ │ ├── file-reverse-proxy-provider.ts │ │ │ ├── grant-request.ts │ │ │ ├── group-kind.ts │ │ │ ├── group-list.ts │ │ │ ├── group-spec.ts │ │ │ ├── group-status.ts │ │ │ ├── group.ts │ │ │ ├── index.ts │ │ │ ├── license.ts │ │ │ ├── listed-comment-list.ts │ │ │ ├── listed-comment.ts │ │ │ ├── listed-post-list.ts │ │ │ ├── listed-post.ts │ │ │ ├── listed-reply-list.ts │ │ │ ├── listed-reply.ts │ │ │ ├── listed-single-page-list.ts │ │ │ ├── listed-single-page.ts │ │ │ ├── listed-user-list.ts │ │ │ ├── listed-user.ts │ │ │ ├── login-history.ts │ │ │ ├── menu-item-list.ts │ │ │ ├── menu-item-spec.ts │ │ │ ├── menu-item-status.ts │ │ │ ├── menu-item.ts │ │ │ ├── menu-list.ts │ │ │ ├── menu-spec.ts │ │ │ ├── menu.ts │ │ │ ├── metadata.ts │ │ │ ├── owner-info.ts │ │ │ ├── personal-access-token-list.ts │ │ │ ├── personal-access-token-spec.ts │ │ │ ├── personal-access-token.ts │ │ │ ├── plugin-author.ts │ │ │ ├── plugin-list.ts │ │ │ ├── plugin-spec.ts │ │ │ ├── plugin-status.ts │ │ │ ├── plugin.ts │ │ │ ├── policy-list.ts │ │ │ ├── policy-rule.ts │ │ │ ├── policy-spec.ts │ │ │ ├── policy-template-list.ts │ │ │ ├── policy-template-spec.ts │ │ │ ├── policy-template.ts │ │ │ ├── policy.ts │ │ │ ├── post-hit.ts │ │ │ ├── post-hits.ts │ │ │ ├── post-list.ts │ │ │ ├── post-request.ts │ │ │ ├── post-spec.ts │ │ │ ├── post-status.ts │ │ │ ├── post.ts │ │ │ ├── ref.ts │ │ │ ├── reply-list.ts │ │ │ ├── reply-request.ts │ │ │ ├── reply-spec.ts │ │ │ ├── reply-vo-list.ts │ │ │ ├── reply-vo.ts │ │ │ ├── reply.ts │ │ │ ├── reverse-proxy-list.ts │ │ │ ├── reverse-proxy-rule.ts │ │ │ ├── reverse-proxy.ts │ │ │ ├── role-binding-list.ts │ │ │ ├── role-binding.ts │ │ │ ├── role-list.ts │ │ │ ├── role-ref.ts │ │ │ ├── role.ts │ │ │ ├── search-engine-list.ts │ │ │ ├── search-engine-spec.ts │ │ │ ├── search-engine.ts │ │ │ ├── setting-form.ts │ │ │ ├── setting-list.ts │ │ │ ├── setting-spec.ts │ │ │ ├── setting.ts │ │ │ ├── single-page-list.ts │ │ │ ├── single-page-request.ts │ │ │ ├── single-page-spec.ts │ │ │ ├── single-page-status.ts │ │ │ ├── single-page.ts │ │ │ ├── snap-shot-spec.ts │ │ │ ├── snapshot-list.ts │ │ │ ├── snapshot.ts │ │ │ ├── stats.ts │ │ │ ├── subject.ts │ │ │ ├── tag-list.ts │ │ │ ├── tag-spec.ts │ │ │ ├── tag-status.ts │ │ │ ├── tag.ts │ │ │ ├── template-descriptor.ts │ │ │ ├── theme-list.ts │ │ │ ├── theme-spec.ts │ │ │ ├── theme-status.ts │ │ │ ├── theme.ts │ │ │ ├── user-list.ts │ │ │ ├── user-permission.ts │ │ │ ├── user-spec.ts │ │ │ ├── user-status.ts │ │ │ ├── user.ts │ │ │ └── vote-request.ts │ └── tsconfig.json ├── components │ ├── .eslintrc.cjs │ ├── env.d.ts │ ├── histoire.config.ts │ ├── package.json │ ├── postcss.config.js │ ├── prettier.config.js │ ├── src │ │ ├── components.ts │ │ ├── components │ │ │ ├── alert │ │ │ │ ├── Alert.story.vue │ │ │ │ ├── Alert.vue │ │ │ │ ├── __tests__ │ │ │ │ │ └── Alert.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── interface.ts │ │ │ ├── avatar │ │ │ │ ├── Avatar.story.vue │ │ │ │ ├── Avatar.vue │ │ │ │ ├── index.ts │ │ │ │ └── interface.ts │ │ │ ├── button │ │ │ │ ├── Button.story.vue │ │ │ │ ├── Button.vue │ │ │ │ ├── __tests__ │ │ │ │ │ ├── Button.spec.ts │ │ │ │ │ └── __snapshots__ │ │ │ │ │ │ └── Button.spec.ts.snap │ │ │ │ ├── index.ts │ │ │ │ └── interface.ts │ │ │ ├── card │ │ │ │ ├── Card.story.vue │ │ │ │ ├── Card.vue │ │ │ │ ├── __tests__ │ │ │ │ │ └── Card.spec.ts │ │ │ │ └── index.ts │ │ │ ├── codemirror │ │ │ │ ├── Codemirror.story.vue │ │ │ │ ├── Codemirror.vue │ │ │ │ ├── __tests__ │ │ │ │ │ └── Codemirror.spec.ts │ │ │ │ └── index.ts │ │ │ ├── dialog │ │ │ │ ├── Dialog.story.vue │ │ │ │ ├── Dialog.vue │ │ │ │ ├── __tests__ │ │ │ │ │ └── Dialog.spec.ts │ │ │ │ ├── dialog-manager.ts │ │ │ │ ├── index.ts │ │ │ │ └── interface.ts │ │ │ ├── empty │ │ │ │ ├── Empty.story.vue │ │ │ │ ├── Empty.svg │ │ │ │ ├── Empty.vue │ │ │ │ ├── __tests__ │ │ │ │ │ ├── Empty.spec.ts │ │ │ │ │ └── __snapshots__ │ │ │ │ │ │ └── Empty.spec.ts.snap │ │ │ │ └── index.ts │ │ │ ├── entity │ │ │ │ ├── Entity.vue │ │ │ │ ├── EntityField.vue │ │ │ │ ├── __tests__ │ │ │ │ │ ├── Entity.spec.ts │ │ │ │ │ └── EntityField.spec.ts │ │ │ │ └── index.ts │ │ │ ├── header │ │ │ │ ├── PageHeader.vue │ │ │ │ └── index.ts │ │ │ ├── loading │ │ │ │ ├── Loading.vue │ │ │ │ └── index.ts │ │ │ ├── menu │ │ │ │ ├── Menu.story.vue │ │ │ │ ├── Menu.vue │ │ │ │ ├── MenuItem.vue │ │ │ │ ├── MenuLabel.vue │ │ │ │ ├── __tests__ │ │ │ │ │ ├── Menu.spec.tsx │ │ │ │ │ ├── MenuLabel.spec.ts │ │ │ │ │ └── __snapshots__ │ │ │ │ │ │ ├── Menu.spec.tsx.snap │ │ │ │ │ │ └── MenuLabel.spec.ts.snap │ │ │ │ └── index.ts │ │ │ ├── modal │ │ │ │ ├── Modal.story.vue │ │ │ │ ├── Modal.vue │ │ │ │ ├── __tests__ │ │ │ │ │ └── Modal.spec.ts │ │ │ │ └── index.ts │ │ │ ├── pagination │ │ │ │ ├── Pagination.story.vue │ │ │ │ ├── Pagination.vue │ │ │ │ ├── __tests__ │ │ │ │ │ └── Pagination.spec.ts │ │ │ │ └── index.ts │ │ │ ├── space │ │ │ │ ├── Space.story.vue │ │ │ │ ├── Space.vue │ │ │ │ ├── __tests__ │ │ │ │ │ └── Space.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── interface.ts │ │ │ ├── status │ │ │ │ ├── StatusDot.story.vue │ │ │ │ ├── StatusDot.vue │ │ │ │ ├── __tests__ │ │ │ │ │ ├── StatusDot.spec.ts │ │ │ │ │ └── __snapshots__ │ │ │ │ │ │ └── StatusDot.spec.ts.snap │ │ │ │ ├── index.ts │ │ │ │ └── interface.ts │ │ │ ├── switch │ │ │ │ ├── Switch.story.vue │ │ │ │ ├── Switch.vue │ │ │ │ ├── __tests__ │ │ │ │ │ └── Switch.spec.ts │ │ │ │ └── index.ts │ │ │ ├── tabs │ │ │ │ ├── TabItem.vue │ │ │ │ ├── Tabbar.story.vue │ │ │ │ ├── Tabbar.vue │ │ │ │ ├── Tabs.story.vue │ │ │ │ ├── Tabs.vue │ │ │ │ ├── __tests__ │ │ │ │ │ ├── TabItem.spec.ts │ │ │ │ │ ├── Tabbar.spec.ts │ │ │ │ │ └── Tabs.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── interface.ts │ │ │ ├── tag │ │ │ │ ├── Tag.story.vue │ │ │ │ ├── Tag.vue │ │ │ │ ├── __tests__ │ │ │ │ │ └── Tag.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── interface.ts │ │ │ └── toast │ │ │ │ ├── Toast.story.vue │ │ │ │ ├── Toast.vue │ │ │ │ ├── index.ts │ │ │ │ ├── interface.ts │ │ │ │ └── toast-manager.ts │ │ ├── histoire.setup.ts │ │ ├── icons │ │ │ └── icons.ts │ │ ├── index.ts │ │ └── styles │ │ │ └── tailwind.css │ ├── tailwind.config.js │ ├── tsconfig.app.json │ ├── tsconfig.json │ ├── tsconfig.vite-config.json │ ├── tsconfig.vitest.json │ └── vite.config.ts └── shared │ ├── .eslintrc.cjs │ ├── env.d.ts │ ├── package.json │ ├── prettier.config.js │ ├── src │ ├── components │ │ └── .gitkeep │ ├── core │ │ └── plugins.ts │ ├── index.ts │ ├── states │ │ ├── attachment-selector.ts │ │ ├── editor.ts │ │ └── pages.ts │ └── types │ │ ├── menus.ts │ │ └── plugin.ts │ ├── tsconfig.app.json │ ├── tsconfig.json │ ├── tsconfig.vite-config.json │ ├── tsconfig.vitest.json │ └── vite.config.ts ├── pnpm-lock.yaml ├── pnpm-workspace.yaml ├── postcss.config.js ├── prettier.config.js ├── public └── favicon.ico ├── src ├── App.vue ├── assets │ ├── logo.png │ └── logo.svg ├── build │ └── library-external.ts ├── components │ ├── button │ │ └── SubmitButton.vue │ ├── dropdown-selector │ │ ├── CategoryDropdownSelector.vue │ │ ├── EditorProviderSelector.vue │ │ ├── TagDropdownSelector.vue │ │ └── UserDropdownSelector.vue │ ├── editor │ │ └── DefaultEditor.vue │ ├── filter │ │ ├── FilterCleanButton.vue │ │ └── FilterTag.vue │ ├── form │ │ └── AnnotationsForm.vue │ ├── global-search │ │ └── GlobalSearchModal.vue │ ├── image │ │ └── LazyImage.vue │ ├── login │ │ ├── LoginForm.vue │ │ └── LoginModal.vue │ ├── menu │ │ └── RoutesMenu.tsx │ ├── preview │ │ └── UrlPreviewModal.vue │ └── upload │ │ └── UppyUpload.vue ├── composables │ ├── use-content-cache.ts │ ├── use-editor-extension-points.ts │ ├── use-setting-form.ts │ └── use-slugify.ts ├── constants │ ├── annotations.ts │ ├── constants.ts │ └── labels.ts ├── formkit │ ├── formkit.config.ts │ ├── inputs │ │ ├── attachment │ │ │ ├── AttachmentInput.vue │ │ │ └── index.ts │ │ ├── category-checkbox.ts │ │ ├── category-select │ │ │ ├── CategorySelect.vue │ │ │ ├── components │ │ │ │ ├── CategoryListItem.vue │ │ │ │ ├── CategoryTag.vue │ │ │ │ └── SearchResultListItem.vue │ │ │ ├── index.ts │ │ │ └── sections │ │ │ │ └── index.ts │ │ ├── code │ │ │ ├── CodeInput.vue │ │ │ └── index.ts │ │ ├── form.ts │ │ ├── menu-checkbox.ts │ │ ├── menu-item-select.ts │ │ ├── menu-radio.ts │ │ ├── post-select.ts │ │ ├── repeater │ │ │ ├── Repeater.vue │ │ │ ├── index.ts │ │ │ └── sections │ │ │ │ └── index.ts │ │ ├── singlePage-select.ts │ │ ├── tag-checkbox.ts │ │ └── tag-select │ │ │ ├── TagSelect.vue │ │ │ ├── index.ts │ │ │ └── sections │ │ │ └── index.ts │ ├── plugins │ │ ├── radio-alt.ts │ │ └── stop-implicit-submission.ts │ ├── theme.ts │ └── utils │ │ └── focus.ts ├── layouts │ ├── BasicLayout.vue │ └── BlankLayout.vue ├── locales │ ├── index.ts │ └── lang │ │ └── zh.ts ├── main.ts ├── modules │ ├── contents │ │ ├── attachments │ │ │ ├── AttachmentList.vue │ │ │ ├── components │ │ │ │ ├── AttachmentDetailModal.vue │ │ │ │ ├── AttachmentFileTypeIcon.vue │ │ │ │ ├── AttachmentGroupEditingModal.vue │ │ │ │ ├── AttachmentGroupList.vue │ │ │ │ ├── AttachmentPoliciesModal.vue │ │ │ │ ├── AttachmentPolicyEditingModal.vue │ │ │ │ ├── AttachmentSelectorModal.vue │ │ │ │ ├── AttachmentUploadModal.vue │ │ │ │ └── selector-providers │ │ │ │ │ └── CoreSelectorProvider.vue │ │ │ ├── composables │ │ │ │ ├── use-attachment-group.ts │ │ │ │ ├── use-attachment-policy.ts │ │ │ │ └── use-attachment.ts │ │ │ └── module.ts │ │ ├── comments │ │ │ ├── CommentList.vue │ │ │ ├── components │ │ │ │ ├── CommentListItem.vue │ │ │ │ ├── ReplyCreationModal.vue │ │ │ │ └── ReplyListItem.vue │ │ │ ├── module.ts │ │ │ └── widgets │ │ │ │ └── CommentStatsWidget.vue │ │ ├── pages │ │ │ ├── DeletedSinglePageList.vue │ │ │ ├── SinglePageEditor.vue │ │ │ ├── SinglePageList.vue │ │ │ ├── components │ │ │ │ └── SinglePageSettingModal.vue │ │ │ ├── module.ts │ │ │ └── widgets │ │ │ │ └── SinglePageStatsWidget.vue │ │ └── posts │ │ │ ├── DeletedPostList.vue │ │ │ ├── PostEditor.vue │ │ │ ├── PostList.vue │ │ │ ├── categories │ │ │ ├── CategoryList.vue │ │ │ ├── components │ │ │ │ ├── CategoryEditingModal.vue │ │ │ │ ├── CategoryListItem.vue │ │ │ │ └── __tests__ │ │ │ │ │ └── CategoryEditingModal.spec.ts │ │ │ ├── composables │ │ │ │ └── use-post-category.ts │ │ │ └── utils │ │ │ │ └── index.ts │ │ │ ├── components │ │ │ ├── PostPreviewModal.vue │ │ │ ├── PostSettingModal.vue │ │ │ └── __tests__ │ │ │ │ └── PostSettingModal.spec.ts │ │ │ ├── module.ts │ │ │ ├── tags │ │ │ ├── TagList.vue │ │ │ ├── components │ │ │ │ ├── PostTag.vue │ │ │ │ └── TagEditingModal.vue │ │ │ └── composables │ │ │ │ └── use-post-tag.ts │ │ │ └── widgets │ │ │ ├── PostStatsWidget.vue │ │ │ └── RecentPublishedWidget.vue │ ├── dashboard │ │ ├── Dashboard.vue │ │ ├── module.ts │ │ └── widgets │ │ │ ├── QuickLinkWidget.vue │ │ │ └── ViewsStatsWidget.vue │ ├── index.ts │ ├── interface │ │ ├── menus │ │ │ ├── Menus.vue │ │ │ ├── components │ │ │ │ ├── MenuEditingModal.vue │ │ │ │ ├── MenuItemEditingModal.vue │ │ │ │ ├── MenuItemListItem.vue │ │ │ │ └── MenuList.vue │ │ │ ├── module.ts │ │ │ └── utils │ │ │ │ ├── __tests__ │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── index.spec.ts.snap │ │ │ │ └── index.spec.ts │ │ │ │ └── index.ts │ │ └── themes │ │ │ ├── ThemeDetail.vue │ │ │ ├── ThemeSetting.vue │ │ │ ├── components │ │ │ ├── ThemeListModal.vue │ │ │ ├── ThemeUploadModal.vue │ │ │ ├── components │ │ │ │ └── ThemeListItem.vue │ │ │ └── preview │ │ │ │ ├── ThemePreviewListItem.vue │ │ │ │ └── ThemePreviewModal.vue │ │ │ ├── composables │ │ │ └── use-theme.ts │ │ │ ├── layouts │ │ │ └── ThemeLayout.vue │ │ │ └── module.ts │ └── system │ │ ├── actuator │ │ ├── Actuator.vue │ │ ├── module.ts │ │ └── types │ │ │ └── index.ts │ │ ├── plugins │ │ ├── PluginDetail.vue │ │ ├── PluginList.vue │ │ ├── PluginSetting.vue │ │ ├── components │ │ │ ├── PluginListItem.vue │ │ │ └── PluginUploadModal.vue │ │ ├── composables │ │ │ └── use-plugin.ts │ │ ├── layouts │ │ │ └── PluginLayout.vue │ │ └── module.ts │ │ ├── roles │ │ ├── RoleDetail.vue │ │ ├── RoleList.vue │ │ ├── components │ │ │ └── RoleEditingModal.vue │ │ ├── composables │ │ │ └── use-role.ts │ │ └── module.ts │ │ ├── settings │ │ ├── SystemSetting.vue │ │ ├── layouts │ │ │ └── SystemSettingsLayout.vue │ │ └── module.ts │ │ └── users │ │ ├── Login.vue │ │ ├── PersonalAccessTokens.vue │ │ ├── UserDetail.vue │ │ ├── UserList.vue │ │ ├── components │ │ ├── GrantPermissionModal.vue │ │ ├── UserEditingModal.vue │ │ └── UserPasswordChangeModal.vue │ │ ├── composables │ │ └── use-user.ts │ │ ├── layouts │ │ └── UserProfileLayout.vue │ │ ├── module.ts │ │ └── widgets │ │ ├── RecentLoginWidget.vue │ │ └── UserStatsWidget.vue ├── router │ ├── guards │ │ ├── auth-check.ts │ │ ├── check-states.ts │ │ └── permission.ts │ ├── index.ts │ └── routes.config.ts ├── setup │ ├── setupComponents.ts │ └── setupStyles.ts ├── stores │ ├── plugin.ts │ ├── role.ts │ ├── system-configmap.ts │ ├── system-states.ts │ ├── theme.ts │ └── user.ts ├── styles │ ├── index.css │ └── tailwind.css ├── utils │ ├── __tests__ │ │ ├── date.spec.ts │ │ └── permission.spec.ts │ ├── api-client.ts │ ├── date.ts │ ├── id.ts │ ├── image.ts │ └── permission.ts └── views │ ├── exceptions │ ├── Forbidden.vue │ ├── NotFound.vue │ ├── __tests__ │ │ └── NotFound.spec.ts │ └── components │ │ └── Exception.vue │ └── system │ ├── Setup.vue │ └── setup-data │ ├── category.json │ ├── menu-items.json │ ├── menu.json │ ├── post.json │ ├── singlePage.json │ └── tag.json ├── tailwind.config.js ├── tsconfig.app.json ├── tsconfig.json ├── tsconfig.vite-config.json ├── tsconfig.vitest.json ├── vite.config.ts └── vitest.config.ts /.changeset/README.md: -------------------------------------------------------------------------------- 1 | # Changesets 2 | 3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works 4 | with multi-package repos, or single-package repos to help you version and publish your code. You can 5 | find the full documentation for it [in our repository](https://github.com/changesets/changesets) 6 | 7 | We have a quick list of common questions to get you started engaging with this project in 8 | [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) 9 | -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@2.0.1/schema.json", 3 | "changelog": "@changesets/cli/changelog", 4 | "commit": false, 5 | "fixed": [], 6 | "linked": [["@halo-dev/*"]], 7 | "access": "public", 8 | "baseBranch": "next", 9 | "updateInternalDependencies": "patch", 10 | "ignore": [] 11 | } 12 | -------------------------------------------------------------------------------- /.changeset/pre.json: -------------------------------------------------------------------------------- 1 | { 2 | "mode": "pre", 3 | "tag": "alpha", 4 | "initialVersions": { 5 | "@halo-dev/components": "0.0.0-alpha.0", 6 | "@halo-dev/console-shared": "0.0.0-alpha.0" 7 | }, 8 | "changesets": [] 9 | } 10 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | **/node_modules 2 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | [*] 7 | indent_style = space 8 | indent_size = 2 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = false 12 | insert_final_newline = true -------------------------------------------------------------------------------- /.env.development: -------------------------------------------------------------------------------- 1 | VITE_API_URL=http://localhost:8090 2 | VITE_BASE_URL=/console/ 3 | -------------------------------------------------------------------------------- /.env.production: -------------------------------------------------------------------------------- 1 | VITE_API_URL= 2 | VITE_BASE_URL=/console/ 3 | -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | require("@rushstack/eslint-patch/modern-module-resolution"); 3 | 4 | module.exports = { 5 | root: true, 6 | extends: [ 7 | "plugin:vue/vue3-recommended", 8 | "eslint:recommended", 9 | "@vue/eslint-config-typescript/recommended", 10 | "@vue/eslint-config-prettier", 11 | ], 12 | env: { 13 | node: true, 14 | "vue/setup-compiler-macros": true, 15 | }, 16 | rules: { 17 | "vue/multi-word-component-names": 0, 18 | "@typescript-eslint/ban-ts-comment": 0, 19 | }, 20 | overrides: [ 21 | { 22 | files: ["cypress/integration/**.spec.{js,ts,jsx,tsx}"], 23 | extends: ["plugin:cypress/recommended"], 24 | }, 25 | ], 26 | }; 27 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Halo Console CI 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - main 7 | - release-* 8 | paths: 9 | - "**" 10 | - "!**.md" 11 | push: 12 | branches: 13 | - main 14 | - release-* 15 | paths: 16 | - "**" 17 | - "!**.md" 18 | release: 19 | types: 20 | - created 21 | 22 | jobs: 23 | check: 24 | runs-on: ubuntu-latest 25 | steps: 26 | - uses: actions/checkout@v3 27 | - name: Environment Set Up 28 | uses: halo-sigs/actions/admin-env-setup@main 29 | - name: Install dependencies 30 | run: pnpm install 31 | - name: Build packages 32 | run: pnpm build:packages 33 | - name: Run code lint check 34 | run: pnpm lint 35 | - name: Run typescript type check 36 | run: pnpm typecheck 37 | - name: Run unit test 38 | run: pnpm test:unit 39 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | histoire-dist 15 | coverage 16 | *.local 17 | 18 | /cypress/videos/ 19 | /cypress/screenshots/ 20 | 21 | # Editor directories and files 22 | .vscode/* 23 | !.vscode/extensions.json 24 | .idea 25 | *.suo 26 | *.ntvs* 27 | *.njsproj 28 | *.sln 29 | *.sw? 30 | -------------------------------------------------------------------------------- /.gitpod.yml: -------------------------------------------------------------------------------- 1 | ports: 2 | - port: 3000 3 | onOpen: open-browser 4 | 5 | tasks: 6 | - init: npm install -g pnpm && pnpm install && pnpm build:packages 7 | command: pnpm dev 8 | 9 | vscode: 10 | extensions: 11 | - dbaeumer.vscode-eslint 12 | - editorconfig.editorconfig 13 | - esbenp.prettier-vscode 14 | - vue.volar 15 | - vue.vscode-typescript-vue-plugin 16 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | pnpm exec lint-staged 5 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | /node_modules/* 2 | /.idea/* 3 | /.git/* 4 | /.github/* -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | strict-peer-dependencies=false 2 | auto-install-peers=true 3 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | # 排除 pnpm-lock.yaml,防止被 prettier 影响导致不必要的 diff 2 | pnpm-lock.yaml 3 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "dbaeumer.vscode-eslint", 4 | "esbenp.prettier-vscode", 5 | "editorconfig.editorconfig", 6 | "vue.volar", 7 | "vue.vscode-typescript-vue-plugin" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "eslint.validate": ["javascript", "typescript", "javascriptreact", "vue"], 3 | "[vue]": { 4 | "editor.defaultFormatter": "esbenp.prettier-vscode" 5 | }, 6 | "[jsonc]": { 7 | "editor.defaultFormatter": "esbenp.prettier-vscode" 8 | }, 9 | "[javascript]": { 10 | "editor.defaultFormatter": "esbenp.prettier-vscode" 11 | }, 12 | "[json]": { 13 | "editor.defaultFormatter": "esbenp.prettier-vscode" 14 | }, 15 | "[typescript]": { 16 | "editor.defaultFormatter": "esbenp.prettier-vscode" 17 | }, 18 | "[html]": { 19 | "editor.defaultFormatter": "esbenp.prettier-vscode" 20 | }, 21 | "editor.tabSize": 2 22 | } 23 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx:stable-alpine 2 | COPY ./dist /usr/share/nginx/html 3 | EXPOSE 80 4 | CMD ["nginx", "-g", "daemon off;"] 5 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | SHELL := /usr/bin/env bash -o errexit -o pipefail -o nounset 2 | 3 | .PHONY: all 4 | all: lint test ## lint and test code 5 | 6 | .PHONY: install 7 | install: ## install dependencies 8 | pnpm install 9 | 10 | .PHONY: build 11 | build: install ## build console 12 | pnpm build:packages 13 | pnpm build 14 | 15 | .PHONY: lint 16 | lint: install ## lint code 17 | pnpm lint 18 | pnpm typecheck 19 | 20 | .PHONY: test 21 | test: install ## run tests 22 | pnpm test:unit 23 | 24 | .PHONY: help 25 | help: ## print this help 26 | @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z0-9_-]+:.*?## / {gsub("\\\\n",sprintf("\n%22c",""), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) 27 | -------------------------------------------------------------------------------- /OWNERS: -------------------------------------------------------------------------------- 1 | reviewers: 2 | - ruibaby 3 | - guqing 4 | - JohnNiang 5 | - lan-yonghui 6 | - wangzhen-fit2cloud 7 | - QuentinHsu 8 | - Aanko 9 | - wzrove 10 | - LIlGG 11 | 12 | approvers: 13 | - ruibaby 14 | - guqing 15 | - JohnNiang 16 | -------------------------------------------------------------------------------- /cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:5050" 3 | } 4 | -------------------------------------------------------------------------------- /cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } 6 | -------------------------------------------------------------------------------- /cypress/integration/example.spec.ts: -------------------------------------------------------------------------------- 1 | // https://docs.cypress.io/api/introduction/api.html 2 | 3 | describe("My First Test", () => { 4 | it("visits the app root url", () => { 5 | cy.visit("/"); 6 | cy.contains("h1", "You did it!"); 7 | }); 8 | }); 9 | -------------------------------------------------------------------------------- /cypress/plugins/index.ts: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | // *********************************************************** 3 | // This example plugins/index.ts can be used to load plugins 4 | // 5 | // You can change the location of this file or turn off loading 6 | // the plugins file with the 'pluginsFile' configuration option. 7 | // 8 | // You can read more here: 9 | // https://on.cypress.io/plugins-guide 10 | // *********************************************************** 11 | 12 | // This function is called when a project is opened or re-opened (e.g. due to 13 | // the project's config changing) 14 | 15 | export default ((on, config) => { 16 | // `on` is used to hook into various events Cypress emits 17 | // `config` is the resolved Cypress config 18 | return config; 19 | }) as Cypress.PluginConfig; 20 | -------------------------------------------------------------------------------- /cypress/plugins/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@vue/tsconfig/tsconfig.node.json", 3 | "include": [ 4 | "./**/*" 5 | ], 6 | "compilerOptions": { 7 | "module": "CommonJS", 8 | "preserveValueImports": false, 9 | "types": [ 10 | "node", 11 | "cypress/types/cypress" 12 | ] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /cypress/support/commands.ts: -------------------------------------------------------------------------------- 1 | // *********************************************** 2 | // This example commands.js shows you how to 3 | // create various custom commands and overwrite 4 | // existing commands. 5 | // 6 | // For more comprehensive examples of custom 7 | // commands please read more here: 8 | // https://on.cypress.io/custom-commands 9 | // *********************************************** 10 | // 11 | // 12 | // -- This is a parent command -- 13 | // Cypress.Commands.add('login', (email, password) => { ... }) 14 | // 15 | // 16 | // -- This is a child command -- 17 | // Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) 18 | // 19 | // 20 | // -- This is a dual command -- 21 | // Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) 22 | // 23 | // 24 | // -- This will overwrite an existing command -- 25 | // Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) 26 | -------------------------------------------------------------------------------- /cypress/support/index.ts: -------------------------------------------------------------------------------- 1 | // *********************************************************** 2 | // This example support/index.js is processed and 3 | // loaded automatically before your test files. 4 | // 5 | // This is a great place to put global configuration and 6 | // behavior that modifies Cypress. 7 | // 8 | // You can change the location of this file or turn off 9 | // automatically serving support files with the 10 | // 'supportFile' configuration option. 11 | // 12 | // You can read more here: 13 | // https://on.cypress.io/configuration 14 | // *********************************************************** 15 | 16 | // Import commands.js using ES2015 syntax: 17 | import "./commands"; 18 | 19 | // Alternatively you can use CommonJS syntax: 20 | // require('./commands') 21 | -------------------------------------------------------------------------------- /cypress/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@vue/tsconfig/tsconfig.web.json", 3 | "include": [ 4 | "./integration/**/*", 5 | "./support/**/*" 6 | ], 7 | "compilerOptions": { 8 | "isolatedModules": false, 9 | "target": "es5", 10 | "lib": [ 11 | "es5", 12 | "dom" 13 | ], 14 | "types": [ 15 | "cypress" 16 | ] 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | export {}; 4 | 5 | import type { CoreMenuGroupId } from "@halo-dev/console-shared"; 6 | 7 | import "vue-router"; 8 | 9 | import "axios"; 10 | 11 | declare module "*.vue" { 12 | import type { DefineComponent } from "vue"; 13 | // eslint-disable-next-line 14 | const component: DefineComponent<{}, {}, any>; 15 | export default component; 16 | } 17 | 18 | declare module "vue-router" { 19 | interface RouteMeta { 20 | title?: string; 21 | searchable?: boolean; 22 | permissions?: string[]; 23 | core?: boolean; 24 | menu?: { 25 | name: string; 26 | group?: CoreMenuGroupId; 27 | icon?: Component; 28 | priority: number; 29 | mobile?: boolean; 30 | }; 31 | } 32 | } 33 | 34 | declare module "axios" { 35 | export interface AxiosRequestConfig { 36 | mute?: boolean; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /packages/api-client/.eslintignore: -------------------------------------------------------------------------------- 1 | dist/* 2 | node_modules/* 3 | -------------------------------------------------------------------------------- /packages/api-client/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | parser: '@typescript-eslint/parser', 4 | extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'], 5 | env: { 6 | browser: true, 7 | node: true, 8 | }, 9 | rules: { 10 | '@typescript-eslint/no-explicit-any': ['off'], 11 | '@typescript-eslint/no-non-null-assertion': 'off', 12 | '@typescript-eslint/ban-ts-comment': 'off', 13 | }, 14 | } 15 | -------------------------------------------------------------------------------- /packages/api-client/.gitignore: -------------------------------------------------------------------------------- 1 | # Node template 2 | dist/ 3 | tsconfig.tsbuildinfo 4 | # Logs 5 | logs 6 | *.log 7 | npm-debug.log* 8 | yarn-debug.log* 9 | yarn-error.log* 10 | .tsbuildinfo 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | 24 | # nyc test coverage 25 | .nyc_output 26 | 27 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 28 | .grunt 29 | 30 | # Bower dependency directory (https://bower.io/) 31 | bower_components 32 | 33 | # node-waf configuration 34 | .lock-wscript 35 | 36 | # Compiled binary addons (https://nodejs.org/api/addons.html) 37 | build/Release 38 | 39 | # Dependency directories 40 | node_modules/ 41 | jspm_packages/ 42 | 43 | # Typescript v1 declaration files 44 | typings/ 45 | 46 | # Optional npm cache directory 47 | .npm 48 | 49 | # Optional eslint cache 50 | .eslintcache 51 | 52 | # Optional REPL history 53 | .node_repl_history 54 | 55 | # Output of 'npm pack' 56 | *.tgz 57 | 58 | # Yarn Integrity file 59 | .yarn-integrity 60 | 61 | # IDE 62 | .idea/* 63 | *.iml 64 | *.sublime-* 65 | 66 | # OSX 67 | .DS_Store 68 | 69 | docs 70 | -------------------------------------------------------------------------------- /packages/api-client/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | printWidth: 120, 3 | semi: false, 4 | trailingComma: 'all', 5 | singleQuote: true, 6 | } 7 | -------------------------------------------------------------------------------- /packages/api-client/README.md: -------------------------------------------------------------------------------- 1 | # @halo-dev/api-client 2 | 3 | Halo 2.0 的 JavaScript API 客户端请求库。使用 [OpenAPI Generator](https://openapi-generator.tech/) 生成。 4 | 5 | ## 开发环境 6 | 7 | ```bash 8 | pnpm install 9 | ``` 10 | 11 | ```bash 12 | # 根据 OpenAPI 3.0 生成类型和网络请求的代码,此步骤需要启动 Halo 2.0 后端。 13 | pnpm gen 14 | ``` 15 | 16 | ```bash 17 | pnpm build 18 | ``` 19 | 20 | ## 发布版本 21 | 22 | ```bash 23 | pnpm release 24 | ``` 25 | -------------------------------------------------------------------------------- /packages/api-client/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild' 2 | 3 | export default defineBuildConfig({ 4 | entries: ['src/index'], 5 | declaration: true, 6 | clean: true, 7 | rollup: { 8 | emitCJS: true, 9 | }, 10 | externals: ['axios'], 11 | }) 12 | -------------------------------------------------------------------------------- /packages/api-client/openapitools.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", 3 | "spaces": 2, 4 | "generator-cli": { 5 | "version": "6.3.0" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/api-client/src/.gitignore: -------------------------------------------------------------------------------- 1 | wwwroot/*.js 2 | node_modules 3 | typings 4 | dist 5 | -------------------------------------------------------------------------------- /packages/api-client/src/.npmignore: -------------------------------------------------------------------------------- 1 | # empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm -------------------------------------------------------------------------------- /packages/api-client/src/.openapi-generator-ignore: -------------------------------------------------------------------------------- 1 | # OpenAPI Generator Ignore 2 | # Generated by openapi-generator https://github.com/openapitools/openapi-generator 3 | 4 | # Use this file to prevent files from being overwritten by the generator. 5 | # The patterns follow closely to .gitignore or .dockerignore. 6 | 7 | # As an example, the C# client generator defines ApiClient.cs. 8 | # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: 9 | #ApiClient.cs 10 | 11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*): 12 | #foo/*/qux 13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux 14 | 15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**): 16 | #foo/**/qux 17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux 18 | 19 | # You can also negate patterns with an exclamation (!). 20 | # For example, you can ignore all files in a docs folder with the file extension .md: 21 | #docs/*.md 22 | # Then explicitly reverse the ignore rule for a single file: 23 | #!docs/README.md 24 | -------------------------------------------------------------------------------- /packages/api-client/src/.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | 6.3.0 -------------------------------------------------------------------------------- /packages/api-client/src/.openapi_config.yaml: -------------------------------------------------------------------------------- 1 | supportsES6: true 2 | useSingleRequestParameter: true 3 | withSeparateModelsAndApi: true 4 | apiPackage: api 5 | modelPackage: models 6 | -------------------------------------------------------------------------------- /packages/api-client/src/index.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | export * from './api' 16 | export * from './configuration' 17 | export * from './models' 18 | -------------------------------------------------------------------------------- /packages/api-client/src/models/annotation-setting-spec.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { GroupKind } from './group-kind' 18 | 19 | /** 20 | * 21 | * @export 22 | * @interface AnnotationSettingSpec 23 | */ 24 | export interface AnnotationSettingSpec { 25 | /** 26 | * 27 | * @type {GroupKind} 28 | * @memberof AnnotationSettingSpec 29 | */ 30 | targetRef: GroupKind 31 | /** 32 | * 33 | * @type {Array} 34 | * @memberof AnnotationSettingSpec 35 | */ 36 | formSchema: Array 37 | } 38 | -------------------------------------------------------------------------------- /packages/api-client/src/models/annotation-setting.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { AnnotationSettingSpec } from './annotation-setting-spec' 18 | // May contain unused imports in some cases 19 | // @ts-ignore 20 | import { Metadata } from './metadata' 21 | 22 | /** 23 | * 24 | * @export 25 | * @interface AnnotationSetting 26 | */ 27 | export interface AnnotationSetting { 28 | /** 29 | * 30 | * @type {AnnotationSettingSpec} 31 | * @memberof AnnotationSetting 32 | */ 33 | spec: AnnotationSettingSpec 34 | /** 35 | * 36 | * @type {string} 37 | * @memberof AnnotationSetting 38 | */ 39 | apiVersion: string 40 | /** 41 | * 42 | * @type {string} 43 | * @memberof AnnotationSetting 44 | */ 45 | kind: string 46 | /** 47 | * 48 | * @type {Metadata} 49 | * @memberof AnnotationSetting 50 | */ 51 | metadata: Metadata 52 | } 53 | -------------------------------------------------------------------------------- /packages/api-client/src/models/attachment-status.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface AttachmentStatus 19 | */ 20 | export interface AttachmentStatus { 21 | /** 22 | * Permalink of attachment 23 | * @type {string} 24 | * @memberof AttachmentStatus 25 | */ 26 | permalink?: string 27 | } 28 | -------------------------------------------------------------------------------- /packages/api-client/src/models/author.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface Author 19 | */ 20 | export interface Author { 21 | /** 22 | * 23 | * @type {string} 24 | * @memberof Author 25 | */ 26 | name: string 27 | /** 28 | * 29 | * @type {string} 30 | * @memberof Author 31 | */ 32 | website?: string 33 | } 34 | -------------------------------------------------------------------------------- /packages/api-client/src/models/category-spec.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface CategorySpec 19 | */ 20 | export interface CategorySpec { 21 | /** 22 | * 23 | * @type {string} 24 | * @memberof CategorySpec 25 | */ 26 | displayName: string 27 | /** 28 | * 29 | * @type {string} 30 | * @memberof CategorySpec 31 | */ 32 | slug: string 33 | /** 34 | * 35 | * @type {string} 36 | * @memberof CategorySpec 37 | */ 38 | description?: string 39 | /** 40 | * 41 | * @type {string} 42 | * @memberof CategorySpec 43 | */ 44 | cover?: string 45 | /** 46 | * 47 | * @type {string} 48 | * @memberof CategorySpec 49 | */ 50 | template?: string 51 | /** 52 | * 53 | * @type {number} 54 | * @memberof CategorySpec 55 | */ 56 | priority: number 57 | /** 58 | * 59 | * @type {Array} 60 | * @memberof CategorySpec 61 | */ 62 | children?: Array 63 | } 64 | -------------------------------------------------------------------------------- /packages/api-client/src/models/category-status.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface CategoryStatus 19 | */ 20 | export interface CategoryStatus { 21 | /** 22 | * 23 | * @type {string} 24 | * @memberof CategoryStatus 25 | */ 26 | permalink?: string 27 | /** 28 | * 29 | * @type {number} 30 | * @memberof CategoryStatus 31 | */ 32 | postCount?: number 33 | /** 34 | * 35 | * @type {number} 36 | * @memberof CategoryStatus 37 | */ 38 | visiblePostCount?: number 39 | } 40 | -------------------------------------------------------------------------------- /packages/api-client/src/models/change-password-request.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface ChangePasswordRequest 19 | */ 20 | export interface ChangePasswordRequest { 21 | /** 22 | * New password. 23 | * @type {string} 24 | * @memberof ChangePasswordRequest 25 | */ 26 | password: string 27 | } 28 | -------------------------------------------------------------------------------- /packages/api-client/src/models/comment-email-owner.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface CommentEmailOwner 19 | */ 20 | export interface CommentEmailOwner { 21 | /** 22 | * 23 | * @type {string} 24 | * @memberof CommentEmailOwner 25 | */ 26 | email?: string 27 | /** 28 | * 29 | * @type {string} 30 | * @memberof CommentEmailOwner 31 | */ 32 | avatar?: string 33 | /** 34 | * 35 | * @type {string} 36 | * @memberof CommentEmailOwner 37 | */ 38 | displayName?: string 39 | /** 40 | * 41 | * @type {string} 42 | * @memberof CommentEmailOwner 43 | */ 44 | website?: string 45 | } 46 | -------------------------------------------------------------------------------- /packages/api-client/src/models/comment-owner.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface CommentOwner 19 | */ 20 | export interface CommentOwner { 21 | /** 22 | * 23 | * @type {string} 24 | * @memberof CommentOwner 25 | */ 26 | kind: string 27 | /** 28 | * 29 | * @type {string} 30 | * @memberof CommentOwner 31 | */ 32 | name: string 33 | /** 34 | * 35 | * @type {string} 36 | * @memberof CommentOwner 37 | */ 38 | displayName?: string 39 | /** 40 | * 41 | * @type {{ [key: string]: string; }} 42 | * @memberof CommentOwner 43 | */ 44 | annotations?: { [key: string]: string } 45 | } 46 | -------------------------------------------------------------------------------- /packages/api-client/src/models/comment-request.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { CommentEmailOwner } from './comment-email-owner' 18 | // May contain unused imports in some cases 19 | // @ts-ignore 20 | import { Ref } from './ref' 21 | 22 | /** 23 | * 24 | * @export 25 | * @interface CommentRequest 26 | */ 27 | export interface CommentRequest { 28 | /** 29 | * 30 | * @type {Ref} 31 | * @memberof CommentRequest 32 | */ 33 | subjectRef: Ref 34 | /** 35 | * 36 | * @type {CommentEmailOwner} 37 | * @memberof CommentRequest 38 | */ 39 | owner?: CommentEmailOwner 40 | /** 41 | * 42 | * @type {string} 43 | * @memberof CommentRequest 44 | */ 45 | raw: string 46 | /** 47 | * 48 | * @type {string} 49 | * @memberof CommentRequest 50 | */ 51 | content: string 52 | /** 53 | * 54 | * @type {boolean} 55 | * @memberof CommentRequest 56 | */ 57 | allowNotification?: boolean 58 | } 59 | -------------------------------------------------------------------------------- /packages/api-client/src/models/comment-status.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface CommentStatus 19 | */ 20 | export interface CommentStatus { 21 | /** 22 | * 23 | * @type {string} 24 | * @memberof CommentStatus 25 | */ 26 | lastReplyTime?: string 27 | /** 28 | * 29 | * @type {number} 30 | * @memberof CommentStatus 31 | */ 32 | replyCount?: number 33 | /** 34 | * 35 | * @type {number} 36 | * @memberof CommentStatus 37 | */ 38 | unreadReplyCount?: number 39 | /** 40 | * 41 | * @type {boolean} 42 | * @memberof CommentStatus 43 | */ 44 | hasNewReply?: boolean 45 | } 46 | -------------------------------------------------------------------------------- /packages/api-client/src/models/condition.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface Condition 19 | */ 20 | export interface Condition { 21 | /** 22 | * 23 | * @type {string} 24 | * @memberof Condition 25 | */ 26 | type: string 27 | /** 28 | * 29 | * @type {string} 30 | * @memberof Condition 31 | */ 32 | status: ConditionStatusEnum 33 | /** 34 | * 35 | * @type {string} 36 | * @memberof Condition 37 | */ 38 | lastTransitionTime: string 39 | /** 40 | * 41 | * @type {string} 42 | * @memberof Condition 43 | */ 44 | message: string 45 | /** 46 | * 47 | * @type {string} 48 | * @memberof Condition 49 | */ 50 | reason: string 51 | } 52 | 53 | export const ConditionStatusEnum = { 54 | True: 'TRUE', 55 | False: 'FALSE', 56 | Unknown: 'UNKNOWN', 57 | } as const 58 | 59 | export type ConditionStatusEnum = typeof ConditionStatusEnum[keyof typeof ConditionStatusEnum] 60 | -------------------------------------------------------------------------------- /packages/api-client/src/models/config-map.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { Metadata } from './metadata' 18 | 19 | /** 20 | * 21 | * @export 22 | * @interface ConfigMap 23 | */ 24 | export interface ConfigMap { 25 | /** 26 | * 27 | * @type {{ [key: string]: string; }} 28 | * @memberof ConfigMap 29 | */ 30 | data?: { [key: string]: string } 31 | /** 32 | * 33 | * @type {string} 34 | * @memberof ConfigMap 35 | */ 36 | apiVersion: string 37 | /** 38 | * 39 | * @type {string} 40 | * @memberof ConfigMap 41 | */ 42 | kind: string 43 | /** 44 | * 45 | * @type {Metadata} 46 | * @memberof ConfigMap 47 | */ 48 | metadata: Metadata 49 | } 50 | -------------------------------------------------------------------------------- /packages/api-client/src/models/content-wrapper.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface ContentWrapper 19 | */ 20 | export interface ContentWrapper { 21 | /** 22 | * 23 | * @type {string} 24 | * @memberof ContentWrapper 25 | */ 26 | snapshotName?: string 27 | /** 28 | * 29 | * @type {string} 30 | * @memberof ContentWrapper 31 | */ 32 | raw?: string 33 | /** 34 | * 35 | * @type {string} 36 | * @memberof ContentWrapper 37 | */ 38 | content?: string 39 | /** 40 | * 41 | * @type {string} 42 | * @memberof ContentWrapper 43 | */ 44 | rawType?: string 45 | } 46 | -------------------------------------------------------------------------------- /packages/api-client/src/models/content.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface Content 19 | */ 20 | export interface Content { 21 | /** 22 | * 23 | * @type {string} 24 | * @memberof Content 25 | */ 26 | raw?: string 27 | /** 28 | * 29 | * @type {string} 30 | * @memberof Content 31 | */ 32 | content?: string 33 | /** 34 | * 35 | * @type {string} 36 | * @memberof Content 37 | */ 38 | rawType?: string 39 | } 40 | -------------------------------------------------------------------------------- /packages/api-client/src/models/contributor.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface Contributor 19 | */ 20 | export interface Contributor { 21 | /** 22 | * 23 | * @type {string} 24 | * @memberof Contributor 25 | */ 26 | displayName?: string 27 | /** 28 | * 29 | * @type {string} 30 | * @memberof Contributor 31 | */ 32 | avatar?: string 33 | /** 34 | * 35 | * @type {string} 36 | * @memberof Contributor 37 | */ 38 | name?: string 39 | } 40 | -------------------------------------------------------------------------------- /packages/api-client/src/models/counter-request.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface CounterRequest 19 | */ 20 | export interface CounterRequest { 21 | /** 22 | * 23 | * @type {string} 24 | * @memberof CounterRequest 25 | */ 26 | group?: string 27 | /** 28 | * 29 | * @type {string} 30 | * @memberof CounterRequest 31 | */ 32 | plural?: string 33 | /** 34 | * 35 | * @type {string} 36 | * @memberof CounterRequest 37 | */ 38 | name?: string 39 | /** 40 | * 41 | * @type {string} 42 | * @memberof CounterRequest 43 | */ 44 | hostname?: string 45 | /** 46 | * 47 | * @type {string} 48 | * @memberof CounterRequest 49 | */ 50 | screen?: string 51 | /** 52 | * 53 | * @type {string} 54 | * @memberof CounterRequest 55 | */ 56 | language?: string 57 | /** 58 | * 59 | * @type {string} 60 | * @memberof CounterRequest 61 | */ 62 | referrer?: string 63 | } 64 | -------------------------------------------------------------------------------- /packages/api-client/src/models/custom-templates.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { TemplateDescriptor } from './template-descriptor' 18 | 19 | /** 20 | * 21 | * @export 22 | * @interface CustomTemplates 23 | */ 24 | export interface CustomTemplates { 25 | /** 26 | * 27 | * @type {Array} 28 | * @memberof CustomTemplates 29 | */ 30 | post?: Array 31 | /** 32 | * 33 | * @type {Array} 34 | * @memberof CustomTemplates 35 | */ 36 | category?: Array 37 | /** 38 | * 39 | * @type {Array} 40 | * @memberof CustomTemplates 41 | */ 42 | page?: Array 43 | } 44 | -------------------------------------------------------------------------------- /packages/api-client/src/models/dashboard-stats.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface DashboardStats 19 | */ 20 | export interface DashboardStats { 21 | /** 22 | * 23 | * @type {number} 24 | * @memberof DashboardStats 25 | */ 26 | visits?: number 27 | /** 28 | * 29 | * @type {number} 30 | * @memberof DashboardStats 31 | */ 32 | comments?: number 33 | /** 34 | * 35 | * @type {number} 36 | * @memberof DashboardStats 37 | */ 38 | approvedComments?: number 39 | /** 40 | * 41 | * @type {number} 42 | * @memberof DashboardStats 43 | */ 44 | upvotes?: number 45 | /** 46 | * 47 | * @type {number} 48 | * @memberof DashboardStats 49 | */ 50 | users?: number 51 | /** 52 | * 53 | * @type {number} 54 | * @memberof DashboardStats 55 | */ 56 | posts?: number 57 | } 58 | -------------------------------------------------------------------------------- /packages/api-client/src/models/detailed-user.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { Role } from './role' 18 | // May contain unused imports in some cases 19 | // @ts-ignore 20 | import { User } from './user' 21 | 22 | /** 23 | * 24 | * @export 25 | * @interface DetailedUser 26 | */ 27 | export interface DetailedUser { 28 | /** 29 | * 30 | * @type {User} 31 | * @memberof DetailedUser 32 | */ 33 | user: User 34 | /** 35 | * 36 | * @type {Array} 37 | * @memberof DetailedUser 38 | */ 39 | roles: Array 40 | } 41 | -------------------------------------------------------------------------------- /packages/api-client/src/models/excerpt.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface Excerpt 19 | */ 20 | export interface Excerpt { 21 | /** 22 | * 23 | * @type {boolean} 24 | * @memberof Excerpt 25 | */ 26 | autoGenerate: boolean 27 | /** 28 | * 29 | * @type {string} 30 | * @memberof Excerpt 31 | */ 32 | raw?: string 33 | } 34 | -------------------------------------------------------------------------------- /packages/api-client/src/models/extension.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { Metadata } from './metadata' 18 | 19 | /** 20 | * 21 | * @export 22 | * @interface Extension 23 | */ 24 | export interface Extension { 25 | /** 26 | * 27 | * @type {string} 28 | * @memberof Extension 29 | */ 30 | kind: string 31 | /** 32 | * 33 | * @type {string} 34 | * @memberof Extension 35 | */ 36 | apiVersion: string 37 | /** 38 | * 39 | * @type {Metadata} 40 | * @memberof Extension 41 | */ 42 | metadata: Metadata 43 | } 44 | -------------------------------------------------------------------------------- /packages/api-client/src/models/file-reverse-proxy-provider.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface FileReverseProxyProvider 19 | */ 20 | export interface FileReverseProxyProvider { 21 | /** 22 | * 23 | * @type {string} 24 | * @memberof FileReverseProxyProvider 25 | */ 26 | directory?: string 27 | /** 28 | * 29 | * @type {string} 30 | * @memberof FileReverseProxyProvider 31 | */ 32 | filename?: string 33 | } 34 | -------------------------------------------------------------------------------- /packages/api-client/src/models/grant-request.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface GrantRequest 19 | */ 20 | export interface GrantRequest { 21 | /** 22 | * 23 | * @type {Array} 24 | * @memberof GrantRequest 25 | */ 26 | roles?: Array 27 | } 28 | -------------------------------------------------------------------------------- /packages/api-client/src/models/group-kind.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface GroupKind 19 | */ 20 | export interface GroupKind { 21 | /** 22 | * 23 | * @type {string} 24 | * @memberof GroupKind 25 | */ 26 | group?: string 27 | /** 28 | * 29 | * @type {string} 30 | * @memberof GroupKind 31 | */ 32 | kind?: string 33 | } 34 | -------------------------------------------------------------------------------- /packages/api-client/src/models/group-spec.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface GroupSpec 19 | */ 20 | export interface GroupSpec { 21 | /** 22 | * Display name of group 23 | * @type {string} 24 | * @memberof GroupSpec 25 | */ 26 | displayName: string 27 | } 28 | -------------------------------------------------------------------------------- /packages/api-client/src/models/group-status.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface GroupStatus 19 | */ 20 | export interface GroupStatus { 21 | /** 22 | * Update timestamp of the group 23 | * @type {string} 24 | * @memberof GroupStatus 25 | */ 26 | updateTimestamp?: string 27 | /** 28 | * Total of attachments under the current group 29 | * @type {number} 30 | * @memberof GroupStatus 31 | */ 32 | totalAttachments?: number 33 | } 34 | -------------------------------------------------------------------------------- /packages/api-client/src/models/license.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface License 19 | */ 20 | export interface License { 21 | /** 22 | * 23 | * @type {string} 24 | * @memberof License 25 | */ 26 | name?: string 27 | /** 28 | * 29 | * @type {string} 30 | * @memberof License 31 | */ 32 | url?: string 33 | } 34 | -------------------------------------------------------------------------------- /packages/api-client/src/models/listed-comment.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { Comment } from './comment' 18 | // May contain unused imports in some cases 19 | // @ts-ignore 20 | import { Extension } from './extension' 21 | // May contain unused imports in some cases 22 | // @ts-ignore 23 | import { OwnerInfo } from './owner-info' 24 | 25 | /** 26 | * A chunk of items. 27 | * @export 28 | * @interface ListedComment 29 | */ 30 | export interface ListedComment { 31 | /** 32 | * 33 | * @type {Comment} 34 | * @memberof ListedComment 35 | */ 36 | comment: Comment 37 | /** 38 | * 39 | * @type {OwnerInfo} 40 | * @memberof ListedComment 41 | */ 42 | owner: OwnerInfo 43 | /** 44 | * 45 | * @type {Extension} 46 | * @memberof ListedComment 47 | */ 48 | subject?: Extension 49 | } 50 | -------------------------------------------------------------------------------- /packages/api-client/src/models/listed-reply.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { OwnerInfo } from './owner-info' 18 | // May contain unused imports in some cases 19 | // @ts-ignore 20 | import { Reply } from './reply' 21 | 22 | /** 23 | * A chunk of items. 24 | * @export 25 | * @interface ListedReply 26 | */ 27 | export interface ListedReply { 28 | /** 29 | * 30 | * @type {Reply} 31 | * @memberof ListedReply 32 | */ 33 | reply: Reply 34 | /** 35 | * 36 | * @type {OwnerInfo} 37 | * @memberof ListedReply 38 | */ 39 | owner: OwnerInfo 40 | } 41 | -------------------------------------------------------------------------------- /packages/api-client/src/models/listed-user.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { Role } from './role' 18 | // May contain unused imports in some cases 19 | // @ts-ignore 20 | import { User } from './user' 21 | 22 | /** 23 | * A chunk of items. 24 | * @export 25 | * @interface ListedUser 26 | */ 27 | export interface ListedUser { 28 | /** 29 | * 30 | * @type {User} 31 | * @memberof ListedUser 32 | */ 33 | user: User 34 | /** 35 | * 36 | * @type {Array} 37 | * @memberof ListedUser 38 | */ 39 | roles: Array 40 | } 41 | -------------------------------------------------------------------------------- /packages/api-client/src/models/login-history.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface LoginHistory 19 | */ 20 | export interface LoginHistory { 21 | /** 22 | * 23 | * @type {string} 24 | * @memberof LoginHistory 25 | */ 26 | loginAt: string 27 | /** 28 | * 29 | * @type {string} 30 | * @memberof LoginHistory 31 | */ 32 | sourceIp: string 33 | /** 34 | * 35 | * @type {string} 36 | * @memberof LoginHistory 37 | */ 38 | userAgent: string 39 | /** 40 | * 41 | * @type {boolean} 42 | * @memberof LoginHistory 43 | */ 44 | successful: boolean 45 | /** 46 | * 47 | * @type {string} 48 | * @memberof LoginHistory 49 | */ 50 | reason?: string 51 | } 52 | -------------------------------------------------------------------------------- /packages/api-client/src/models/menu-item-status.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * The status of menu item. 17 | * @export 18 | * @interface MenuItemStatus 19 | */ 20 | export interface MenuItemStatus { 21 | /** 22 | * Calculated Display name of menu item. 23 | * @type {string} 24 | * @memberof MenuItemStatus 25 | */ 26 | displayName?: string 27 | /** 28 | * Calculated href of manu item. 29 | * @type {string} 30 | * @memberof MenuItemStatus 31 | */ 32 | href?: string 33 | } 34 | -------------------------------------------------------------------------------- /packages/api-client/src/models/menu-spec.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * The spec of menu. 17 | * @export 18 | * @interface MenuSpec 19 | */ 20 | export interface MenuSpec { 21 | /** 22 | * The display name of the menu. 23 | * @type {string} 24 | * @memberof MenuSpec 25 | */ 26 | displayName: string 27 | /** 28 | * Names of menu children below this menu. 29 | * @type {Array} 30 | * @memberof MenuSpec 31 | */ 32 | menuItems?: Array 33 | } 34 | -------------------------------------------------------------------------------- /packages/api-client/src/models/menu.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { MenuSpec } from './menu-spec' 18 | // May contain unused imports in some cases 19 | // @ts-ignore 20 | import { Metadata } from './metadata' 21 | 22 | /** 23 | * 24 | * @export 25 | * @interface Menu 26 | */ 27 | export interface Menu { 28 | /** 29 | * 30 | * @type {MenuSpec} 31 | * @memberof Menu 32 | */ 33 | spec: MenuSpec 34 | /** 35 | * 36 | * @type {string} 37 | * @memberof Menu 38 | */ 39 | apiVersion: string 40 | /** 41 | * 42 | * @type {string} 43 | * @memberof Menu 44 | */ 45 | kind: string 46 | /** 47 | * 48 | * @type {Metadata} 49 | * @memberof Menu 50 | */ 51 | metadata: Metadata 52 | } 53 | -------------------------------------------------------------------------------- /packages/api-client/src/models/owner-info.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface OwnerInfo 19 | */ 20 | export interface OwnerInfo { 21 | /** 22 | * 23 | * @type {string} 24 | * @memberof OwnerInfo 25 | */ 26 | kind?: string 27 | /** 28 | * 29 | * @type {string} 30 | * @memberof OwnerInfo 31 | */ 32 | name?: string 33 | /** 34 | * 35 | * @type {string} 36 | * @memberof OwnerInfo 37 | */ 38 | displayName?: string 39 | /** 40 | * 41 | * @type {string} 42 | * @memberof OwnerInfo 43 | */ 44 | avatar?: string 45 | /** 46 | * 47 | * @type {string} 48 | * @memberof OwnerInfo 49 | */ 50 | email?: string 51 | } 52 | -------------------------------------------------------------------------------- /packages/api-client/src/models/personal-access-token-spec.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface PersonalAccessTokenSpec 19 | */ 20 | export interface PersonalAccessTokenSpec { 21 | /** 22 | * 23 | * @type {string} 24 | * @memberof PersonalAccessTokenSpec 25 | */ 26 | userName?: string 27 | /** 28 | * 29 | * @type {string} 30 | * @memberof PersonalAccessTokenSpec 31 | */ 32 | displayName?: string 33 | /** 34 | * 35 | * @type {boolean} 36 | * @memberof PersonalAccessTokenSpec 37 | */ 38 | revoked?: boolean 39 | /** 40 | * 41 | * @type {string} 42 | * @memberof PersonalAccessTokenSpec 43 | */ 44 | expiresAt?: string 45 | /** 46 | * 47 | * @type {string} 48 | * @memberof PersonalAccessTokenSpec 49 | */ 50 | scopes?: string 51 | /** 52 | * 53 | * @type {string} 54 | * @memberof PersonalAccessTokenSpec 55 | */ 56 | tokenDigest?: string 57 | } 58 | -------------------------------------------------------------------------------- /packages/api-client/src/models/personal-access-token.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { Metadata } from './metadata' 18 | // May contain unused imports in some cases 19 | // @ts-ignore 20 | import { PersonalAccessTokenSpec } from './personal-access-token-spec' 21 | 22 | /** 23 | * 24 | * @export 25 | * @interface PersonalAccessToken 26 | */ 27 | export interface PersonalAccessToken { 28 | /** 29 | * 30 | * @type {PersonalAccessTokenSpec} 31 | * @memberof PersonalAccessToken 32 | */ 33 | spec?: PersonalAccessTokenSpec 34 | /** 35 | * 36 | * @type {string} 37 | * @memberof PersonalAccessToken 38 | */ 39 | apiVersion: string 40 | /** 41 | * 42 | * @type {string} 43 | * @memberof PersonalAccessToken 44 | */ 45 | kind: string 46 | /** 47 | * 48 | * @type {Metadata} 49 | * @memberof PersonalAccessToken 50 | */ 51 | metadata: Metadata 52 | } 53 | -------------------------------------------------------------------------------- /packages/api-client/src/models/plugin-author.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface PluginAuthor 19 | */ 20 | export interface PluginAuthor { 21 | /** 22 | * 23 | * @type {string} 24 | * @memberof PluginAuthor 25 | */ 26 | name: string 27 | /** 28 | * 29 | * @type {string} 30 | * @memberof PluginAuthor 31 | */ 32 | website?: string 33 | } 34 | -------------------------------------------------------------------------------- /packages/api-client/src/models/policy-rule.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface PolicyRule 19 | */ 20 | export interface PolicyRule { 21 | /** 22 | * 23 | * @type {Array} 24 | * @memberof PolicyRule 25 | */ 26 | apiGroups?: Array 27 | /** 28 | * 29 | * @type {Array} 30 | * @memberof PolicyRule 31 | */ 32 | resources?: Array 33 | /** 34 | * 35 | * @type {Array} 36 | * @memberof PolicyRule 37 | */ 38 | resourceNames?: Array 39 | /** 40 | * 41 | * @type {Array} 42 | * @memberof PolicyRule 43 | */ 44 | nonResourceURLs?: Array 45 | /** 46 | * 47 | * @type {Array} 48 | * @memberof PolicyRule 49 | */ 50 | verbs?: Array 51 | } 52 | -------------------------------------------------------------------------------- /packages/api-client/src/models/policy-spec.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface PolicySpec 19 | */ 20 | export interface PolicySpec { 21 | /** 22 | * Display name of policy 23 | * @type {string} 24 | * @memberof PolicySpec 25 | */ 26 | displayName: string 27 | /** 28 | * Reference name of PolicyTemplate 29 | * @type {string} 30 | * @memberof PolicySpec 31 | */ 32 | templateName: string 33 | /** 34 | * Reference name of ConfigMap extension 35 | * @type {string} 36 | * @memberof PolicySpec 37 | */ 38 | configMapName?: string 39 | } 40 | -------------------------------------------------------------------------------- /packages/api-client/src/models/policy-template-spec.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface PolicyTemplateSpec 19 | */ 20 | export interface PolicyTemplateSpec { 21 | /** 22 | * 23 | * @type {string} 24 | * @memberof PolicyTemplateSpec 25 | */ 26 | displayName?: string 27 | /** 28 | * 29 | * @type {string} 30 | * @memberof PolicyTemplateSpec 31 | */ 32 | settingName: string 33 | } 34 | -------------------------------------------------------------------------------- /packages/api-client/src/models/policy-template.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { Metadata } from './metadata' 18 | // May contain unused imports in some cases 19 | // @ts-ignore 20 | import { PolicyTemplateSpec } from './policy-template-spec' 21 | 22 | /** 23 | * 24 | * @export 25 | * @interface PolicyTemplate 26 | */ 27 | export interface PolicyTemplate { 28 | /** 29 | * 30 | * @type {PolicyTemplateSpec} 31 | * @memberof PolicyTemplate 32 | */ 33 | spec?: PolicyTemplateSpec 34 | /** 35 | * 36 | * @type {string} 37 | * @memberof PolicyTemplate 38 | */ 39 | apiVersion: string 40 | /** 41 | * 42 | * @type {string} 43 | * @memberof PolicyTemplate 44 | */ 45 | kind: string 46 | /** 47 | * 48 | * @type {Metadata} 49 | * @memberof PolicyTemplate 50 | */ 51 | metadata: Metadata 52 | } 53 | -------------------------------------------------------------------------------- /packages/api-client/src/models/policy.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { Metadata } from './metadata' 18 | // May contain unused imports in some cases 19 | // @ts-ignore 20 | import { PolicySpec } from './policy-spec' 21 | 22 | /** 23 | * 24 | * @export 25 | * @interface Policy 26 | */ 27 | export interface Policy { 28 | /** 29 | * 30 | * @type {PolicySpec} 31 | * @memberof Policy 32 | */ 33 | spec: PolicySpec 34 | /** 35 | * 36 | * @type {string} 37 | * @memberof Policy 38 | */ 39 | apiVersion: string 40 | /** 41 | * 42 | * @type {string} 43 | * @memberof Policy 44 | */ 45 | kind: string 46 | /** 47 | * 48 | * @type {Metadata} 49 | * @memberof Policy 50 | */ 51 | metadata: Metadata 52 | } 53 | -------------------------------------------------------------------------------- /packages/api-client/src/models/post-hit.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface PostHit 19 | */ 20 | export interface PostHit { 21 | /** 22 | * 23 | * @type {string} 24 | * @memberof PostHit 25 | */ 26 | name?: string 27 | /** 28 | * 29 | * @type {string} 30 | * @memberof PostHit 31 | */ 32 | title?: string 33 | /** 34 | * 35 | * @type {string} 36 | * @memberof PostHit 37 | */ 38 | content?: string 39 | /** 40 | * 41 | * @type {string} 42 | * @memberof PostHit 43 | */ 44 | publishTimestamp?: string 45 | /** 46 | * 47 | * @type {string} 48 | * @memberof PostHit 49 | */ 50 | permalink?: string 51 | } 52 | -------------------------------------------------------------------------------- /packages/api-client/src/models/post-hits.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { PostHit } from './post-hit' 18 | 19 | /** 20 | * 21 | * @export 22 | * @interface PostHits 23 | */ 24 | export interface PostHits { 25 | /** 26 | * 27 | * @type {Array} 28 | * @memberof PostHits 29 | */ 30 | hits?: Array 31 | /** 32 | * 33 | * @type {string} 34 | * @memberof PostHits 35 | */ 36 | keyword?: string 37 | /** 38 | * 39 | * @type {number} 40 | * @memberof PostHits 41 | */ 42 | total?: number 43 | /** 44 | * 45 | * @type {number} 46 | * @memberof PostHits 47 | */ 48 | limit?: number 49 | /** 50 | * 51 | * @type {number} 52 | * @memberof PostHits 53 | */ 54 | processingTimeMillis?: number 55 | } 56 | -------------------------------------------------------------------------------- /packages/api-client/src/models/post-request.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { Content } from './content' 18 | // May contain unused imports in some cases 19 | // @ts-ignore 20 | import { Post } from './post' 21 | 22 | /** 23 | * 24 | * @export 25 | * @interface PostRequest 26 | */ 27 | export interface PostRequest { 28 | /** 29 | * 30 | * @type {Post} 31 | * @memberof PostRequest 32 | */ 33 | post: Post 34 | /** 35 | * 36 | * @type {Content} 37 | * @memberof PostRequest 38 | */ 39 | content: Content 40 | } 41 | -------------------------------------------------------------------------------- /packages/api-client/src/models/post.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { Metadata } from './metadata' 18 | // May contain unused imports in some cases 19 | // @ts-ignore 20 | import { PostSpec } from './post-spec' 21 | // May contain unused imports in some cases 22 | // @ts-ignore 23 | import { PostStatus } from './post-status' 24 | 25 | /** 26 | * 27 | * @export 28 | * @interface Post 29 | */ 30 | export interface Post { 31 | /** 32 | * 33 | * @type {PostSpec} 34 | * @memberof Post 35 | */ 36 | spec: PostSpec 37 | /** 38 | * 39 | * @type {PostStatus} 40 | * @memberof Post 41 | */ 42 | status?: PostStatus 43 | /** 44 | * 45 | * @type {string} 46 | * @memberof Post 47 | */ 48 | apiVersion: string 49 | /** 50 | * 51 | * @type {string} 52 | * @memberof Post 53 | */ 54 | kind: string 55 | /** 56 | * 57 | * @type {Metadata} 58 | * @memberof Post 59 | */ 60 | metadata: Metadata 61 | } 62 | -------------------------------------------------------------------------------- /packages/api-client/src/models/ref.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * Extension reference object. The name is mandatory 17 | * @export 18 | * @interface Ref 19 | */ 20 | export interface Ref { 21 | /** 22 | * Extension group 23 | * @type {string} 24 | * @memberof Ref 25 | */ 26 | group?: string 27 | /** 28 | * Extension version 29 | * @type {string} 30 | * @memberof Ref 31 | */ 32 | version?: string 33 | /** 34 | * Extension kind 35 | * @type {string} 36 | * @memberof Ref 37 | */ 38 | kind?: string 39 | /** 40 | * Extension name. This field is mandatory 41 | * @type {string} 42 | * @memberof Ref 43 | */ 44 | name: string 45 | } 46 | -------------------------------------------------------------------------------- /packages/api-client/src/models/reply-request.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { CommentEmailOwner } from './comment-email-owner' 18 | 19 | /** 20 | * 21 | * @export 22 | * @interface ReplyRequest 23 | */ 24 | export interface ReplyRequest { 25 | /** 26 | * 27 | * @type {string} 28 | * @memberof ReplyRequest 29 | */ 30 | raw: string 31 | /** 32 | * 33 | * @type {string} 34 | * @memberof ReplyRequest 35 | */ 36 | content: string 37 | /** 38 | * 39 | * @type {boolean} 40 | * @memberof ReplyRequest 41 | */ 42 | allowNotification?: boolean 43 | /** 44 | * 45 | * @type {CommentEmailOwner} 46 | * @memberof ReplyRequest 47 | */ 48 | owner?: CommentEmailOwner 49 | /** 50 | * 51 | * @type {string} 52 | * @memberof ReplyRequest 53 | */ 54 | quoteReply?: string 55 | } 56 | -------------------------------------------------------------------------------- /packages/api-client/src/models/reply-vo.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { Metadata } from './metadata' 18 | // May contain unused imports in some cases 19 | // @ts-ignore 20 | import { OwnerInfo } from './owner-info' 21 | // May contain unused imports in some cases 22 | // @ts-ignore 23 | import { ReplySpec } from './reply-spec' 24 | 25 | /** 26 | * A chunk of items. 27 | * @export 28 | * @interface ReplyVo 29 | */ 30 | export interface ReplyVo { 31 | /** 32 | * 33 | * @type {Metadata} 34 | * @memberof ReplyVo 35 | */ 36 | metadata: Metadata 37 | /** 38 | * 39 | * @type {ReplySpec} 40 | * @memberof ReplyVo 41 | */ 42 | spec: ReplySpec 43 | /** 44 | * 45 | * @type {OwnerInfo} 46 | * @memberof ReplyVo 47 | */ 48 | owner: OwnerInfo 49 | } 50 | -------------------------------------------------------------------------------- /packages/api-client/src/models/reply.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { Metadata } from './metadata' 18 | // May contain unused imports in some cases 19 | // @ts-ignore 20 | import { ReplySpec } from './reply-spec' 21 | 22 | /** 23 | * 24 | * @export 25 | * @interface Reply 26 | */ 27 | export interface Reply { 28 | /** 29 | * 30 | * @type {ReplySpec} 31 | * @memberof Reply 32 | */ 33 | spec: ReplySpec 34 | /** 35 | * 36 | * @type {string} 37 | * @memberof Reply 38 | */ 39 | apiVersion: string 40 | /** 41 | * 42 | * @type {string} 43 | * @memberof Reply 44 | */ 45 | kind: string 46 | /** 47 | * 48 | * @type {Metadata} 49 | * @memberof Reply 50 | */ 51 | metadata: Metadata 52 | } 53 | -------------------------------------------------------------------------------- /packages/api-client/src/models/reverse-proxy-rule.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { FileReverseProxyProvider } from './file-reverse-proxy-provider' 18 | 19 | /** 20 | * 21 | * @export 22 | * @interface ReverseProxyRule 23 | */ 24 | export interface ReverseProxyRule { 25 | /** 26 | * 27 | * @type {string} 28 | * @memberof ReverseProxyRule 29 | */ 30 | path?: string 31 | /** 32 | * 33 | * @type {FileReverseProxyProvider} 34 | * @memberof ReverseProxyRule 35 | */ 36 | file?: FileReverseProxyProvider 37 | } 38 | -------------------------------------------------------------------------------- /packages/api-client/src/models/reverse-proxy.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { Metadata } from './metadata' 18 | // May contain unused imports in some cases 19 | // @ts-ignore 20 | import { ReverseProxyRule } from './reverse-proxy-rule' 21 | 22 | /** 23 | * 24 | * @export 25 | * @interface ReverseProxy 26 | */ 27 | export interface ReverseProxy { 28 | /** 29 | * 30 | * @type {Array} 31 | * @memberof ReverseProxy 32 | */ 33 | rules?: Array 34 | /** 35 | * 36 | * @type {string} 37 | * @memberof ReverseProxy 38 | */ 39 | apiVersion: string 40 | /** 41 | * 42 | * @type {string} 43 | * @memberof ReverseProxy 44 | */ 45 | kind: string 46 | /** 47 | * 48 | * @type {Metadata} 49 | * @memberof ReverseProxy 50 | */ 51 | metadata: Metadata 52 | } 53 | -------------------------------------------------------------------------------- /packages/api-client/src/models/role-ref.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface RoleRef 19 | */ 20 | export interface RoleRef { 21 | /** 22 | * 23 | * @type {string} 24 | * @memberof RoleRef 25 | */ 26 | kind?: string 27 | /** 28 | * 29 | * @type {string} 30 | * @memberof RoleRef 31 | */ 32 | name?: string 33 | /** 34 | * 35 | * @type {string} 36 | * @memberof RoleRef 37 | */ 38 | apiGroup?: string 39 | } 40 | -------------------------------------------------------------------------------- /packages/api-client/src/models/role.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { Metadata } from './metadata' 18 | // May contain unused imports in some cases 19 | // @ts-ignore 20 | import { PolicyRule } from './policy-rule' 21 | 22 | /** 23 | * 24 | * @export 25 | * @interface Role 26 | */ 27 | export interface Role { 28 | /** 29 | * 30 | * @type {Array} 31 | * @memberof Role 32 | */ 33 | rules: Array 34 | /** 35 | * 36 | * @type {string} 37 | * @memberof Role 38 | */ 39 | apiVersion: string 40 | /** 41 | * 42 | * @type {string} 43 | * @memberof Role 44 | */ 45 | kind: string 46 | /** 47 | * 48 | * @type {Metadata} 49 | * @memberof Role 50 | */ 51 | metadata: Metadata 52 | } 53 | -------------------------------------------------------------------------------- /packages/api-client/src/models/search-engine-spec.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { Ref } from './ref' 18 | 19 | /** 20 | * 21 | * @export 22 | * @interface SearchEngineSpec 23 | */ 24 | export interface SearchEngineSpec { 25 | /** 26 | * 27 | * @type {string} 28 | * @memberof SearchEngineSpec 29 | */ 30 | logo?: string 31 | /** 32 | * 33 | * @type {string} 34 | * @memberof SearchEngineSpec 35 | */ 36 | website?: string 37 | /** 38 | * 39 | * @type {string} 40 | * @memberof SearchEngineSpec 41 | */ 42 | displayName: string 43 | /** 44 | * 45 | * @type {string} 46 | * @memberof SearchEngineSpec 47 | */ 48 | description?: string 49 | /** 50 | * 51 | * @type {Ref} 52 | * @memberof SearchEngineSpec 53 | */ 54 | settingRef?: Ref 55 | /** 56 | * 57 | * @type {string} 58 | * @memberof SearchEngineSpec 59 | */ 60 | postSearchImpl?: string 61 | } 62 | -------------------------------------------------------------------------------- /packages/api-client/src/models/search-engine.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { Metadata } from './metadata' 18 | // May contain unused imports in some cases 19 | // @ts-ignore 20 | import { SearchEngineSpec } from './search-engine-spec' 21 | 22 | /** 23 | * 24 | * @export 25 | * @interface SearchEngine 26 | */ 27 | export interface SearchEngine { 28 | /** 29 | * 30 | * @type {SearchEngineSpec} 31 | * @memberof SearchEngine 32 | */ 33 | spec: SearchEngineSpec 34 | /** 35 | * 36 | * @type {string} 37 | * @memberof SearchEngine 38 | */ 39 | apiVersion: string 40 | /** 41 | * 42 | * @type {string} 43 | * @memberof SearchEngine 44 | */ 45 | kind: string 46 | /** 47 | * 48 | * @type {Metadata} 49 | * @memberof SearchEngine 50 | */ 51 | metadata: Metadata 52 | } 53 | -------------------------------------------------------------------------------- /packages/api-client/src/models/setting-form.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface SettingForm 19 | */ 20 | export interface SettingForm { 21 | /** 22 | * 23 | * @type {string} 24 | * @memberof SettingForm 25 | */ 26 | group: string 27 | /** 28 | * 29 | * @type {string} 30 | * @memberof SettingForm 31 | */ 32 | label?: string 33 | /** 34 | * 35 | * @type {Array} 36 | * @memberof SettingForm 37 | */ 38 | formSchema: Array 39 | } 40 | -------------------------------------------------------------------------------- /packages/api-client/src/models/setting-spec.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { SettingForm } from './setting-form' 18 | 19 | /** 20 | * 21 | * @export 22 | * @interface SettingSpec 23 | */ 24 | export interface SettingSpec { 25 | /** 26 | * 27 | * @type {Array} 28 | * @memberof SettingSpec 29 | */ 30 | forms: Array 31 | } 32 | -------------------------------------------------------------------------------- /packages/api-client/src/models/setting.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { Metadata } from './metadata' 18 | // May contain unused imports in some cases 19 | // @ts-ignore 20 | import { SettingSpec } from './setting-spec' 21 | 22 | /** 23 | * 24 | * @export 25 | * @interface Setting 26 | */ 27 | export interface Setting { 28 | /** 29 | * 30 | * @type {SettingSpec} 31 | * @memberof Setting 32 | */ 33 | spec: SettingSpec 34 | /** 35 | * 36 | * @type {string} 37 | * @memberof Setting 38 | */ 39 | apiVersion: string 40 | /** 41 | * 42 | * @type {string} 43 | * @memberof Setting 44 | */ 45 | kind: string 46 | /** 47 | * 48 | * @type {Metadata} 49 | * @memberof Setting 50 | */ 51 | metadata: Metadata 52 | } 53 | -------------------------------------------------------------------------------- /packages/api-client/src/models/single-page-request.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { Content } from './content' 18 | // May contain unused imports in some cases 19 | // @ts-ignore 20 | import { SinglePage } from './single-page' 21 | 22 | /** 23 | * 24 | * @export 25 | * @interface SinglePageRequest 26 | */ 27 | export interface SinglePageRequest { 28 | /** 29 | * 30 | * @type {SinglePage} 31 | * @memberof SinglePageRequest 32 | */ 33 | page: SinglePage 34 | /** 35 | * 36 | * @type {Content} 37 | * @memberof SinglePageRequest 38 | */ 39 | content: Content 40 | } 41 | -------------------------------------------------------------------------------- /packages/api-client/src/models/snapshot.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { Metadata } from './metadata' 18 | // May contain unused imports in some cases 19 | // @ts-ignore 20 | import { SnapShotSpec } from './snap-shot-spec' 21 | 22 | /** 23 | * 24 | * @export 25 | * @interface Snapshot 26 | */ 27 | export interface Snapshot { 28 | /** 29 | * 30 | * @type {SnapShotSpec} 31 | * @memberof Snapshot 32 | */ 33 | spec: SnapShotSpec 34 | /** 35 | * 36 | * @type {string} 37 | * @memberof Snapshot 38 | */ 39 | apiVersion: string 40 | /** 41 | * 42 | * @type {string} 43 | * @memberof Snapshot 44 | */ 45 | kind: string 46 | /** 47 | * 48 | * @type {Metadata} 49 | * @memberof Snapshot 50 | */ 51 | metadata: Metadata 52 | } 53 | -------------------------------------------------------------------------------- /packages/api-client/src/models/stats.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface Stats 19 | */ 20 | export interface Stats { 21 | /** 22 | * 23 | * @type {number} 24 | * @memberof Stats 25 | */ 26 | visit?: number 27 | /** 28 | * 29 | * @type {number} 30 | * @memberof Stats 31 | */ 32 | upvote?: number 33 | /** 34 | * 35 | * @type {number} 36 | * @memberof Stats 37 | */ 38 | totalComment?: number 39 | /** 40 | * 41 | * @type {number} 42 | * @memberof Stats 43 | */ 44 | approvedComment?: number 45 | } 46 | -------------------------------------------------------------------------------- /packages/api-client/src/models/subject.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface Subject 19 | */ 20 | export interface Subject { 21 | /** 22 | * 23 | * @type {string} 24 | * @memberof Subject 25 | */ 26 | kind?: string 27 | /** 28 | * 29 | * @type {string} 30 | * @memberof Subject 31 | */ 32 | name?: string 33 | /** 34 | * 35 | * @type {string} 36 | * @memberof Subject 37 | */ 38 | apiGroup?: string 39 | } 40 | -------------------------------------------------------------------------------- /packages/api-client/src/models/tag-spec.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface TagSpec 19 | */ 20 | export interface TagSpec { 21 | /** 22 | * 23 | * @type {string} 24 | * @memberof TagSpec 25 | */ 26 | displayName: string 27 | /** 28 | * 29 | * @type {string} 30 | * @memberof TagSpec 31 | */ 32 | slug: string 33 | /** 34 | * 35 | * @type {string} 36 | * @memberof TagSpec 37 | */ 38 | color?: string 39 | /** 40 | * 41 | * @type {string} 42 | * @memberof TagSpec 43 | */ 44 | cover?: string 45 | } 46 | -------------------------------------------------------------------------------- /packages/api-client/src/models/tag-status.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface TagStatus 19 | */ 20 | export interface TagStatus { 21 | /** 22 | * 23 | * @type {string} 24 | * @memberof TagStatus 25 | */ 26 | permalink?: string 27 | /** 28 | * 29 | * @type {number} 30 | * @memberof TagStatus 31 | */ 32 | visiblePostCount?: number 33 | /** 34 | * 35 | * @type {number} 36 | * @memberof TagStatus 37 | */ 38 | postCount?: number 39 | } 40 | -------------------------------------------------------------------------------- /packages/api-client/src/models/tag.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { Metadata } from './metadata' 18 | // May contain unused imports in some cases 19 | // @ts-ignore 20 | import { TagSpec } from './tag-spec' 21 | // May contain unused imports in some cases 22 | // @ts-ignore 23 | import { TagStatus } from './tag-status' 24 | 25 | /** 26 | * 27 | * @export 28 | * @interface Tag 29 | */ 30 | export interface Tag { 31 | /** 32 | * 33 | * @type {TagSpec} 34 | * @memberof Tag 35 | */ 36 | spec: TagSpec 37 | /** 38 | * 39 | * @type {TagStatus} 40 | * @memberof Tag 41 | */ 42 | status?: TagStatus 43 | /** 44 | * 45 | * @type {string} 46 | * @memberof Tag 47 | */ 48 | apiVersion: string 49 | /** 50 | * 51 | * @type {string} 52 | * @memberof Tag 53 | */ 54 | kind: string 55 | /** 56 | * 57 | * @type {Metadata} 58 | * @memberof Tag 59 | */ 60 | metadata: Metadata 61 | } 62 | -------------------------------------------------------------------------------- /packages/api-client/src/models/template-descriptor.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface TemplateDescriptor 19 | */ 20 | export interface TemplateDescriptor { 21 | /** 22 | * 23 | * @type {string} 24 | * @memberof TemplateDescriptor 25 | */ 26 | name: string 27 | /** 28 | * 29 | * @type {string} 30 | * @memberof TemplateDescriptor 31 | */ 32 | description?: string 33 | /** 34 | * 35 | * @type {string} 36 | * @memberof TemplateDescriptor 37 | */ 38 | screenshot?: string 39 | /** 40 | * 41 | * @type {string} 42 | * @memberof TemplateDescriptor 43 | */ 44 | file: string 45 | } 46 | -------------------------------------------------------------------------------- /packages/api-client/src/models/theme-status.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { Condition } from './condition' 18 | 19 | /** 20 | * 21 | * @export 22 | * @interface ThemeStatus 23 | */ 24 | export interface ThemeStatus { 25 | /** 26 | * 27 | * @type {string} 28 | * @memberof ThemeStatus 29 | */ 30 | phase?: ThemeStatusPhaseEnum 31 | /** 32 | * 33 | * @type {Array} 34 | * @memberof ThemeStatus 35 | */ 36 | conditions?: Array 37 | /** 38 | * 39 | * @type {string} 40 | * @memberof ThemeStatus 41 | */ 42 | location?: string 43 | } 44 | 45 | export const ThemeStatusPhaseEnum = { 46 | Ready: 'READY', 47 | Failed: 'FAILED', 48 | Unknown: 'UNKNOWN', 49 | } as const 50 | 51 | export type ThemeStatusPhaseEnum = typeof ThemeStatusPhaseEnum[keyof typeof ThemeStatusPhaseEnum] 52 | -------------------------------------------------------------------------------- /packages/api-client/src/models/user-permission.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { Role } from './role' 18 | 19 | /** 20 | * 21 | * @export 22 | * @interface UserPermission 23 | */ 24 | export interface UserPermission { 25 | /** 26 | * 27 | * @type {Array} 28 | * @memberof UserPermission 29 | */ 30 | roles: Array 31 | /** 32 | * 33 | * @type {Array} 34 | * @memberof UserPermission 35 | */ 36 | uiPermissions: Array 37 | } 38 | -------------------------------------------------------------------------------- /packages/api-client/src/models/user-status.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | // May contain unused imports in some cases 16 | // @ts-ignore 17 | import { LoginHistory } from './login-history' 18 | 19 | /** 20 | * 21 | * @export 22 | * @interface UserStatus 23 | */ 24 | export interface UserStatus { 25 | /** 26 | * 27 | * @type {string} 28 | * @memberof UserStatus 29 | */ 30 | lastLoginAt?: string 31 | /** 32 | * 33 | * @type {string} 34 | * @memberof UserStatus 35 | */ 36 | permalink?: string 37 | /** 38 | * 39 | * @type {Array} 40 | * @memberof UserStatus 41 | */ 42 | loginHistories?: Array 43 | } 44 | -------------------------------------------------------------------------------- /packages/api-client/src/models/vote-request.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | /** 4 | * Halo Next API 5 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 6 | * 7 | * The version of the OpenAPI document: 2.0.0 8 | * 9 | * 10 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 11 | * https://openapi-generator.tech 12 | * Do not edit the class manually. 13 | */ 14 | 15 | /** 16 | * 17 | * @export 18 | * @interface VoteRequest 19 | */ 20 | export interface VoteRequest { 21 | /** 22 | * 23 | * @type {string} 24 | * @memberof VoteRequest 25 | */ 26 | group?: string 27 | /** 28 | * 29 | * @type {string} 30 | * @memberof VoteRequest 31 | */ 32 | plural?: string 33 | /** 34 | * 35 | * @type {string} 36 | * @memberof VoteRequest 37 | */ 38 | name?: string 39 | } 40 | -------------------------------------------------------------------------------- /packages/api-client/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2018", 4 | "module": "esnext", 5 | "lib": ["esnext", "dom"], 6 | "moduleResolution": "node", 7 | "esModuleInterop": true, 8 | "strict": true, 9 | "strictNullChecks": true, 10 | "resolveJsonModule": true, 11 | "skipLibCheck": true, 12 | "skipDefaultLibCheck": true 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/components/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ["../../.eslintrc.cjs"], 3 | }; 4 | -------------------------------------------------------------------------------- /packages/components/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | declare module "*.vue" { 5 | import type { DefineComponent } from "vue"; 6 | // eslint-disable-next-line 7 | const component: DefineComponent<{}, {}, any>; 8 | export default component; 9 | } 10 | -------------------------------------------------------------------------------- /packages/components/histoire.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "histoire"; 2 | import type { UserConfig } from "vite"; 3 | import { HstVue } from "@histoire/plugin-vue"; 4 | 5 | export default defineConfig({ 6 | setupFile: "./src/histoire.setup.ts", 7 | plugins: [HstVue()], 8 | vite: { 9 | plugins: [ 10 | { 11 | name: "disable-lib-plugin", 12 | config(config: UserConfig) { 13 | if (!config || !config.build || !config.build.rollupOptions) { 14 | return; 15 | } 16 | config.build.lib = false; 17 | config.build.rollupOptions.external = []; 18 | }, 19 | }, 20 | ], 21 | }, 22 | }); 23 | -------------------------------------------------------------------------------- /packages/components/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /packages/components/prettier.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: ["../../prettier.config.js"], 3 | }; 4 | -------------------------------------------------------------------------------- /packages/components/src/components.ts: -------------------------------------------------------------------------------- 1 | export * from "./components/avatar"; 2 | export * from "./components/alert"; 3 | export * from "./components/button"; 4 | export * from "./components/card"; 5 | export * from "./components/header"; 6 | export * from "./components/menu"; 7 | export * from "./components/modal"; 8 | export * from "./components/space"; 9 | export * from "./components/tabs"; 10 | export * from "./components/tag"; 11 | export * from "./components/switch"; 12 | export * from "./components/dialog"; 13 | export * from "./components/pagination"; 14 | export * from "./components/codemirror"; 15 | export * from "./components/empty"; 16 | export * from "./components/status"; 17 | export * from "./components/entity"; 18 | export * from "./components/toast"; 19 | export * from "./components/loading"; 20 | -------------------------------------------------------------------------------- /packages/components/src/components/alert/__tests__/Alert.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, it } from "vitest"; 2 | import { VAlert } from "../index"; 3 | 4 | describe("Alert", () => { 5 | it("should render", () => { 6 | expect(VAlert).toBeDefined(); 7 | }); 8 | }); 9 | -------------------------------------------------------------------------------- /packages/components/src/components/alert/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VAlert } from "./Alert.vue"; 2 | -------------------------------------------------------------------------------- /packages/components/src/components/alert/interface.ts: -------------------------------------------------------------------------------- 1 | export type Type = "default" | "success" | "info" | "warning" | "error"; 2 | -------------------------------------------------------------------------------- /packages/components/src/components/avatar/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VAvatar } from "./Avatar.vue"; 2 | -------------------------------------------------------------------------------- /packages/components/src/components/avatar/interface.ts: -------------------------------------------------------------------------------- 1 | export type Size = "lg" | "md" | "sm" | "xs"; 2 | -------------------------------------------------------------------------------- /packages/components/src/components/button/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VButton } from "./Button.vue"; 2 | -------------------------------------------------------------------------------- /packages/components/src/components/button/interface.ts: -------------------------------------------------------------------------------- 1 | export type Type = "default" | "primary" | "secondary" | "danger"; 2 | export type Size = "lg" | "md" | "sm" | "xs"; 3 | -------------------------------------------------------------------------------- /packages/components/src/components/card/__tests__/Card.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, it } from "vitest"; 2 | import { VCard } from "../index"; 3 | 4 | describe("Card", () => { 5 | it("should render", () => { 6 | expect(VCard).toBeDefined(); 7 | }); 8 | }); 9 | -------------------------------------------------------------------------------- /packages/components/src/components/card/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VCard } from "./Card.vue"; 2 | -------------------------------------------------------------------------------- /packages/components/src/components/codemirror/Codemirror.story.vue: -------------------------------------------------------------------------------- 1 | 10 | 17 | -------------------------------------------------------------------------------- /packages/components/src/components/codemirror/__tests__/Codemirror.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, it } from "vitest"; 2 | import { mount } from "@vue/test-utils"; 3 | import { VCodemirror } from "../index"; 4 | 5 | describe("Codemirror", () => { 6 | it("should render", () => { 7 | expect(mount(VCodemirror)).toBeDefined(); 8 | }); 9 | }); 10 | -------------------------------------------------------------------------------- /packages/components/src/components/codemirror/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VCodemirror } from "./Codemirror.vue"; 2 | -------------------------------------------------------------------------------- /packages/components/src/components/dialog/Dialog.story.vue: -------------------------------------------------------------------------------- 1 | 37 | 44 | -------------------------------------------------------------------------------- /packages/components/src/components/dialog/__tests__/Dialog.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, it } from "vitest"; 2 | import { mount } from "@vue/test-utils"; 3 | import { VDialog } from "../index"; 4 | 5 | describe("Dialog", () => { 6 | it("should render", () => { 7 | expect(mount(VDialog)).toBeDefined(); 8 | }); 9 | }); 10 | -------------------------------------------------------------------------------- /packages/components/src/components/dialog/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VDialog } from "./Dialog.vue"; 2 | export { Dialog } from "./dialog-manager"; 3 | -------------------------------------------------------------------------------- /packages/components/src/components/dialog/interface.ts: -------------------------------------------------------------------------------- 1 | export type Type = "success" | "info" | "warning" | "error"; 2 | export const DialogProviderProvideKey = "DIALOG_PROVIDER_PROVIDE_KEY"; 3 | import type { Type as ButtonType } from "@/components/button/interface"; 4 | 5 | export interface useDialogOptions { 6 | type?: Type; 7 | visible: boolean; 8 | title: string; 9 | description?: string; 10 | confirmType?: ButtonType; 11 | confirmText?: string; 12 | cancelText?: string; 13 | onConfirm?: () => void; 14 | onCancel?: () => void; 15 | } 16 | 17 | export interface DialogProps { 18 | type?: Type; 19 | visible?: boolean; 20 | title?: string; 21 | description?: string; 22 | confirmType?: ButtonType; 23 | confirmText?: string; 24 | cancelText?: string; 25 | onConfirm?: () => void; 26 | onCancel?: () => void; 27 | } 28 | 29 | export type useDialogUserOptions = Omit; 30 | -------------------------------------------------------------------------------- /packages/components/src/components/empty/Empty.story.vue: -------------------------------------------------------------------------------- 1 | 6 | 23 | -------------------------------------------------------------------------------- /packages/components/src/components/empty/Empty.vue: -------------------------------------------------------------------------------- 1 | 10 | 28 | 58 | -------------------------------------------------------------------------------- /packages/components/src/components/empty/__tests__/__snapshots__/Empty.spec.ts.snap: -------------------------------------------------------------------------------- 1 | // Vitest Snapshot v1 2 | 3 | exports[`Empty > should match snapshot 1`] = ` 4 | "
5 |
\\"Empty\\"
6 |
Not found
7 |
No posts found
8 |
11 |
" 12 | `; 13 | -------------------------------------------------------------------------------- /packages/components/src/components/empty/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VEmpty } from "./Empty.vue"; 2 | -------------------------------------------------------------------------------- /packages/components/src/components/entity/__tests__/Entity.spec.ts: -------------------------------------------------------------------------------- 1 | import { mount } from "@vue/test-utils"; 2 | import { describe, expect, it } from "vitest"; 3 | import { VEntity } from ".."; 4 | 5 | describe("Entity", () => { 6 | it("should render", () => { 7 | expect(mount(VEntity)).toBeDefined(); 8 | }); 9 | }); 10 | -------------------------------------------------------------------------------- /packages/components/src/components/entity/__tests__/EntityField.spec.ts: -------------------------------------------------------------------------------- 1 | import { mount } from "@vue/test-utils"; 2 | import { describe, expect, it } from "vitest"; 3 | import { VEntityField } from ".."; 4 | 5 | describe("EntityField", () => { 6 | it("should render", () => { 7 | expect(mount(VEntityField)).toBeDefined(); 8 | }); 9 | }); 10 | -------------------------------------------------------------------------------- /packages/components/src/components/entity/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VEntity } from "./Entity.vue"; 2 | export { default as VEntityField } from "./EntityField.vue"; 3 | -------------------------------------------------------------------------------- /packages/components/src/components/header/PageHeader.vue: -------------------------------------------------------------------------------- 1 | 6 | 19 | -------------------------------------------------------------------------------- /packages/components/src/components/header/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VPageHeader } from "./PageHeader.vue"; 2 | -------------------------------------------------------------------------------- /packages/components/src/components/loading/Loading.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 27 | -------------------------------------------------------------------------------- /packages/components/src/components/loading/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VLoading } from "./Loading.vue"; 2 | -------------------------------------------------------------------------------- /packages/components/src/components/menu/Menu.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 18 | -------------------------------------------------------------------------------- /packages/components/src/components/menu/MenuLabel.vue: -------------------------------------------------------------------------------- 1 | 6 | 15 | -------------------------------------------------------------------------------- /packages/components/src/components/menu/__tests__/MenuLabel.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, it } from "vitest"; 2 | import { VMenuLabel } from "../index"; 3 | import { mount } from "@vue/test-utils"; 4 | 5 | describe("MenuLabel", () => { 6 | it("should render", () => { 7 | expect(VMenuLabel).toBeDefined(); 8 | expect( 9 | mount(VMenuLabel, { slots: { default: "Hello Halo" } }).html() 10 | ).toMatchSnapshot(); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /packages/components/src/components/menu/__tests__/__snapshots__/MenuLabel.spec.ts.snap: -------------------------------------------------------------------------------- 1 | // Vitest Snapshot v1 2 | 3 | exports[`MenuLabel > should render 1`] = `"
  • Hello Halo
  • "`; 4 | -------------------------------------------------------------------------------- /packages/components/src/components/menu/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VMenu } from "./Menu.vue"; 2 | export { default as VMenuItem } from "./MenuItem.vue"; 3 | export { default as VMenuLabel } from "./MenuLabel.vue"; 4 | -------------------------------------------------------------------------------- /packages/components/src/components/modal/__tests__/Modal.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, it } from "vitest"; 2 | import { VModal } from "../index"; 3 | 4 | describe("Modal", () => { 5 | it("should render", () => { 6 | expect(VModal).toBeDefined(); 7 | }); 8 | }); 9 | -------------------------------------------------------------------------------- /packages/components/src/components/modal/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VModal } from "./Modal.vue"; 2 | -------------------------------------------------------------------------------- /packages/components/src/components/pagination/Pagination.story.vue: -------------------------------------------------------------------------------- 1 | 12 | 23 | -------------------------------------------------------------------------------- /packages/components/src/components/pagination/__tests__/Pagination.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, it } from "vitest"; 2 | import { mount } from "@vue/test-utils"; 3 | import { VPagination } from "../index"; 4 | 5 | describe("Pagination", () => { 6 | it("should be true", () => { 7 | expect(mount(VPagination)).toBeDefined(); 8 | }); 9 | }); 10 | -------------------------------------------------------------------------------- /packages/components/src/components/pagination/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VPagination } from "./Pagination.vue"; 2 | -------------------------------------------------------------------------------- /packages/components/src/components/space/Space.story.vue: -------------------------------------------------------------------------------- 1 | 16 | 28 | -------------------------------------------------------------------------------- /packages/components/src/components/space/Space.vue: -------------------------------------------------------------------------------- 1 | 24 | 33 | 63 | -------------------------------------------------------------------------------- /packages/components/src/components/space/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VSpace } from "./Space.vue"; 2 | -------------------------------------------------------------------------------- /packages/components/src/components/space/interface.ts: -------------------------------------------------------------------------------- 1 | export type Spacing = "xs" | "sm" | "md" | "lg"; 2 | export type Direction = "row" | "column"; 3 | export type Align = "start" | "end" | "center" | "stretch"; 4 | export const SpacingSize: Record = { 5 | xs: 10, 6 | sm: 12, 7 | md: 16, 8 | lg: 20, 9 | }; 10 | -------------------------------------------------------------------------------- /packages/components/src/components/status/StatusDot.story.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 36 | -------------------------------------------------------------------------------- /packages/components/src/components/status/__tests__/StatusDot.spec.ts: -------------------------------------------------------------------------------- 1 | import { mount } from "@vue/test-utils"; 2 | import { describe, expect, it } from "vitest"; 3 | import { VStatusDot } from "../index"; 4 | 5 | describe("StatusDot", () => { 6 | it("should render", () => { 7 | expect(mount(VStatusDot)).toBeDefined(); 8 | }); 9 | 10 | it("should match snapshot", () => { 11 | const wrapper = mount(VStatusDot); 12 | expect(wrapper.html()).toMatchSnapshot(); 13 | }); 14 | 15 | it("should work with state prop", () => { 16 | ["default", "success", "warning", "error"].forEach((state) => { 17 | const wrapper = mount(VStatusDot, { props: { state } }); 18 | expect(wrapper.classes()).toContain(`status-dot-${state}`); 19 | }); 20 | }); 21 | 22 | it("should work with animate prop", () => { 23 | const wrapper = mount(VStatusDot, { props: { animate: true } }); 24 | expect(wrapper.classes()).toContain("status-dot-animate"); 25 | }); 26 | 27 | it("should work with text prop", () => { 28 | const wrapper = mount(VStatusDot, { props: { text: "text" } }); 29 | expect(wrapper.find(".status-dot-text").text()).toBe("text"); 30 | }); 31 | }); 32 | -------------------------------------------------------------------------------- /packages/components/src/components/status/__tests__/__snapshots__/StatusDot.spec.ts.snap: -------------------------------------------------------------------------------- 1 | // Vitest Snapshot v1 2 | 3 | exports[`StatusDot > should match snapshot 1`] = ` 4 | "
    5 |
    6 | 7 |
    " 8 | `; 9 | -------------------------------------------------------------------------------- /packages/components/src/components/status/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VStatusDot } from "./StatusDot.vue"; 2 | -------------------------------------------------------------------------------- /packages/components/src/components/status/interface.ts: -------------------------------------------------------------------------------- 1 | export type State = "default" | "success" | "warning" | "error"; 2 | -------------------------------------------------------------------------------- /packages/components/src/components/switch/Switch.story.vue: -------------------------------------------------------------------------------- 1 | 10 | 19 | -------------------------------------------------------------------------------- /packages/components/src/components/switch/__tests__/Switch.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, it } from "vitest"; 2 | import { VSwitch } from "../index"; 3 | import { mount } from "@vue/test-utils"; 4 | 5 | describe("Switch", () => { 6 | it("should render", () => { 7 | expect(mount(VSwitch)).toBeDefined(); 8 | }); 9 | }); 10 | -------------------------------------------------------------------------------- /packages/components/src/components/switch/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VSwitch } from "./Switch.vue"; 2 | -------------------------------------------------------------------------------- /packages/components/src/components/tabs/TabItem.vue: -------------------------------------------------------------------------------- 1 | 16 | 21 | -------------------------------------------------------------------------------- /packages/components/src/components/tabs/Tabbar.story.vue: -------------------------------------------------------------------------------- 1 | 18 | 41 | -------------------------------------------------------------------------------- /packages/components/src/components/tabs/__tests__/TabItem.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, it } from "vitest"; 2 | import { VTabItem } from "../index"; 3 | 4 | describe("TabItem", () => { 5 | it("should render", () => { 6 | expect(VTabItem).toBeDefined(); 7 | }); 8 | }); 9 | -------------------------------------------------------------------------------- /packages/components/src/components/tabs/__tests__/Tabbar.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, it } from "vitest"; 2 | import { VTabbar } from "../index"; 3 | 4 | describe("Tabbar", () => { 5 | it("should render", () => { 6 | expect(VTabbar).toBeDefined(); 7 | }); 8 | }); 9 | -------------------------------------------------------------------------------- /packages/components/src/components/tabs/__tests__/Tabs.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, it } from "vitest"; 2 | import { VTabs } from "../index"; 3 | 4 | describe("Tabs", () => { 5 | it("should render", () => { 6 | expect(VTabs).toBeDefined(); 7 | }); 8 | }); 9 | -------------------------------------------------------------------------------- /packages/components/src/components/tabs/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VTabs } from "./Tabs.vue"; 2 | export { default as VTabItem } from "./TabItem.vue"; 3 | export { default as VTabbar } from "./Tabbar.vue"; 4 | -------------------------------------------------------------------------------- /packages/components/src/components/tabs/interface.ts: -------------------------------------------------------------------------------- 1 | export type Type = "default" | "pills" | "outline"; 2 | export type Direction = "row" | "column"; 3 | -------------------------------------------------------------------------------- /packages/components/src/components/tag/__tests__/Tag.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, it } from "vitest"; 2 | import { VTag } from "../index"; 3 | 4 | describe("Tag", () => { 5 | it("should render", () => { 6 | expect(VTag).toBeDefined(); 7 | }); 8 | }); 9 | -------------------------------------------------------------------------------- /packages/components/src/components/tag/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VTag } from "./Tag.vue"; 2 | -------------------------------------------------------------------------------- /packages/components/src/components/tag/interface.ts: -------------------------------------------------------------------------------- 1 | export type Theme = "default" | "primary" | "secondary" | "danger"; 2 | -------------------------------------------------------------------------------- /packages/components/src/components/toast/Toast.story.vue: -------------------------------------------------------------------------------- 1 | 11 | 40 | -------------------------------------------------------------------------------- /packages/components/src/components/toast/index.ts: -------------------------------------------------------------------------------- 1 | export { Toast } from "./toast-manager"; 2 | -------------------------------------------------------------------------------- /packages/components/src/components/toast/interface.ts: -------------------------------------------------------------------------------- 1 | export type Type = "success" | "info" | "warning" | "error"; 2 | 3 | export interface ToastProps { 4 | type?: Type; 5 | content?: string; 6 | duration?: number; 7 | closable?: boolean; 8 | frozenOnHover?: boolean; 9 | count?: 0; 10 | onClose?: () => void; 11 | } 12 | -------------------------------------------------------------------------------- /packages/components/src/histoire.setup.ts: -------------------------------------------------------------------------------- 1 | import "@/styles/tailwind.css"; 2 | import { defineSetupVue3 } from "@histoire/plugin-vue"; 3 | 4 | // eslint-disable-next-line @typescript-eslint/no-empty-function 5 | export default defineSetupVue3(() => {}); 6 | -------------------------------------------------------------------------------- /packages/components/src/index.ts: -------------------------------------------------------------------------------- 1 | import "./styles/tailwind.css"; 2 | 3 | export * from "./components"; 4 | export * from "./icons/icons"; 5 | -------------------------------------------------------------------------------- /packages/components/src/styles/tailwind.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /packages/components/tailwind.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | ...require("../../tailwind.config"), 3 | }; 4 | -------------------------------------------------------------------------------- /packages/components/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@vue/tsconfig/tsconfig.web.json", 3 | "include": ["env.d.ts", "src/**/*", "src/**/*.vue"], 4 | "exclude": ["src/**/__tests__/*"], 5 | "compilerOptions": { 6 | "composite": true, 7 | "baseUrl": ".", 8 | "paths": { 9 | "@/*": ["./src/*"] 10 | }, 11 | "types": ["unplugin-icons/types/vue"] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/components/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { 5 | "path": "./tsconfig.vite-config.json" 6 | }, 7 | { 8 | "path": "./tsconfig.app.json" 9 | }, 10 | { 11 | "path": "./tsconfig.vitest.json" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /packages/components/tsconfig.vite-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@vue/tsconfig/tsconfig.node.json", 3 | "include": ["vite.config.*"], 4 | "compilerOptions": { 5 | "composite": true, 6 | "types": ["node", "vitest"] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/components/tsconfig.vitest.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.app.json", 3 | "exclude": [], 4 | "compilerOptions": { 5 | "composite": true, 6 | "lib": [], 7 | "types": ["node", "jsdom"] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/shared/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ["../../.eslintrc.cjs"], 3 | }; 4 | -------------------------------------------------------------------------------- /packages/shared/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | export {}; 4 | 5 | import type { CoreMenuGroupId } from "./src/types/menus"; 6 | 7 | 8 | declare module "*.vue" { 9 | import type { DefineComponent } from "vue"; 10 | // eslint-disable-next-line 11 | const component: DefineComponent<{}, {}, any>; 12 | export default component; 13 | } 14 | 15 | declare module "vue-router" { 16 | interface RouteMeta { 17 | title?: string; 18 | searchable?: boolean; 19 | permissions?: string[]; 20 | core?: boolean; 21 | menu?: { 22 | name: string; 23 | group?: CoreMenuGroupId; 24 | icon?: Component; 25 | priority: number; 26 | mobile?: boolean; 27 | }; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /packages/shared/prettier.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: ["../../prettier.config.js"], 3 | }; 4 | -------------------------------------------------------------------------------- /packages/shared/src/components/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halo-dev/console/d6616cf7031f6113cfb5c317dc88abd9e674c44e/packages/shared/src/components/.gitkeep -------------------------------------------------------------------------------- /packages/shared/src/core/plugins.ts: -------------------------------------------------------------------------------- 1 | import type { PluginModule } from "../types/plugin"; 2 | 3 | export function definePlugin(plugin: PluginModule): PluginModule { 4 | return plugin; 5 | } 6 | -------------------------------------------------------------------------------- /packages/shared/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./types/plugin"; 2 | export * from "./types/menus"; 3 | export * from "./core/plugins"; 4 | export * from "./states/pages"; 5 | export * from "./states/attachment-selector"; 6 | export * from "./states/editor"; 7 | -------------------------------------------------------------------------------- /packages/shared/src/states/attachment-selector.ts: -------------------------------------------------------------------------------- 1 | import type { Attachment } from "@halo-dev/api-client"; 2 | import type { Component } from "vue"; 3 | 4 | export type AttachmentLike = 5 | | Attachment 6 | | string 7 | | { 8 | url: string; 9 | type: string; 10 | }; 11 | 12 | export interface AttachmentSelectProvider { 13 | id: string; 14 | label: string; 15 | component: Component | string; 16 | callback?: (attachments: AttachmentLike[]) => void; 17 | } 18 | -------------------------------------------------------------------------------- /packages/shared/src/states/editor.ts: -------------------------------------------------------------------------------- 1 | import type { Component } from "vue"; 2 | 3 | export interface EditorProvider { 4 | name: string; 5 | displayName: string; 6 | component: Component; 7 | rawType: string; 8 | } 9 | -------------------------------------------------------------------------------- /packages/shared/src/states/pages.ts: -------------------------------------------------------------------------------- 1 | // @deprecated 2 | export interface FunctionalPage { 3 | name: string; 4 | path: string; 5 | url?: string; 6 | permissions?: Array; 7 | } 8 | -------------------------------------------------------------------------------- /packages/shared/src/types/menus.ts: -------------------------------------------------------------------------------- 1 | import type { Component } from "vue"; 2 | 3 | export type CoreMenuGroupId = 4 | | "dashboard" 5 | | "content" 6 | | "interface" 7 | | "system" 8 | | "tool"; 9 | 10 | export interface MenuGroupType { 11 | id: CoreMenuGroupId | string; 12 | name?: string; 13 | priority: number; 14 | items?: MenuItemType[]; 15 | } 16 | 17 | export interface MenuItemType { 18 | name: string; 19 | path: string; 20 | mobile?: boolean; 21 | icon?: Component; 22 | meta?: Record; 23 | children?: MenuItemType[]; 24 | } 25 | -------------------------------------------------------------------------------- /packages/shared/src/types/plugin.ts: -------------------------------------------------------------------------------- 1 | import type { Component } from "vue"; 2 | import type { RouteRecordRaw, RouteRecordName } from "vue-router"; 3 | import type { FunctionalPage } from "../states/pages"; 4 | import type { AttachmentSelectProvider } from "../states/attachment-selector"; 5 | import type { EditorProvider } from ".."; 6 | 7 | export interface RouteRecordAppend { 8 | parentName: RouteRecordName; 9 | route: RouteRecordRaw; 10 | } 11 | 12 | export interface ExtensionPoint { 13 | // @deprecated 14 | "page:functional:create"?: () => FunctionalPage[] | Promise; 15 | 16 | "attachment:selector:create"?: () => 17 | | AttachmentSelectProvider[] 18 | | Promise; 19 | 20 | "editor:create"?: () => EditorProvider[] | Promise; 21 | } 22 | 23 | export interface PluginModule { 24 | /** 25 | * These components will be registered when plugin is activated. 26 | */ 27 | components?: Record; 28 | 29 | /** 30 | * Activate hook will be called when plugin is activated. 31 | */ 32 | activated?: () => void; 33 | 34 | /** 35 | * Deactivate hook will be called when plugin is deactivated. 36 | */ 37 | deactivated?: () => void; 38 | 39 | routes?: RouteRecordRaw[] | RouteRecordAppend[]; 40 | 41 | extensionPoints?: ExtensionPoint; 42 | } 43 | -------------------------------------------------------------------------------- /packages/shared/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@vue/tsconfig/tsconfig.web.json", 3 | "include": ["env.d.ts", "src/**/*", "src/**/*.vue"], 4 | "exclude": ["src/**/__tests__/*"], 5 | "compilerOptions": { 6 | "composite": true, 7 | "baseUrl": ".", 8 | "paths": { 9 | "@/*": ["./src/*"] 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/shared/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { 5 | "path": "./tsconfig.vite-config.json" 6 | }, 7 | { 8 | "path": "./tsconfig.app.json" 9 | }, 10 | { 11 | "path": "./tsconfig.vitest.json" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /packages/shared/tsconfig.vite-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@vue/tsconfig/tsconfig.node.json", 3 | "include": ["vite.config.*"], 4 | "compilerOptions": { 5 | "composite": true, 6 | "types": ["node", "vitest"] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/shared/tsconfig.vitest.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.app.json", 3 | "exclude": [], 4 | "compilerOptions": { 5 | "composite": true, 6 | "lib": [], 7 | "types": ["node", "jsdom"] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/shared/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { fileURLToPath, URL } from "url"; 2 | 3 | import { defineConfig } from "vite"; 4 | import Vue from "@vitejs/plugin-vue"; 5 | import VueJsx from "@vitejs/plugin-vue-jsx"; 6 | import path from "path"; 7 | import Dts from "vite-plugin-dts"; 8 | 9 | export default defineConfig({ 10 | plugins: [ 11 | Vue(), 12 | VueJsx(), 13 | Dts({ 14 | entryRoot: "./src", 15 | outputDir: "./dist", 16 | insertTypesEntry: true, 17 | }), 18 | ], 19 | resolve: { 20 | alias: { 21 | "@": fileURLToPath(new URL("./src", import.meta.url)), 22 | }, 23 | }, 24 | build: { 25 | outDir: path.resolve(__dirname, "dist"), 26 | lib: { 27 | entry: path.resolve(__dirname, "src/index.ts"), 28 | name: "HaloConsoleShared", 29 | formats: ["es", "iife"], 30 | fileName: (format) => `halo-console-shared.${format}.js`, 31 | }, 32 | rollupOptions: { 33 | external: ["vue", "vue-router"], 34 | output: { 35 | globals: { 36 | vue: "Vue", 37 | "vue-router": "VueRouter", 38 | }, 39 | exports: "named", 40 | generatedCode: "es5", 41 | }, 42 | }, 43 | sourcemap: true, 44 | }, 45 | }); 46 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - 'packages/**' 3 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /prettier.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [require("prettier-plugin-tailwindcss")], 3 | }; 4 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halo-dev/console/d6616cf7031f6113cfb5c317dc88abd9e674c44e/public/favicon.ico -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halo-dev/console/d6616cf7031f6113cfb5c317dc88abd9e674c44e/src/assets/logo.png -------------------------------------------------------------------------------- /src/components/button/SubmitButton.vue: -------------------------------------------------------------------------------- 1 | 35 | 36 | 41 | -------------------------------------------------------------------------------- /src/components/filter/FilterCleanButton.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 16 | -------------------------------------------------------------------------------- /src/components/filter/FilterTag.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 26 | -------------------------------------------------------------------------------- /src/components/image/LazyImage.vue: -------------------------------------------------------------------------------- 1 | 40 | 49 | -------------------------------------------------------------------------------- /src/components/login/LoginModal.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 30 | -------------------------------------------------------------------------------- /src/components/preview/UrlPreviewModal.vue: -------------------------------------------------------------------------------- 1 | 29 | 55 | -------------------------------------------------------------------------------- /src/composables/use-slugify.ts: -------------------------------------------------------------------------------- 1 | import { slugify } from "transliteration"; 2 | import { watch, type Ref } from "vue"; 3 | export default function useSlugify( 4 | source: Ref, 5 | target: Ref, 6 | auto: Ref 7 | ) { 8 | watch( 9 | () => source.value, 10 | () => { 11 | if (auto.value) { 12 | handleGenerateSlug(); 13 | } 14 | } 15 | ); 16 | 17 | const handleGenerateSlug = () => { 18 | if (!source.value) { 19 | return; 20 | } 21 | target.value = slugify(source.value, { 22 | trim: true, 23 | }); 24 | }; 25 | 26 | return { 27 | handleGenerateSlug, 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /src/constants/annotations.ts: -------------------------------------------------------------------------------- 1 | // plugin 2 | export enum pluginAnnotations { 3 | DISPLAY_NAME = "plugin.halo.run/display-name", 4 | } 5 | 6 | // rbac 7 | export enum rbacAnnotations { 8 | MODULE = "rbac.authorization.halo.run/module", 9 | ROLE_NAMES = "rbac.authorization.halo.run/role-names", 10 | DISPLAY_NAME = "rbac.authorization.halo.run/display-name", 11 | DEPENDENCIES = "rbac.authorization.halo.run/dependencies", 12 | } 13 | -------------------------------------------------------------------------------- /src/constants/constants.ts: -------------------------------------------------------------------------------- 1 | export const SUPER_ROLE_NAME = "super-role"; 2 | -------------------------------------------------------------------------------- /src/constants/labels.ts: -------------------------------------------------------------------------------- 1 | // plugin 2 | export enum pluginLabels { 3 | NAME = "plugin.halo.run/plugin-name", 4 | } 5 | 6 | // role 7 | export enum roleLabels { 8 | TEMPLATE = "halo.run/role-template", 9 | SYSTEM_RESERVED = "rbac.authorization.halo.run/system-reserved", 10 | } 11 | 12 | // post 13 | export enum postLabels { 14 | DELETED = "content.halo.run/deleted", 15 | PUBLISHED = "content.halo.run/published", 16 | OWNER = "content.halo.run/owner", 17 | VISIBLE = "content.halo.run/visible", 18 | PHASE = "content.halo.run/phase", 19 | } 20 | 21 | // singlePage 22 | export enum singlePageLabels { 23 | DELETED = "content.halo.run/deleted", 24 | PUBLISHED = "content.halo.run/published", 25 | OWNER = "content.halo.run/owner", 26 | VISIBLE = "content.halo.run/visible", 27 | PHASE = "content.halo.run/phase", 28 | } 29 | -------------------------------------------------------------------------------- /src/formkit/inputs/attachment/index.ts: -------------------------------------------------------------------------------- 1 | import { initialValue } from "@formkit/inputs"; 2 | import { createInput } from "@formkit/vue"; 3 | import AttachmentInput from "./AttachmentInput.vue"; 4 | 5 | export const attachment = createInput(AttachmentInput, { 6 | type: "input", 7 | props: [], 8 | forceTypeProp: "text", 9 | features: [initialValue], 10 | }); 11 | -------------------------------------------------------------------------------- /src/formkit/inputs/category-checkbox.ts: -------------------------------------------------------------------------------- 1 | import { apiClient } from "@/utils/api-client"; 2 | import type { FormKitNode, FormKitTypeDefinition } from "@formkit/core"; 3 | import { checkbox, checkboxes, defaultIcon } from "@formkit/inputs"; 4 | 5 | function optionsHandler(node: FormKitNode) { 6 | node.on("created", async () => { 7 | const { data } = 8 | await apiClient.extension.category.listcontentHaloRunV1alpha1Category(); 9 | 10 | node.props.options = data.items.map((category) => { 11 | return { 12 | value: category.metadata.name, 13 | label: category.spec.displayName, 14 | }; 15 | }); 16 | }); 17 | } 18 | 19 | export const categoryCheckbox: FormKitTypeDefinition = { 20 | ...checkbox, 21 | props: ["onValue", "offValue"], 22 | forceTypeProp: "checkbox", 23 | features: [ 24 | optionsHandler, 25 | checkboxes, 26 | defaultIcon("decorator", "checkboxDecorator"), 27 | ], 28 | }; 29 | -------------------------------------------------------------------------------- /src/formkit/inputs/category-select/index.ts: -------------------------------------------------------------------------------- 1 | import type { FormKitTypeDefinition } from "@formkit/core"; 2 | import { 3 | help, 4 | icon, 5 | inner, 6 | label, 7 | message, 8 | messages, 9 | outer, 10 | prefix, 11 | suffix, 12 | wrapper, 13 | } from "@formkit/inputs"; 14 | import CategorySelect from "./CategorySelect.vue"; 15 | import { CategorySelectSection } from "./sections"; 16 | 17 | export const categorySelect: FormKitTypeDefinition = { 18 | schema: outer( 19 | wrapper( 20 | label("$label"), 21 | inner( 22 | icon("prefix"), 23 | prefix(), 24 | CategorySelectSection(), 25 | suffix(), 26 | icon("suffix") 27 | ) 28 | ), 29 | help("$help"), 30 | messages(message("$message.value")) 31 | ), 32 | type: "input", 33 | props: ["multiple"], 34 | library: { 35 | CategorySelect: CategorySelect, 36 | }, 37 | }; 38 | -------------------------------------------------------------------------------- /src/formkit/inputs/category-select/sections/index.ts: -------------------------------------------------------------------------------- 1 | import { createSection } from "@formkit/inputs"; 2 | 3 | export const CategorySelectSection = createSection( 4 | "CategorySelectSection", 5 | () => ({ 6 | $cmp: "CategorySelect", 7 | props: { 8 | context: "$node.context", 9 | }, 10 | }) 11 | ); 12 | -------------------------------------------------------------------------------- /src/formkit/inputs/code/CodeInput.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 31 | -------------------------------------------------------------------------------- /src/formkit/inputs/code/index.ts: -------------------------------------------------------------------------------- 1 | import { createInput } from "@formkit/vue"; 2 | import CodeInput from "./CodeInput.vue"; 3 | 4 | export const code = createInput(CodeInput, { 5 | type: "input", 6 | props: ["height", "language"], 7 | forceTypeProp: "textarea", 8 | }); 9 | -------------------------------------------------------------------------------- /src/formkit/inputs/form.ts: -------------------------------------------------------------------------------- 1 | import type { FormKitTypeDefinition } from "@formkit/core"; 2 | import { 3 | disablesChildren, 4 | formInput, 5 | forms, 6 | message, 7 | messages, 8 | } from "@formkit/inputs"; 9 | 10 | /** 11 | * Input definition for a form. 12 | * @public 13 | */ 14 | export const form: FormKitTypeDefinition = { 15 | /** 16 | * The actual schema of the input, or a function that returns the schema. 17 | */ 18 | schema: formInput("$slots.default", messages(message("$message.value"))), 19 | /** 20 | * The type of node, can be a list, group, or input. 21 | */ 22 | type: "group", 23 | /** 24 | * An array of extra props to accept for this input. 25 | */ 26 | props: [ 27 | "actions", 28 | "submit", 29 | "submitLabel", 30 | "submitAttrs", 31 | "submitBehavior", 32 | "incompleteMessage", 33 | ], 34 | forceTypeProp: "form", 35 | /** 36 | * Additional features that should be added to your input 37 | */ 38 | features: [forms, disablesChildren], 39 | }; 40 | -------------------------------------------------------------------------------- /src/formkit/inputs/menu-checkbox.ts: -------------------------------------------------------------------------------- 1 | import { apiClient } from "@/utils/api-client"; 2 | import type { FormKitNode, FormKitTypeDefinition } from "@formkit/core"; 3 | import { checkbox, checkboxes, defaultIcon } from "@formkit/inputs"; 4 | 5 | function optionsHandler(node: FormKitNode) { 6 | node.on("created", async () => { 7 | const { data } = await apiClient.extension.menu.listv1alpha1Menu(); 8 | 9 | node.props.options = data.items.map((menu) => { 10 | return { 11 | value: menu.metadata.name, 12 | label: menu.spec.displayName, 13 | }; 14 | }); 15 | }); 16 | } 17 | 18 | export const menuCheckbox: FormKitTypeDefinition = { 19 | ...checkbox, 20 | props: ["onValue", "offValue"], 21 | forceTypeProp: "checkbox", 22 | features: [ 23 | optionsHandler, 24 | checkboxes, 25 | defaultIcon("decorator", "checkboxDecorator"), 26 | ], 27 | }; 28 | -------------------------------------------------------------------------------- /src/formkit/inputs/menu-item-select.ts: -------------------------------------------------------------------------------- 1 | import { apiClient } from "@/utils/api-client"; 2 | import type { FormKitNode, FormKitTypeDefinition } from "@formkit/core"; 3 | import { select, selects, defaultIcon } from "@formkit/inputs"; 4 | 5 | function optionsHandler(node: FormKitNode) { 6 | node.on("created", async () => { 7 | const { data } = await apiClient.extension.menuItem.listv1alpha1MenuItem({ 8 | fieldSelector: [`name=(${node.props.menuItems.join(",")})`], 9 | }); 10 | 11 | node.props.options = data.items.map((menuItem) => { 12 | return { 13 | value: menuItem.metadata.name, 14 | label: menuItem.status?.displayName, 15 | }; 16 | }); 17 | }); 18 | } 19 | 20 | export const menuItemSelect: FormKitTypeDefinition = { 21 | ...select, 22 | props: ["placeholder", "menuItems"], 23 | forceTypeProp: "select", 24 | features: [optionsHandler, selects, defaultIcon("select", "select")], 25 | }; 26 | -------------------------------------------------------------------------------- /src/formkit/inputs/menu-radio.ts: -------------------------------------------------------------------------------- 1 | import { apiClient } from "@/utils/api-client"; 2 | import type { FormKitNode, FormKitTypeDefinition } from "@formkit/core"; 3 | import { radio, radios, defaultIcon } from "@formkit/inputs"; 4 | 5 | function optionsHandler(node: FormKitNode) { 6 | node.on("created", async () => { 7 | const { data } = await apiClient.extension.menu.listv1alpha1Menu(); 8 | 9 | node.props.options = data.items.map((menu) => { 10 | return { 11 | value: menu.metadata.name, 12 | label: menu.spec.displayName, 13 | }; 14 | }); 15 | }); 16 | } 17 | 18 | export const menuRadio: FormKitTypeDefinition = { 19 | ...radio, 20 | props: ["onValue", "offValue"], 21 | forceTypeProp: "radio", 22 | features: [ 23 | optionsHandler, 24 | radios, 25 | defaultIcon("decorator", "radioDecorator"), 26 | ], 27 | }; 28 | -------------------------------------------------------------------------------- /src/formkit/inputs/post-select.ts: -------------------------------------------------------------------------------- 1 | import { postLabels } from "@/constants/labels"; 2 | import { apiClient } from "@/utils/api-client"; 3 | import type { FormKitNode, FormKitTypeDefinition } from "@formkit/core"; 4 | import { select, selects, defaultIcon } from "@formkit/inputs"; 5 | 6 | function optionsHandler(node: FormKitNode) { 7 | node.on("created", async () => { 8 | const { data } = await apiClient.post.listPosts({ 9 | labelSelector: [ 10 | `${postLabels.DELETED}=false`, 11 | `${postLabels.PUBLISHED}=true`, 12 | ], 13 | }); 14 | 15 | node.props.options = data.items.map((post) => { 16 | return { 17 | value: post.post.metadata.name, 18 | label: post.post.spec.title, 19 | }; 20 | }); 21 | }); 22 | } 23 | 24 | export const postSelect: FormKitTypeDefinition = { 25 | ...select, 26 | props: ["placeholder"], 27 | forceTypeProp: "select", 28 | features: [optionsHandler, selects, defaultIcon("select", "select")], 29 | }; 30 | -------------------------------------------------------------------------------- /src/formkit/inputs/repeater/index.ts: -------------------------------------------------------------------------------- 1 | import type { FormKitTypeDefinition } from "@formkit/core"; 2 | import { 3 | fieldset, 4 | help, 5 | inner, 6 | legend, 7 | message, 8 | messages, 9 | outer, 10 | prefix, 11 | suffix, 12 | } from "@formkit/inputs"; 13 | import { repeaterItems } from "./sections"; 14 | import Repeater from "./Repeater.vue"; 15 | 16 | export const repeater: FormKitTypeDefinition = { 17 | schema: outer( 18 | fieldset( 19 | legend("$label"), 20 | help("$help"), 21 | inner(prefix(), repeaterItems("$slots.default"), suffix()) 22 | ), 23 | messages(message("$message.value")) 24 | ), 25 | type: "list", 26 | library: { 27 | Repeater: Repeater, 28 | }, 29 | }; 30 | -------------------------------------------------------------------------------- /src/formkit/inputs/repeater/sections/index.ts: -------------------------------------------------------------------------------- 1 | import { createSection } from "@formkit/inputs"; 2 | 3 | export const repeaterItems = createSection("repeaterItems", () => ({ 4 | $cmp: "Repeater", 5 | props: { 6 | context: "$node.context", 7 | }, 8 | })); 9 | -------------------------------------------------------------------------------- /src/formkit/inputs/singlePage-select.ts: -------------------------------------------------------------------------------- 1 | import { singlePageLabels } from "@/constants/labels"; 2 | import { apiClient } from "@/utils/api-client"; 3 | import type { FormKitNode, FormKitTypeDefinition } from "@formkit/core"; 4 | import { select, selects, defaultIcon } from "@formkit/inputs"; 5 | 6 | function optionsHandler(node: FormKitNode) { 7 | node.on("created", async () => { 8 | const { data } = await apiClient.singlePage.listSinglePages({ 9 | labelSelector: [ 10 | `${singlePageLabels.DELETED}=false`, 11 | `${singlePageLabels.PUBLISHED}=true`, 12 | ], 13 | }); 14 | 15 | node.props.options = data.items.map((singlePage) => { 16 | return { 17 | value: singlePage.page.metadata.name, 18 | label: singlePage.page.spec.title, 19 | }; 20 | }); 21 | }); 22 | } 23 | 24 | export const singlePageSelect: FormKitTypeDefinition = { 25 | ...select, 26 | props: ["placeholder"], 27 | forceTypeProp: "select", 28 | features: [optionsHandler, selects, defaultIcon("select", "select")], 29 | }; 30 | -------------------------------------------------------------------------------- /src/formkit/inputs/tag-checkbox.ts: -------------------------------------------------------------------------------- 1 | import { apiClient } from "@/utils/api-client"; 2 | import type { FormKitNode, FormKitTypeDefinition } from "@formkit/core"; 3 | import { checkbox, checkboxes, defaultIcon } from "@formkit/inputs"; 4 | 5 | function optionsHandler(node: FormKitNode) { 6 | node.on("created", async () => { 7 | const { data } = 8 | await apiClient.extension.tag.listcontentHaloRunV1alpha1Tag(); 9 | 10 | node.props.options = data.items.map((tag) => { 11 | return { 12 | value: tag.metadata.name, 13 | label: tag.spec.displayName, 14 | }; 15 | }); 16 | }); 17 | } 18 | 19 | export const tagCheckbox: FormKitTypeDefinition = { 20 | ...checkbox, 21 | props: ["onValue", "offValue"], 22 | forceTypeProp: "checkbox", 23 | features: [ 24 | optionsHandler, 25 | checkboxes, 26 | defaultIcon("decorator", "checkboxDecorator"), 27 | ], 28 | }; 29 | -------------------------------------------------------------------------------- /src/formkit/inputs/tag-select/index.ts: -------------------------------------------------------------------------------- 1 | import type { FormKitTypeDefinition } from "@formkit/core"; 2 | import { 3 | help, 4 | icon, 5 | inner, 6 | label, 7 | message, 8 | messages, 9 | outer, 10 | prefix, 11 | suffix, 12 | wrapper, 13 | } from "@formkit/inputs"; 14 | import TagSelect from "./TagSelect.vue"; 15 | import { TagSelectSection } from "./sections"; 16 | 17 | export const tagSelect: FormKitTypeDefinition = { 18 | schema: outer( 19 | wrapper( 20 | label("$label"), 21 | inner( 22 | icon("prefix"), 23 | prefix(), 24 | TagSelectSection(), 25 | suffix(), 26 | icon("suffix") 27 | ) 28 | ), 29 | help("$help"), 30 | messages(message("$message.value")) 31 | ), 32 | type: "input", 33 | props: ["multiple"], 34 | library: { 35 | TagSelect: TagSelect, 36 | }, 37 | }; 38 | -------------------------------------------------------------------------------- /src/formkit/inputs/tag-select/sections/index.ts: -------------------------------------------------------------------------------- 1 | import { createSection } from "@formkit/inputs"; 2 | 3 | export const TagSelectSection = createSection("TagSelectSection", () => ({ 4 | $cmp: "TagSelect", 5 | props: { 6 | context: "$node.context", 7 | }, 8 | })); 9 | -------------------------------------------------------------------------------- /src/formkit/plugins/radio-alt.ts: -------------------------------------------------------------------------------- 1 | import type { FormKitNode } from "@formkit/core"; 2 | 3 | let i = 0; 4 | 5 | export default function radioAlt(node: FormKitNode) { 6 | if (node.props.type === "radio") { 7 | node.props.altName = `radio_${node.name}_${++i}`; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/formkit/utils/focus.ts: -------------------------------------------------------------------------------- 1 | export function setFocus(id: string) { 2 | const inputElement = document.getElementById(id); 3 | if ( 4 | inputElement instanceof HTMLInputElement || 5 | inputElement instanceof HTMLTextAreaElement 6 | ) { 7 | const timer = setTimeout(() => { 8 | const end = inputElement.value.length; 9 | inputElement.setSelectionRange(end, end); 10 | inputElement?.focus(); 11 | clearTimeout(timer); 12 | }, 0); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/layouts/BlankLayout.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /src/locales/index.ts: -------------------------------------------------------------------------------- 1 | import { createI18n } from "vue-i18n"; 2 | import zh from "./lang/zh"; 3 | 4 | const messages = { 5 | zh, 6 | }; 7 | 8 | const i18n = createI18n({ 9 | legacy: false, 10 | locale: "zh", 11 | messages, 12 | }); 13 | 14 | export default i18n; 15 | -------------------------------------------------------------------------------- /src/modules/contents/attachments/composables/use-attachment-group.ts: -------------------------------------------------------------------------------- 1 | import type { Ref } from "vue"; 2 | import type { Group } from "@halo-dev/api-client"; 3 | import { apiClient } from "@/utils/api-client"; 4 | import { useQuery } from "@tanstack/vue-query"; 5 | 6 | interface useFetchAttachmentGroupReturn { 7 | groups: Ref; 8 | isLoading: Ref; 9 | handleFetchGroups: () => void; 10 | } 11 | 12 | export function useFetchAttachmentGroup(): useFetchAttachmentGroupReturn { 13 | const { data, isLoading, refetch } = useQuery({ 14 | queryKey: ["attachment-groups"], 15 | queryFn: async () => { 16 | const { data } = 17 | await apiClient.extension.storage.group.liststorageHaloRunV1alpha1Group(); 18 | return data.items; 19 | }, 20 | refetchInterval(data) { 21 | const deletingGroups = data?.filter( 22 | (group) => !!group.metadata.deletionTimestamp 23 | ); 24 | 25 | return deletingGroups?.length ? 1000 : false; 26 | }, 27 | refetchOnWindowFocus: false, 28 | }); 29 | 30 | return { 31 | groups: data, 32 | isLoading, 33 | handleFetchGroups: refetch, 34 | }; 35 | } 36 | -------------------------------------------------------------------------------- /src/modules/contents/attachments/module.ts: -------------------------------------------------------------------------------- 1 | import { definePlugin } from "@halo-dev/console-shared"; 2 | import BasicLayout from "@/layouts/BasicLayout.vue"; 3 | import AttachmentList from "./AttachmentList.vue"; 4 | import AttachmentSelectorModal from "./components/AttachmentSelectorModal.vue"; 5 | import { IconFolder } from "@halo-dev/components"; 6 | import { markRaw } from "vue"; 7 | 8 | export default definePlugin({ 9 | components: { 10 | AttachmentSelectorModal, 11 | }, 12 | routes: [ 13 | { 14 | path: "/attachments", 15 | component: BasicLayout, 16 | children: [ 17 | { 18 | path: "", 19 | name: "Attachments", 20 | component: AttachmentList, 21 | meta: { 22 | title: "附件", 23 | permissions: ["system:attachments:view"], 24 | menu: { 25 | name: "附件", 26 | group: "content", 27 | icon: markRaw(IconFolder), 28 | priority: 3, 29 | mobile: true, 30 | }, 31 | }, 32 | }, 33 | ], 34 | }, 35 | ], 36 | }); 37 | -------------------------------------------------------------------------------- /src/modules/contents/comments/module.ts: -------------------------------------------------------------------------------- 1 | import { definePlugin } from "@halo-dev/console-shared"; 2 | import BasicLayout from "@/layouts/BasicLayout.vue"; 3 | import { IconMessage } from "@halo-dev/components"; 4 | import CommentList from "./CommentList.vue"; 5 | import CommentStatsWidget from "./widgets/CommentStatsWidget.vue"; 6 | import { markRaw } from "vue"; 7 | 8 | export default definePlugin({ 9 | components: { 10 | CommentStatsWidget, 11 | }, 12 | routes: [ 13 | { 14 | path: "/comments", 15 | component: BasicLayout, 16 | children: [ 17 | { 18 | path: "", 19 | name: "Comments", 20 | component: CommentList, 21 | meta: { 22 | title: "评论", 23 | searchable: true, 24 | permissions: ["system:comments:view"], 25 | menu: { 26 | name: "评论", 27 | group: "content", 28 | icon: markRaw(IconMessage), 29 | priority: 2, 30 | mobile: true, 31 | }, 32 | }, 33 | }, 34 | ], 35 | }, 36 | ], 37 | }); 38 | -------------------------------------------------------------------------------- /src/modules/contents/comments/widgets/CommentStatsWidget.vue: -------------------------------------------------------------------------------- 1 | 8 | 28 | -------------------------------------------------------------------------------- /src/modules/contents/pages/widgets/SinglePageStatsWidget.vue: -------------------------------------------------------------------------------- 1 | 23 | 43 | -------------------------------------------------------------------------------- /src/modules/contents/posts/categories/components/__tests__/CategoryEditingModal.spec.ts: -------------------------------------------------------------------------------- 1 | import { beforeEach, describe, expect, it } from "vitest"; 2 | import { mount } from "@vue/test-utils"; 3 | import CategoryEditingModal from "../CategoryEditingModal.vue"; 4 | import { createPinia, setActivePinia } from "pinia"; 5 | 6 | describe("CategoryEditingModal", function () { 7 | beforeEach(() => { 8 | setActivePinia(createPinia()); 9 | }); 10 | 11 | it("should render", function () { 12 | expect(mount(CategoryEditingModal)).toBeDefined(); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /src/modules/contents/posts/components/__tests__/PostSettingModal.spec.ts: -------------------------------------------------------------------------------- 1 | import { beforeEach, describe, expect, it } from "vitest"; 2 | import { mount } from "@vue/test-utils"; 3 | import PostSettingModal from "../PostSettingModal.vue"; 4 | import { createPinia, setActivePinia } from "pinia"; 5 | import { VueQueryPlugin } from "@tanstack/vue-query"; 6 | 7 | describe("PostSettingModal", () => { 8 | beforeEach(() => { 9 | setActivePinia(createPinia()); 10 | }); 11 | 12 | it("should render", () => { 13 | const wrapper = mount( 14 | { 15 | components: { 16 | PostSettingModal, 17 | }, 18 | template: ``, 19 | }, 20 | { 21 | global: { 22 | plugins: [VueQueryPlugin], 23 | }, 24 | } 25 | ); 26 | expect(wrapper).toBeDefined(); 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /src/modules/contents/posts/widgets/PostStatsWidget.vue: -------------------------------------------------------------------------------- 1 | 8 | 28 | -------------------------------------------------------------------------------- /src/modules/dashboard/module.ts: -------------------------------------------------------------------------------- 1 | import { definePlugin } from "@halo-dev/console-shared"; 2 | import BasicLayout from "@/layouts/BasicLayout.vue"; 3 | import Dashboard from "./Dashboard.vue"; 4 | import { IconDashboard } from "@halo-dev/components"; 5 | 6 | import QuickLinkWidget from "./widgets/QuickLinkWidget.vue"; 7 | import ViewsStatsWidget from "./widgets/ViewsStatsWidget.vue"; 8 | import { markRaw } from "vue"; 9 | 10 | export default definePlugin({ 11 | components: { 12 | QuickLinkWidget, 13 | ViewsStatsWidget, 14 | }, 15 | routes: [ 16 | { 17 | path: "/", 18 | component: BasicLayout, 19 | name: "Root", 20 | redirect: "/dashboard", 21 | children: [ 22 | { 23 | path: "dashboard", 24 | name: "Dashboard", 25 | component: Dashboard, 26 | meta: { 27 | title: "仪表盘", 28 | searchable: true, 29 | menu: { 30 | name: "仪表盘", 31 | group: "dashboard", 32 | icon: markRaw(IconDashboard), 33 | priority: 0, 34 | mobile: true, 35 | }, 36 | }, 37 | }, 38 | ], 39 | }, 40 | ], 41 | }); 42 | -------------------------------------------------------------------------------- /src/modules/dashboard/widgets/ViewsStatsWidget.vue: -------------------------------------------------------------------------------- 1 | 8 | 28 | -------------------------------------------------------------------------------- /src/modules/index.ts: -------------------------------------------------------------------------------- 1 | import dashboardModule from "./dashboard/module"; 2 | import postModule from "./contents/posts/module"; 3 | import pageModule from "./contents/pages/module"; 4 | import commentModule from "./contents/comments/module"; 5 | import attachmentModule from "./contents/attachments/module"; 6 | import themeModule from "./interface/themes/module"; 7 | import menuModule from "./interface/menus/module"; 8 | import pluginModule from "./system/plugins/module"; 9 | import userModule from "./system/users/module"; 10 | import roleModule from "./system/roles/module"; 11 | import settingModule from "./system/settings/module"; 12 | import actuatorModule from "./system/actuator/module"; 13 | 14 | // const coreModules = [ 15 | // dashboardModule, 16 | // postModule, 17 | // pageModule, 18 | // commentModule, 19 | // attachmentModule, 20 | // themeModule, 21 | // menuModule, 22 | // pluginModule, 23 | // userModule, 24 | // roleModule, 25 | // settingModule, 26 | // ]; 27 | 28 | const coreModules = [ 29 | postModule, 30 | pluginModule, 31 | settingModule, 32 | actuatorModule, 33 | dashboardModule, 34 | menuModule, 35 | commentModule, 36 | attachmentModule, 37 | pageModule, 38 | themeModule, 39 | userModule, 40 | roleModule, 41 | ]; 42 | 43 | export { coreModules }; 44 | -------------------------------------------------------------------------------- /src/modules/interface/menus/module.ts: -------------------------------------------------------------------------------- 1 | import { definePlugin } from "@halo-dev/console-shared"; 2 | import BasicLayout from "@/layouts/BasicLayout.vue"; 3 | import Menus from "./Menus.vue"; 4 | import { IconListSettings } from "@halo-dev/components"; 5 | import { markRaw } from "vue"; 6 | 7 | export default definePlugin({ 8 | components: {}, 9 | routes: [ 10 | { 11 | path: "/menus", 12 | component: BasicLayout, 13 | children: [ 14 | { 15 | path: "", 16 | name: "Menus", 17 | component: Menus, 18 | meta: { 19 | title: "菜单", 20 | searchable: true, 21 | permissions: ["system:menus:view"], 22 | menu: { 23 | name: "菜单", 24 | group: "interface", 25 | icon: markRaw(IconListSettings), 26 | priority: 1, 27 | }, 28 | }, 29 | }, 30 | ], 31 | }, 32 | ], 33 | }); 34 | -------------------------------------------------------------------------------- /src/modules/interface/themes/module.ts: -------------------------------------------------------------------------------- 1 | import { definePlugin } from "@halo-dev/console-shared"; 2 | import ThemeLayout from "./layouts/ThemeLayout.vue"; 3 | import ThemeDetail from "./ThemeDetail.vue"; 4 | import ThemeSetting from "./ThemeSetting.vue"; 5 | import { IconPalette } from "@halo-dev/components"; 6 | import { markRaw } from "vue"; 7 | 8 | export default definePlugin({ 9 | components: {}, 10 | routes: [ 11 | { 12 | path: "/theme", 13 | component: ThemeLayout, 14 | children: [ 15 | { 16 | path: "", 17 | name: "ThemeDetail", 18 | component: ThemeDetail, 19 | meta: { 20 | title: "主题", 21 | searchable: true, 22 | permissions: ["system:themes:view"], 23 | menu: { 24 | name: "主题", 25 | group: "interface", 26 | icon: markRaw(IconPalette), 27 | priority: 0, 28 | }, 29 | }, 30 | }, 31 | { 32 | path: "settings/:group", 33 | name: "ThemeSetting", 34 | component: ThemeSetting, 35 | meta: { 36 | title: "主题设置", 37 | permissions: ["system:themes:view"], 38 | }, 39 | }, 40 | ], 41 | }, 42 | ], 43 | }); 44 | -------------------------------------------------------------------------------- /src/modules/system/actuator/module.ts: -------------------------------------------------------------------------------- 1 | import { definePlugin } from "@halo-dev/console-shared"; 2 | import { IconTerminalBoxLine } from "@halo-dev/components"; 3 | import BasicLayout from "@/layouts/BasicLayout.vue"; 4 | import Actuator from "./Actuator.vue"; 5 | import { markRaw } from "vue"; 6 | 7 | export default definePlugin({ 8 | components: {}, 9 | routes: [ 10 | { 11 | path: "/actuator", 12 | component: BasicLayout, 13 | children: [ 14 | { 15 | path: "", 16 | component: Actuator, 17 | meta: { 18 | title: "系统概览", 19 | searchable: true, 20 | menu: { 21 | name: "概览", 22 | group: "system", 23 | icon: markRaw(IconTerminalBoxLine), 24 | priority: 3, 25 | mobile: true, 26 | }, 27 | }, 28 | }, 29 | ], 30 | }, 31 | ], 32 | }); 33 | -------------------------------------------------------------------------------- /src/modules/system/roles/module.ts: -------------------------------------------------------------------------------- 1 | import { definePlugin } from "@halo-dev/console-shared"; 2 | import BasicLayout from "@/layouts/BasicLayout.vue"; 3 | import RoleList from "./RoleList.vue"; 4 | import RoleDetail from "./RoleDetail.vue"; 5 | 6 | export default definePlugin({ 7 | components: {}, 8 | routes: [ 9 | { 10 | path: "/users", 11 | component: BasicLayout, 12 | children: [ 13 | { 14 | path: "roles", 15 | name: "Roles", 16 | component: RoleList, 17 | meta: { 18 | title: "角色", 19 | searchable: true, 20 | permissions: ["system:roles:view"], 21 | }, 22 | }, 23 | { 24 | path: "roles/:name", 25 | name: "RoleDetail", 26 | component: RoleDetail, 27 | meta: { 28 | title: "角色详情", 29 | permissions: ["system:roles:view"], 30 | }, 31 | }, 32 | ], 33 | }, 34 | ], 35 | }); 36 | -------------------------------------------------------------------------------- /src/modules/system/settings/module.ts: -------------------------------------------------------------------------------- 1 | import { definePlugin } from "@halo-dev/console-shared"; 2 | import SystemSettingsLayout from "./layouts/SystemSettingsLayout.vue"; 3 | import SystemSetting from "./SystemSetting.vue"; 4 | import { IconSettings } from "@halo-dev/components"; 5 | import { markRaw } from "vue"; 6 | 7 | export default definePlugin({ 8 | components: {}, 9 | routes: [ 10 | { 11 | path: "/settings", 12 | component: SystemSettingsLayout, 13 | redirect: "/settings/basic", 14 | meta: { 15 | title: "系统设置", 16 | permissions: ["system:settings:view"], 17 | menu: { 18 | name: "设置", 19 | group: "system", 20 | icon: markRaw(IconSettings), 21 | priority: 2, 22 | }, 23 | }, 24 | children: [ 25 | { 26 | path: ":group", 27 | name: "SystemSetting", 28 | component: SystemSetting, 29 | }, 30 | ], 31 | }, 32 | ], 33 | }); 34 | -------------------------------------------------------------------------------- /src/modules/system/users/Login.vue: -------------------------------------------------------------------------------- 1 | 20 | 28 | -------------------------------------------------------------------------------- /src/modules/system/users/composables/use-user.ts: -------------------------------------------------------------------------------- 1 | import type { Ref } from "vue"; 2 | import { onMounted, ref } from "vue"; 3 | import type { User } from "@halo-dev/api-client"; 4 | import { apiClient } from "@/utils/api-client"; 5 | 6 | interface useUserFetchReturn { 7 | users: Ref; 8 | loading: Ref; 9 | handleFetchUsers: () => void; 10 | } 11 | 12 | export function useUserFetch(options?: { 13 | fetchOnMounted: boolean; 14 | }): useUserFetchReturn { 15 | const { fetchOnMounted } = options || {}; 16 | 17 | const users = ref([] as User[]); 18 | const loading = ref(false); 19 | 20 | const ANONYMOUSUSER_NAME = "anonymousUser"; 21 | 22 | const handleFetchUsers = async () => { 23 | try { 24 | loading.value = true; 25 | const { data } = await apiClient.extension.user.listv1alpha1User({ 26 | fieldSelector: [`name!=${ANONYMOUSUSER_NAME}`], 27 | }); 28 | users.value = data.items; 29 | } catch (e) { 30 | console.error("Failed to fetch users", e); 31 | } finally { 32 | loading.value = false; 33 | } 34 | }; 35 | 36 | onMounted(() => { 37 | fetchOnMounted && handleFetchUsers(); 38 | }); 39 | 40 | return { 41 | users, 42 | loading, 43 | handleFetchUsers, 44 | }; 45 | } 46 | -------------------------------------------------------------------------------- /src/modules/system/users/widgets/UserStatsWidget.vue: -------------------------------------------------------------------------------- 1 | 8 | 28 | -------------------------------------------------------------------------------- /src/router/guards/auth-check.ts: -------------------------------------------------------------------------------- 1 | import { useUserStore } from "@/stores/user"; 2 | import type { Router } from "vue-router"; 3 | 4 | export function setupAuthCheckGuard(router: Router) { 5 | router.beforeEach((to, from, next) => { 6 | if (to.name === "Setup" || to.name === "Login") { 7 | next(); 8 | return; 9 | } 10 | 11 | const userStore = useUserStore(); 12 | 13 | if (localStorage.getItem("logged_in") !== "true" || userStore.isAnonymous) { 14 | next({ name: "Login" }); 15 | return; 16 | } 17 | next(); 18 | }); 19 | } 20 | -------------------------------------------------------------------------------- /src/router/guards/check-states.ts: -------------------------------------------------------------------------------- 1 | import { useSystemStatesStore } from "@/stores/system-states"; 2 | import type { Router } from "vue-router"; 3 | 4 | export function setupCheckStatesGuard(router: Router) { 5 | router.beforeEach(async (to, from, next) => { 6 | if (to.name === "Setup" || to.name === "Login") { 7 | next(); 8 | return; 9 | } 10 | 11 | const systemStateStore = useSystemStatesStore(); 12 | 13 | if (!systemStateStore.states.isSetup) { 14 | next({ name: "Setup" }); 15 | return; 16 | } 17 | 18 | next(); 19 | }); 20 | } 21 | -------------------------------------------------------------------------------- /src/router/guards/permission.ts: -------------------------------------------------------------------------------- 1 | import { useRoleStore } from "@/stores/role"; 2 | import { hasPermission } from "@/utils/permission"; 3 | import type { Router } from "vue-router"; 4 | 5 | export function setupPermissionGuard(router: Router) { 6 | router.beforeEach((to, from, next) => { 7 | const roleStore = useRoleStore(); 8 | const { uiPermissions } = roleStore.permissions; 9 | const { meta } = to; 10 | if (meta && meta.permissions) { 11 | const flag = hasPermission( 12 | Array.from(uiPermissions), 13 | meta.permissions as string[], 14 | true 15 | ); 16 | if (!flag) { 17 | next({ name: "Forbidden" }); 18 | } 19 | } 20 | next(); 21 | }); 22 | } 23 | -------------------------------------------------------------------------------- /src/router/index.ts: -------------------------------------------------------------------------------- 1 | import { createRouter, createWebHashHistory } from "vue-router"; 2 | import routesConfig from "@/router/routes.config"; 3 | import { setupPermissionGuard } from "./guards/permission"; 4 | import { setupCheckStatesGuard } from "./guards/check-states"; 5 | import { setupAuthCheckGuard } from "./guards/auth-check"; 6 | 7 | const router = createRouter({ 8 | history: createWebHashHistory(import.meta.env.BASE_URL), 9 | routes: routesConfig, 10 | scrollBehavior: () => ({ left: 0, top: 0 }), 11 | }); 12 | 13 | setupAuthCheckGuard(router); 14 | setupPermissionGuard(router); 15 | setupCheckStatesGuard(router); 16 | 17 | export default router; 18 | -------------------------------------------------------------------------------- /src/setup/setupComponents.ts: -------------------------------------------------------------------------------- 1 | import type { App } from "vue"; 2 | import { Dropdown, Menu, Tooltip, VClosePopper, VTooltip } from "floating-vue"; 3 | import "floating-vue/dist/style.css"; 4 | // @ts-ignore 5 | import VueGridLayout from "vue-grid-layout"; 6 | import { defaultConfig, plugin as FormKit } from "@formkit/vue"; 7 | import FormKitConfig from "@/formkit/formkit.config"; 8 | 9 | export function setupComponents(app: App) { 10 | app.use(VueGridLayout); 11 | app.use( 12 | FormKit, 13 | defaultConfig({ 14 | ...FormKitConfig, 15 | }) 16 | ); 17 | 18 | app.directive("tooltip", VTooltip); 19 | app.directive("close-popper", VClosePopper); 20 | app.component("FloatingDropdown", Dropdown); 21 | app.component("FloatingTooltip", Tooltip); 22 | app.component("FloatingMenu", Menu); 23 | } 24 | -------------------------------------------------------------------------------- /src/setup/setupStyles.ts: -------------------------------------------------------------------------------- 1 | import "@halo-dev/richtext-editor/dist/style.css"; 2 | import "@halo-dev/components/dist/style.css"; 3 | import "@/styles/tailwind.css"; 4 | import "@/styles/index.css"; 5 | -------------------------------------------------------------------------------- /src/stores/plugin.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from "pinia"; 2 | import type { PluginModule as PluginModuleRaw } from "@halo-dev/console-shared"; 3 | import type { Plugin } from "@halo-dev/api-client"; 4 | 5 | export interface PluginModule extends PluginModuleRaw { 6 | extension: Plugin; 7 | } 8 | 9 | interface PluginStoreState { 10 | pluginModules: PluginModule[]; 11 | } 12 | 13 | export const usePluginModuleStore = defineStore("plugin", { 14 | state: (): PluginStoreState => ({ 15 | pluginModules: [], 16 | }), 17 | actions: { 18 | registerPluginModule(pluginModule: PluginModule) { 19 | this.pluginModules.push(pluginModule); 20 | }, 21 | }, 22 | }); 23 | -------------------------------------------------------------------------------- /src/stores/role.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from "pinia"; 2 | import type { UserPermission } from "@halo-dev/api-client"; 3 | import { ref } from "vue"; 4 | 5 | export const useRoleStore = defineStore("role", () => { 6 | const permissions = ref({ 7 | roles: [], 8 | uiPermissions: [], 9 | }); 10 | 11 | return { permissions }; 12 | }); 13 | -------------------------------------------------------------------------------- /src/stores/system-configmap.ts: -------------------------------------------------------------------------------- 1 | import { apiClient } from "@/utils/api-client"; 2 | import type { ConfigMap } from "@halo-dev/api-client"; 3 | import { defineStore } from "pinia"; 4 | 5 | interface SystemConfigMapState { 6 | configMap?: ConfigMap; 7 | } 8 | 9 | export const useSystemConfigMapStore = defineStore({ 10 | id: "system-configmap", 11 | state: (): SystemConfigMapState => ({ 12 | configMap: undefined, 13 | }), 14 | actions: { 15 | async fetchSystemConfigMap() { 16 | try { 17 | const { data } = 18 | await apiClient.extension.configMap.getv1alpha1ConfigMap( 19 | { 20 | name: "system", 21 | }, 22 | { mute: true } 23 | ); 24 | this.configMap = data; 25 | } catch (error) { 26 | console.error("Failed to fetch system configMap", error); 27 | } 28 | }, 29 | }, 30 | }); 31 | -------------------------------------------------------------------------------- /src/stores/system-states.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from "pinia"; 2 | import { apiClient } from "@/utils/api-client"; 3 | 4 | interface SystemState { 5 | isSetup: boolean; 6 | } 7 | 8 | interface SystemStatesState { 9 | states: SystemState; 10 | } 11 | 12 | export const useSystemStatesStore = defineStore({ 13 | id: "system-states", 14 | state: (): SystemStatesState => ({ 15 | states: { 16 | isSetup: false, 17 | }, 18 | }), 19 | actions: { 20 | async fetchSystemStates() { 21 | try { 22 | const { data } = 23 | await apiClient.extension.configMap.getv1alpha1ConfigMap( 24 | { 25 | name: "system-states", 26 | }, 27 | { mute: true } 28 | ); 29 | 30 | if (data.data) { 31 | this.states = JSON.parse(data.data["states"]); 32 | return; 33 | } 34 | this.states.isSetup = false; 35 | } catch (error) { 36 | this.states.isSetup = false; 37 | } 38 | }, 39 | }, 40 | }); 41 | -------------------------------------------------------------------------------- /src/stores/theme.ts: -------------------------------------------------------------------------------- 1 | import { apiClient } from "@/utils/api-client"; 2 | import type { Theme } from "@halo-dev/api-client"; 3 | import { defineStore } from "pinia"; 4 | import { ref } from "vue"; 5 | import { usePermission } from "@/utils/permission"; 6 | 7 | export const useThemeStore = defineStore("theme", () => { 8 | const activatedTheme = ref(); 9 | 10 | const { currentUserHasPermission } = usePermission(); 11 | 12 | async function fetchActivatedTheme() { 13 | if (!currentUserHasPermission(["system:themes:view"])) { 14 | return; 15 | } 16 | 17 | try { 18 | const { data } = await apiClient.theme.fetchActivatedTheme({ 19 | mute: true, 20 | }); 21 | 22 | if (data) { 23 | activatedTheme.value = data; 24 | } 25 | } catch (e) { 26 | console.error("Failed to fetch active theme", e); 27 | } 28 | } 29 | 30 | return { activatedTheme, fetchActivatedTheme }; 31 | }); 32 | -------------------------------------------------------------------------------- /src/stores/user.ts: -------------------------------------------------------------------------------- 1 | import { apiClient } from "@/utils/api-client"; 2 | import type { Role, User } from "@halo-dev/api-client"; 3 | import { defineStore } from "pinia"; 4 | 5 | interface UserStoreState { 6 | currentUser?: User; 7 | currentRoles?: Role[]; 8 | isAnonymous: boolean; 9 | loginModalVisible: boolean; 10 | } 11 | 12 | export const useUserStore = defineStore("user", { 13 | state: (): UserStoreState => ({ 14 | currentUser: undefined, 15 | currentRoles: [], 16 | isAnonymous: true, 17 | loginModalVisible: false, 18 | }), 19 | actions: { 20 | async fetchCurrentUser() { 21 | try { 22 | const { data } = await apiClient.user.getCurrentUserDetail(); 23 | this.currentUser = data.user; 24 | this.currentRoles = data.roles; 25 | this.isAnonymous = data.user.metadata.name === "anonymousUser"; 26 | } catch (e) { 27 | console.error("Failed to fetch current user", e); 28 | } 29 | }, 30 | }, 31 | }); 32 | -------------------------------------------------------------------------------- /src/styles/index.css: -------------------------------------------------------------------------------- 1 | .fade-enter-active { 2 | @apply duration-200 ease-out; 3 | } 4 | .fade-enter-from { 5 | @apply opacity-0; 6 | } 7 | .fade-enter-to { 8 | @apply opacity-100; 9 | } 10 | .fade-leave-active { 11 | @apply duration-200 ease-in; 12 | } 13 | .fade-leave-from { 14 | @apply opacity-100; 15 | } 16 | .fade-leave-to { 17 | @apply opacity-0; 18 | } 19 | -------------------------------------------------------------------------------- /src/styles/tailwind.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /src/utils/__tests__/date.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, it } from "vitest"; 2 | import { formatDatetime, toDatetimeLocal, toISOString } from "../date"; 3 | 4 | describe("date#formatDatetime", () => { 5 | it("should return formatted datetime", () => { 6 | const formattedDatetime = formatDatetime( 7 | "2022-08-17T06:01:16.511575Z", 8 | "Asia/Shanghai" 9 | ); 10 | 11 | expect(formattedDatetime).toEqual("2022-08-17 14:01"); 12 | }); 13 | }); 14 | 15 | describe("date#toISOString", () => { 16 | it("should return ISO string", () => { 17 | const currentDate = new Date(); 18 | 19 | const isoString = toISOString(currentDate); 20 | 21 | expect(isoString).toEqual(currentDate.toISOString()); 22 | }); 23 | }); 24 | 25 | describe("date#toDatetimeLocal", () => { 26 | it("should return datetime local", () => { 27 | const datetimeLocal = toDatetimeLocal( 28 | "2022-08-17T06:01:00.000Z", 29 | "Asia/Shanghai" 30 | ); 31 | 32 | expect(datetimeLocal).toEqual("2022-08-17T14:01"); 33 | }); 34 | }); 35 | -------------------------------------------------------------------------------- /src/utils/__tests__/permission.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, it } from "vitest"; 2 | import { hasPermission } from "../permission"; 3 | 4 | describe("hasPermission", () => { 5 | it("should return true if user has permission", () => { 6 | const uiPermissions = ["system:post:manage", "system:post:view"]; 7 | 8 | expect(hasPermission(uiPermissions, ["system:post:manage"], false)).toBe( 9 | true 10 | ); 11 | expect(hasPermission(uiPermissions, ["system:post:view"], false)).toBe( 12 | true 13 | ); 14 | expect(hasPermission(uiPermissions, ["system:post:view"], true)).toBe(true); 15 | expect( 16 | hasPermission( 17 | uiPermissions, 18 | ["system:post:manage", "system:post:view"], 19 | true 20 | ) 21 | ).toBe(true); 22 | expect( 23 | hasPermission( 24 | uiPermissions, 25 | ["system:post:manage", "system:post:view"], 26 | false 27 | ) 28 | ).toBe(true); 29 | 30 | // super admin has all permissions 31 | expect(hasPermission(["*"], ["system:post:manage"], false)).toBe(true); 32 | expect( 33 | hasPermission(["*"], ["system:post:manage", "system:links:manage"], true) 34 | ).toBe(true); 35 | }); 36 | }); 37 | -------------------------------------------------------------------------------- /src/utils/date.ts: -------------------------------------------------------------------------------- 1 | import dayjs from "dayjs"; 2 | import "dayjs/locale/zh-cn"; 3 | import timezone from "dayjs/plugin/timezone"; 4 | import utc from "dayjs/plugin/utc"; 5 | 6 | dayjs.extend(timezone); 7 | dayjs.extend(utc); 8 | 9 | dayjs.locale("zh-cn"); 10 | 11 | export function formatDatetime( 12 | date: string | Date | undefined | null, 13 | tz?: string 14 | ): string { 15 | if (!date) { 16 | return ""; 17 | } 18 | return dayjs(date).tz(tz).format("YYYY-MM-DD HH:mm"); 19 | } 20 | 21 | export function toISOString(date: string | Date | undefined | null): string { 22 | if (!date) { 23 | return ""; 24 | } 25 | return dayjs(date).utc(false).toISOString(); 26 | } 27 | 28 | export function toDatetimeLocal( 29 | date: string | Date | undefined | null, 30 | tz?: string 31 | ): string { 32 | if (!date) { 33 | return ""; 34 | } 35 | // see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local#the_y10k_problem_often_client-side 36 | return dayjs(date).tz(tz).format("YYYY-MM-DDTHH:mm"); 37 | } 38 | -------------------------------------------------------------------------------- /src/utils/id.ts: -------------------------------------------------------------------------------- 1 | export function randomUUID() { 2 | return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { 3 | const r = (Math.random() * 16) | 0, 4 | v = c === "x" ? r : (r & 0x3) | 0x8; 5 | return v.toString(16); 6 | }); 7 | } 8 | -------------------------------------------------------------------------------- /src/utils/image.ts: -------------------------------------------------------------------------------- 1 | export const imageTypes: string[] = [ 2 | "image/jpeg", 3 | "image/jpg", 4 | "image/png", 5 | "image/gif", 6 | "image/webp", 7 | "image/svg+xml", 8 | ]; 9 | 10 | export function isImage(mediaType: string | undefined): boolean { 11 | if (!mediaType) { 12 | return false; 13 | } 14 | return imageTypes.includes(mediaType); 15 | } 16 | -------------------------------------------------------------------------------- /src/views/exceptions/Forbidden.vue: -------------------------------------------------------------------------------- 1 | 4 | 7 | -------------------------------------------------------------------------------- /src/views/exceptions/NotFound.vue: -------------------------------------------------------------------------------- 1 | 4 | 7 | -------------------------------------------------------------------------------- /src/views/exceptions/__tests__/NotFound.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, it } from "vitest"; 2 | 3 | describe("NotFound", () => { 4 | it("should render", () => { 5 | expect(true).toBe(true); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/views/exceptions/components/Exception.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 43 | -------------------------------------------------------------------------------- /src/views/system/setup-data/category.json: -------------------------------------------------------------------------------- 1 | { 2 | "spec": { 3 | "displayName": "默认分类", 4 | "slug": "default", 5 | "description": "这是你的默认分类,如不需要,删除即可。", 6 | "cover": "", 7 | "template": "", 8 | "priority": 0, 9 | "children": [] 10 | }, 11 | "apiVersion": "content.halo.run/v1alpha1", 12 | "kind": "Category", 13 | "metadata": { 14 | "name": "76514a40-6ef1-4ed9-b58a-e26945bde3ca" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/views/system/setup-data/menu.json: -------------------------------------------------------------------------------- 1 | { 2 | "spec": { 3 | "displayName": "主菜单", 4 | "menuItems": [ 5 | "88c3f10b-321c-4092-86a8-70db00251b74", 6 | "c4c814d1-0c2c-456b-8c96-4864965fee94", 7 | "35869bd3-33b5-448b-91ee-cf6517a59644", 8 | "b0d041fa-dc99-48f6-a193-8604003379cf" 9 | ] 10 | }, 11 | "apiVersion": "v1alpha1", 12 | "kind": "Menu", 13 | "metadata": { "name": "primary" } 14 | } 15 | -------------------------------------------------------------------------------- /src/views/system/setup-data/singlePage.json: -------------------------------------------------------------------------------- 1 | { 2 | "page": { 3 | "spec": { 4 | "title": "关于", 5 | "slug": "about", 6 | "template": "", 7 | "cover": "", 8 | "deleted": false, 9 | "publish": false, 10 | "publishTime": "", 11 | "pinned": false, 12 | "allowComment": true, 13 | "visible": "PUBLIC", 14 | "version": 1, 15 | "priority": 0, 16 | "excerpt": { 17 | "autoGenerate": false, 18 | "raw": "这是一个自定义页面,你可以在后台的 页面 -> 自定义页面 找到它,你可以用于新建关于页面、联系我们页面等等。" 19 | }, 20 | "htmlMetas": [] 21 | }, 22 | "apiVersion": "content.halo.run/v1alpha1", 23 | "kind": "SinglePage", 24 | "metadata": { "name": "373a5f79-f44f-441a-9df1-85a4f553ece8" } 25 | }, 26 | "content": { 27 | "raw": "

    关于页面

    这是一个自定义页面,你可以在后台的 页面 -> 自定义页面 找到它,你可以用于新建关于页面、联系我们页面等等。

    这是一篇自动生成的页面,你可以在后台删除它。

    ", 28 | "content": "

    关于页面

    这是一个自定义页面,你可以在后台的 页面 -> 自定义页面 找到它,你可以用于新建关于页面、联系我们页面等等。

    这是一篇自动生成的页面,你可以在后台删除它。

    ", 29 | "rawType": "HTML" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/views/system/setup-data/tag.json: -------------------------------------------------------------------------------- 1 | { 2 | "spec": { 3 | "displayName": "Halo", 4 | "slug": "halo", 5 | "color": "#ffffff", 6 | "cover": "" 7 | }, 8 | "apiVersion": "content.halo.run/v1alpha1", 9 | "kind": "Tag", 10 | "metadata": { 11 | "name": "c33ceabb-d8f1-4711-8991-bb8f5c92ad7c" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@vue/tsconfig/tsconfig.web.json", 3 | "include": ["env.d.ts", "src/**/*", "src/**/*.vue"], 4 | "exclude": ["src/**/__tests__/*", "packages/**/*"], 5 | "compilerOptions": { 6 | "baseUrl": ".", 7 | "composite": true, 8 | "noImplicitAny": false, 9 | "paths": { 10 | "@/*": ["./src/*"] 11 | }, 12 | "types": ["unplugin-icons/types/vue"] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { 5 | "path": "./tsconfig.vite-config.json" 6 | }, 7 | { 8 | "path": "./tsconfig.app.json" 9 | }, 10 | { 11 | "path": "./tsconfig.vitest.json" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tsconfig.vite-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@vue/tsconfig/tsconfig.node.json", 3 | "include": ["vite.config.*","./src/build/*.ts"], 4 | "compilerOptions": { 5 | "composite": true, 6 | "types": ["node", "vitest"] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /tsconfig.vitest.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.app.json", 3 | "exclude": [], 4 | "compilerOptions": { 5 | "composite": true, 6 | "lib": [], 7 | "types": ["node", "jsdom"] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitest/config"; 2 | import { fileURLToPath, URL } from "url"; 3 | 4 | import { sharedPlugins } from "./vite.config"; 5 | 6 | export default defineConfig({ 7 | plugins: [sharedPlugins], 8 | resolve: { 9 | alias: { 10 | "@": fileURLToPath(new URL("./src", import.meta.url)), 11 | }, 12 | }, 13 | test: { 14 | dir: "./src", 15 | transformMode: { 16 | web: [/\.[jt]sx$/], 17 | }, 18 | }, 19 | }); 20 | --------------------------------------------------------------------------------