mirror of
https://github.com/halo-dev/halo.git
synced 2025-12-20 16:44:38 +08:00
* Enhance type hints for globally registered components * Refactor Codemirror props and language support * Update Signed-off-by: Ryan Wang <i@ryanc.cc> --------- Signed-off-by: Ryan Wang <i@ryanc.cc>
63 lines
1.7 KiB
TypeScript
63 lines
1.7 KiB
TypeScript
import BasicLayout from "@console/layouts/BasicLayout.vue";
|
|
import { IconPlug } from "@halo-dev/components";
|
|
import { definePlugin } from "@halo-dev/ui-shared";
|
|
import { markRaw } from "vue";
|
|
import type { RouteRecordRaw } from "vue-router";
|
|
import PluginDetailModal from "./components/PluginDetailModal.vue";
|
|
|
|
declare module "vue" {
|
|
interface GlobalComponents {
|
|
PluginDetailModal: (typeof import("./components/PluginDetailModal.vue"))["default"];
|
|
}
|
|
}
|
|
|
|
export default definePlugin({
|
|
components: {
|
|
PluginDetailModal,
|
|
},
|
|
routes: [
|
|
{
|
|
path: "/plugins",
|
|
name: "PluginsRoot",
|
|
component: BasicLayout,
|
|
meta: {
|
|
title: "core.plugin.title",
|
|
searchable: true,
|
|
permissions: ["system:plugins:view"],
|
|
menu: {
|
|
name: "core.sidebar.menu.items.plugins",
|
|
group: "system",
|
|
icon: markRaw(IconPlug),
|
|
priority: 0,
|
|
},
|
|
},
|
|
children: [
|
|
{
|
|
path: "",
|
|
name: "Plugins",
|
|
component: () => import("./PluginList.vue"),
|
|
},
|
|
{
|
|
path: "extension-point-settings",
|
|
name: "PluginExtensionPointSettings",
|
|
component: () => import("./PluginExtensionPointSettings.vue"),
|
|
meta: {
|
|
title: "core.plugin.extension-settings.title",
|
|
hideFooter: true,
|
|
permissions: ["*"],
|
|
},
|
|
},
|
|
{
|
|
path: ":name",
|
|
name: "PluginDetail",
|
|
component: () => import("./PluginDetail.vue"),
|
|
meta: {
|
|
title: "core.plugin.detail.title",
|
|
permissions: ["system:plugins:view"],
|
|
},
|
|
},
|
|
],
|
|
} as RouteRecordRaw,
|
|
],
|
|
});
|