Skip to content

Commit

Permalink
Merge branch 'main' into feat/refactor-editor-upload
Browse files Browse the repository at this point in the history
  • Loading branch information
LIlGG authored Jan 11, 2024
2 parents 4359c1b + 962cf99 commit 09de9fe
Show file tree
Hide file tree
Showing 10 changed files with 304 additions and 391 deletions.
54 changes: 8 additions & 46 deletions console/console-src/modules/index.ts
Original file line number Diff line number Diff line change
@@ -1,48 +1,10 @@
// fixme: add supports for auto import
import dashboardModule from "./dashboard/module";
import postModule from "./contents/posts/module";
import pageModule from "./contents/pages/module";
import commentModule from "./contents/comments/module";
import attachmentModule from "./contents/attachments/module";
import themeModule from "./interface/themes/module";
import menuModule from "./interface/menus/module";
import pluginModule from "./system/plugins/module";
import userModule from "./system/users/module";
import roleModule from "./system/roles/module";
import settingModule from "./system/settings/module";
import actuatorModule from "./system/actuator/module";
import authProviderModule from "./system/auth-providers/module";
import backupModule from "./system/backup/module";
import type { PluginModule } from "@halo-dev/console-shared";

// const coreModules = [
// dashboardModule,
// postModule,
// pageModule,
// commentModule,
// attachmentModule,
// themeModule,
// menuModule,
// pluginModule,
// userModule,
// roleModule,
// settingModule,
// ];
const modules = Object.values(
import.meta.glob("./**/module.ts", {
eager: true,
import: "default",
})
) as PluginModule[];

const coreModules = [
postModule,
pluginModule,
settingModule,
actuatorModule,
dashboardModule,
menuModule,
commentModule,
attachmentModule,
pageModule,
themeModule,
userModule,
roleModule,
authProviderModule,
backupModule,
];

export { coreModules };
export default modules;
6 changes: 3 additions & 3 deletions console/console-src/modules/system/auth-providers/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import AuthProviderDetail from "./AuthProviderDetail.vue";
export default definePlugin({
routes: [
{
path: "/users",
path: "/users/auth-providers",
component: BasicLayout,
children: [
{
path: "auth-providers",
path: "",
name: "AuthProviders",
component: AuthProviders,
meta: {
Expand All @@ -19,7 +19,7 @@ export default definePlugin({
},
},
{
path: "auth-providers/:name",
path: ":name",
name: "AuthProviderDetail",
component: AuthProviderDetail,
meta: {
Expand Down
6 changes: 3 additions & 3 deletions console/console-src/modules/system/roles/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ export default definePlugin({
components: {},
routes: [
{
path: "/users",
path: "/users/roles",
component: BasicLayout,
children: [
{
path: "roles",
path: "",
name: "Roles",
component: RoleList,
meta: {
Expand All @@ -21,7 +21,7 @@ export default definePlugin({
},
},
{
path: "roles/:name",
path: ":name",
name: "RoleDetail",
component: RoleDetail,
meta: {
Expand Down
52 changes: 19 additions & 33 deletions console/console-src/modules/system/users/module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { definePlugin } from "@halo-dev/console-shared";
import BasicLayout from "@console/layouts/BasicLayout.vue";
import BlankLayout from "@console/layouts/BlankLayout.vue";
import UserStatsWidget from "./widgets/UserStatsWidget.vue";
import UserList from "./UserList.vue";
import UserDetail from "./UserDetail.vue";
Expand Down Expand Up @@ -34,45 +33,32 @@ export default definePlugin({
},
{
path: "/users",
component: BlankLayout,
component: BasicLayout,
children: [
{
path: "",
component: BasicLayout,
children: [
{
path: "",
name: "Users",
component: UserList,
meta: {
title: "core.user.title",
searchable: true,
permissions: ["system:users:view"],
menu: {
name: "core.sidebar.menu.items.users",
group: "system",
icon: markRaw(IconUserSettings),
priority: 1,
mobile: true,
},
},
name: "Users",
component: UserList,
meta: {
title: "core.user.title",
searchable: true,
permissions: ["system:users:view"],
menu: {
name: "core.sidebar.menu.items.users",
group: "system",
icon: markRaw(IconUserSettings),
priority: 1,
mobile: true,
},
],
},
},
{
path: ":name",
component: BasicLayout,
name: "User",
children: [
{
path: "",
name: "UserDetail",
component: UserDetail,
meta: {
title: "core.user.detail.title",
},
},
],
name: "UserDetail",
component: UserDetail,
meta: {
title: "core.user.detail.title",
},
},
],
},
Expand Down
4 changes: 2 additions & 2 deletions console/console-src/setup/setupModules.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { i18n } from "@/locales";
import { coreModules } from "@console/modules";
import modules from "@console/modules";
import router from "@console/router";
import { usePluginModuleStore } from "@/stores/plugin";
import type { PluginModule, RouteRecordAppend } from "@halo-dev/console-shared";
Expand All @@ -10,7 +10,7 @@ import type { RouteRecordRaw } from "vue-router";
import { loadStyle } from "@/utils/load-style";

export function setupCoreModules(app: App) {
coreModules.forEach((module) => {
modules.forEach((module) => {
registerModule(app, module, true);
});
}
Expand Down
2 changes: 1 addition & 1 deletion console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"@halo-dev/console-shared": "workspace:*",
"@halo-dev/richtext-editor": "workspace:*",
"@tanstack/vue-query": "^4.29.1",
"@tiptap/extension-character-count": "^2.0.4",
"@tiptap/extension-character-count": "^2.1.15",
"@uppy/core": "^3.8.0",
"@uppy/dashboard": "^3.7.1",
"@uppy/drag-drop": "^3.0.3",
Expand Down
76 changes: 38 additions & 38 deletions console/packages/editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,44 +41,44 @@
},
"dependencies": {
"@ckpack/vue-color": "^1.5.0",
"@tiptap/core": "^2.1.10",
"@tiptap/extension-blockquote": "^2.1.10",
"@tiptap/extension-bold": "^2.1.10",
"@tiptap/extension-bullet-list": "^2.1.10",
"@tiptap/extension-code": "^2.1.10",
"@tiptap/extension-code-block": "^2.1.10",
"@tiptap/extension-code-block-lowlight": "^2.1.10",
"@tiptap/extension-color": "^2.1.10",
"@tiptap/extension-document": "^2.1.10",
"@tiptap/extension-dropcursor": "^2.1.10",
"@tiptap/extension-gapcursor": "^2.1.10",
"@tiptap/extension-hard-break": "^2.1.10",
"@tiptap/extension-heading": "^2.1.10",
"@tiptap/extension-highlight": "^2.1.10",
"@tiptap/extension-history": "^2.1.10",
"@tiptap/extension-horizontal-rule": "^2.1.10",
"@tiptap/extension-image": "^2.1.10",
"@tiptap/extension-italic": "^2.1.10",
"@tiptap/extension-link": "^2.1.10",
"@tiptap/extension-list-item": "^2.1.10",
"@tiptap/extension-list-keymap": "^2.1.10",
"@tiptap/extension-ordered-list": "^2.1.10",
"@tiptap/extension-paragraph": "^2.1.10",
"@tiptap/extension-placeholder": "^2.1.10",
"@tiptap/extension-strike": "^2.1.10",
"@tiptap/extension-subscript": "^2.1.10",
"@tiptap/extension-superscript": "^2.1.10",
"@tiptap/extension-table": "^2.1.10",
"@tiptap/extension-table-row": "^2.1.10",
"@tiptap/extension-task-item": "^2.1.10",
"@tiptap/extension-task-list": "^2.1.10",
"@tiptap/extension-text": "^2.1.10",
"@tiptap/extension-text-align": "^2.1.10",
"@tiptap/extension-text-style": "^2.1.10",
"@tiptap/extension-underline": "^2.1.10",
"@tiptap/pm": "^2.1.10",
"@tiptap/suggestion": "^2.1.10",
"@tiptap/vue-3": "^2.1.10",
"@tiptap/core": "^2.1.15",
"@tiptap/extension-blockquote": "^2.1.15",
"@tiptap/extension-bold": "^2.1.15",
"@tiptap/extension-bullet-list": "^2.1.15",
"@tiptap/extension-code": "^2.1.15",
"@tiptap/extension-code-block": "^2.1.15",
"@tiptap/extension-code-block-lowlight": "^2.1.15",
"@tiptap/extension-color": "^2.1.15",
"@tiptap/extension-document": "^2.1.15",
"@tiptap/extension-dropcursor": "^2.1.15",
"@tiptap/extension-gapcursor": "^2.1.15",
"@tiptap/extension-hard-break": "^2.1.15",
"@tiptap/extension-heading": "^2.1.15",
"@tiptap/extension-highlight": "^2.1.15",
"@tiptap/extension-history": "^2.1.15",
"@tiptap/extension-horizontal-rule": "^2.1.15",
"@tiptap/extension-image": "^2.1.15",
"@tiptap/extension-italic": "^2.1.15",
"@tiptap/extension-link": "^2.1.15",
"@tiptap/extension-list-item": "^2.1.15",
"@tiptap/extension-list-keymap": "^2.1.15",
"@tiptap/extension-ordered-list": "^2.1.15",
"@tiptap/extension-paragraph": "^2.1.15",
"@tiptap/extension-placeholder": "^2.1.15",
"@tiptap/extension-strike": "^2.1.15",
"@tiptap/extension-subscript": "^2.1.15",
"@tiptap/extension-superscript": "^2.1.15",
"@tiptap/extension-table": "^2.1.15",
"@tiptap/extension-table-row": "^2.1.15",
"@tiptap/extension-task-item": "^2.1.15",
"@tiptap/extension-task-list": "^2.1.15",
"@tiptap/extension-text": "^2.1.15",
"@tiptap/extension-text-align": "^2.1.15",
"@tiptap/extension-text-style": "^2.1.15",
"@tiptap/extension-underline": "^2.1.15",
"@tiptap/pm": "^2.1.15",
"@tiptap/suggestion": "^2.1.15",
"@tiptap/vue-3": "^2.1.15",
"floating-vue": "2.0.0-beta.24",
"github-markdown-css": "^5.2.0",
"highlight.js": "11.8.0",
Expand Down
Loading

0 comments on commit 09de9fe

Please sign in to comment.