-
-
-
- 插件信息
-
-
- {{ plugin?.spec?.version }}
-
- {{ isStarted ? "已启用" : "未启用" }}
-
-
-
-
-
-
-
-
-
-
-
- 名称
- -
- {{ plugin?.spec?.displayName }}
-
-
-
-
- 版本
- -
- {{ plugin?.spec?.version }}
-
-
-
-
- Halo 版本要求
- -
- {{ plugin?.spec?.requires }}
-
-
-
+
+
+
插件信息
+
+ {{ plugin?.spec?.version }}
+
+ {{ isStarted ? "已启用" : "未启用" }}
+
+
+
+
+
+
+
+
+
+
+
- 名称
+ -
+ {{ plugin?.spec?.displayName }}
+
+
+
+
- 版本
+ -
+ {{ plugin?.spec?.version }}
+
+
+
+
- Halo 版本要求
+ -
+ {{ plugin?.spec?.requires }}
+
+
+
+
+
+
- 模型定义
+ -
+ 无
+
+
+
+
- 权限模板
+
-
+
-
- 协议
+
-
+ {{ group.module }}
+
-
-
- -
-
- {{ license.name }}
-
-
- {{ license.name }}
-
+
+ -
+
+
+
+ {{
+ role.metadata.annotations?.[
+ rbacAnnotations.DISPLAY_NAME
+ ]
+ }}
+
+
+ 依赖于
+ {{
+ JSON.parse(
+ role.metadata.annotations?.[
+ rbacAnnotations.DEPENDENCIES
+ ]
+ ).join(", ")
+ }}
+
+
+
-
-
- 模型定义
- -
- 无
-
-
-
-
- 权限模板
-
-
-
-
-
-
- {{ group.module }}
-
-
-
-
- -
-
-
-
- {{
- role.metadata.annotations?.[
- rbacAnnotations.DISPLAY_NAME
- ]
- }}
-
-
- 依赖于
- {{
- JSON.parse(
- role.metadata.annotations?.[
- rbacAnnotations.DEPENDENCIES
- ]
- ).join(", ")
- }}
-
-
-
-
-
-
-
-
- 无
-
-
-
+ 无
+
-
-
-
-
-
+
diff --git a/src/modules/system/plugins/PluginList.vue b/src/modules/system/plugins/PluginList.vue
index 7ae1acf6..765f9d84 100644
--- a/src/modules/system/plugins/PluginList.vue
+++ b/src/modules/system/plugins/PluginList.vue
@@ -27,7 +27,7 @@ const dialog = useDialog();
const handleRouteToDetail = (plugin: Plugin) => {
router.push({
name: "PluginDetail",
- params: { pluginName: plugin.metadata.name },
+ params: { name: plugin.metadata.name },
});
};
diff --git a/src/modules/system/plugins/PluginSetting.vue b/src/modules/system/plugins/PluginSetting.vue
new file mode 100644
index 00000000..aea0b2f5
--- /dev/null
+++ b/src/modules/system/plugins/PluginSetting.vue
@@ -0,0 +1,149 @@
+
+
+
+
diff --git a/src/modules/system/plugins/module.ts b/src/modules/system/plugins/module.ts
index e259d873..6dbe4144 100644
--- a/src/modules/system/plugins/module.ts
+++ b/src/modules/system/plugins/module.ts
@@ -1,5 +1,11 @@
-import { BasicLayout, definePlugin } from "@halo-dev/admin-shared";
+import {
+ BasicLayout,
+ BlankLayout,
+ definePlugin,
+ PluginLayout,
+} from "@halo-dev/admin-shared";
import PluginList from "./PluginList.vue";
+import PluginSetting from "./PluginSetting.vue";
import PluginDetail from "./PluginDetail.vue";
import { IconPlug } from "@halo-dev/components";
@@ -9,23 +15,37 @@ export default definePlugin({
routes: [
{
path: "/plugins",
- component: BasicLayout,
+ component: BlankLayout,
children: [
{
path: "",
- name: "Plugins",
- component: PluginList,
- meta: {
- permissions: ["system:plugins:view"],
- },
+ component: BasicLayout,
+ children: [
+ {
+ path: "",
+ name: "Plugins",
+ component: PluginList,
+ meta: {
+ permissions: ["system:plugins:view"],
+ },
+ },
+ ],
},
{
- path: ":pluginName",
- name: "PluginDetail",
- component: PluginDetail,
- meta: {
- permissions: ["system:plugins:view"],
- },
+ path: ":name",
+ component: PluginLayout,
+ children: [
+ {
+ path: "detail",
+ name: "PluginDetail",
+ component: PluginDetail,
+ },
+ {
+ path: "settings/:group",
+ name: "PluginSetting",
+ component: PluginSetting,
+ },
+ ],
},
],
},
diff --git a/src/modules/system/roles/RoleDetail.vue b/src/modules/system/roles/RoleDetail.vue
index 694c18d5..aeb51865 100644
--- a/src/modules/system/roles/RoleDetail.vue
+++ b/src/modules/system/roles/RoleDetail.vue
@@ -311,8 +311,9 @@ onMounted(() => {
:to="{
name: 'PluginDetail',
params: {
- pluginName:
- group.roles[0].metadata.labels?.[pluginLabels.NAME],
+ name: group.roles[0].metadata.labels?.[
+ pluginLabels.NAME
+ ],
},
}"
class="hover:text-blue-600"