diff --git a/packages/shared/src/states/pages.ts b/packages/shared/src/states/pages.ts index a0a721d38..446d0c7fe 100644 --- a/packages/shared/src/states/pages.ts +++ b/packages/shared/src/states/pages.ts @@ -1,3 +1,4 @@ +// @deprecated export interface FunctionalPage { name: string; path: string; diff --git a/packages/shared/src/types/plugin.ts b/packages/shared/src/types/plugin.ts index 8217b4acc..a9898da75 100644 --- a/packages/shared/src/types/plugin.ts +++ b/packages/shared/src/types/plugin.ts @@ -10,6 +10,7 @@ export interface RouteRecordAppend { } export interface ExtensionPoint { + // @deprecated "page:functional:create"?: () => FunctionalPage[] | Promise; "attachment:selector:create"?: () => diff --git a/src/modules/contents/pages/FunctionalPageList.vue b/src/modules/contents/pages/FunctionalPageList.vue deleted file mode 100644 index 6566f2a14..000000000 --- a/src/modules/contents/pages/FunctionalPageList.vue +++ /dev/null @@ -1,77 +0,0 @@ - - - diff --git a/src/modules/contents/pages/SinglePageList.vue b/src/modules/contents/pages/SinglePageList.vue index 650ac97c7..8a506a711 100644 --- a/src/modules/contents/pages/SinglePageList.vue +++ b/src/modules/contents/pages/SinglePageList.vue @@ -9,6 +9,7 @@ import { IconAddCircle, IconRefreshLine, IconExternalLinkLine, + IconPages, VButton, VCard, VPagination, @@ -20,6 +21,7 @@ import { VEntity, VEntityField, VLoading, + VPageHeader, Toast, } from "@halo-dev/components"; import SinglePageSettingModal from "./components/SinglePageSettingModal.vue"; @@ -439,373 +441,411 @@ function handleClearFilters() { - - diff --git a/src/modules/contents/pages/layouts/PageLayout.vue b/src/modules/contents/pages/layouts/PageLayout.vue deleted file mode 100644 index 7d36e276a..000000000 --- a/src/modules/contents/pages/layouts/PageLayout.vue +++ /dev/null @@ -1,109 +0,0 @@ - - - diff --git a/src/modules/contents/pages/module.ts b/src/modules/contents/pages/module.ts index e4ee8f574..f81904017 100644 --- a/src/modules/contents/pages/module.ts +++ b/src/modules/contents/pages/module.ts @@ -1,8 +1,5 @@ import { definePlugin } from "@halo-dev/console-shared"; import BasicLayout from "@/layouts/BasicLayout.vue"; -import BlankLayout from "@/layouts/BlankLayout.vue"; -import PageLayout from "./layouts/PageLayout.vue"; -import FunctionalPageList from "./FunctionalPageList.vue"; import SinglePageList from "./SinglePageList.vue"; import DeletedSinglePageList from "./DeletedSinglePageList.vue"; import SinglePageEditor from "./SinglePageEditor.vue"; @@ -16,89 +13,45 @@ export default definePlugin({ }, routes: [ { - path: "/pages", - component: BlankLayout, - name: "BasePages", - redirect: { - name: "FunctionalPages", - }, - meta: { - menu: { - name: "页面", - group: "content", - icon: markRaw(IconPages), - priority: 1, - }, - }, + path: "/single-pages", + component: BasicLayout, children: [ { - path: "functional", - component: PageLayout, - children: [ - { - path: "", - name: "FunctionalPages", - component: FunctionalPageList, - meta: { - title: "功能页面", - searchable: true, - }, + path: "", + name: "SinglePages", + component: SinglePageList, + meta: { + title: "页面", + searchable: true, + permissions: ["system:singlepages:view"], + menu: { + name: "页面", + group: "content", + icon: markRaw(IconPages), + priority: 1, + mobile: true, }, - ], + }, }, { - path: "single", - component: BlankLayout, - children: [ - { - path: "", - component: PageLayout, - children: [ - { - path: "", - name: "SinglePages", - component: SinglePageList, - meta: { - title: "自定义页面", - searchable: true, - permissions: ["system:singlepages:view"], - }, - }, - ], - }, - { - path: "deleted", - component: BasicLayout, - children: [ - { - path: "", - name: "DeletedSinglePages", - component: DeletedSinglePageList, - meta: { - title: "自定义页面回收站", - searchable: true, - permissions: ["system:singlepages:view"], - }, - }, - ], - }, - { - path: "editor", - component: BasicLayout, - children: [ - { - path: "", - name: "SinglePageEditor", - component: SinglePageEditor, - meta: { - title: "页面编辑", - searchable: true, - permissions: ["system:singlepages:manage"], - }, - }, - ], - }, - ], + path: "deleted", + name: "DeletedSinglePages", + component: DeletedSinglePageList, + meta: { + title: "页面回收站", + searchable: true, + permissions: ["system:singlepages:view"], + }, + }, + { + path: "editor", + name: "SinglePageEditor", + component: SinglePageEditor, + meta: { + title: "页面编辑", + searchable: true, + permissions: ["system:singlepages:manage"], + }, }, ], },