mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-03-01 08:10:25 +00:00
Add plugin WebUI extension page and API routing support
Introduces a plugin router registry for registering plugin-specific API routes, static resources, and extension pages. Updates the plugin manager and context to expose the router, and implements backend and frontend support for serving and displaying plugin extension pages in the WebUI. Also adds a demo extension page and static resource to the builtin plugin.
This commit is contained in:
@@ -20,12 +20,31 @@ export interface PluginItem {
|
||||
status: PluginStatus;
|
||||
/** 是否有配置项 */
|
||||
hasConfig?: boolean;
|
||||
/** 是否有扩展页面 */
|
||||
hasPages?: boolean;
|
||||
}
|
||||
|
||||
/** 扩展页面信息 */
|
||||
export interface ExtensionPageItem {
|
||||
/** 插件 ID */
|
||||
pluginId: string;
|
||||
/** 插件名称 */
|
||||
pluginName: string;
|
||||
/** 页面路径 */
|
||||
path: string;
|
||||
/** 页面标题 */
|
||||
title: string;
|
||||
/** 页面图标 */
|
||||
icon?: string;
|
||||
/** 页面描述 */
|
||||
description?: string;
|
||||
}
|
||||
|
||||
/** 插件列表响应 */
|
||||
export interface PluginListResponse {
|
||||
plugins: PluginItem[];
|
||||
pluginManagerNotFound: boolean;
|
||||
extensionPages: ExtensionPageItem[];
|
||||
}
|
||||
|
||||
/** 插件配置项定义 */
|
||||
|
||||
Reference in New Issue
Block a user