mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-05 23:19:37 +00:00
Implemented plugin store API endpoints and types in the backend, including mock data and handlers for listing, detail, and install actions. Added plugin store page, card component, and related logic to the frontend, with navigation and categorized browsing. Updated plugin manager controller and site config to support the new plugin store functionality.
18 lines
797 B
TypeScript
18 lines
797 B
TypeScript
import { Router } from 'express';
|
|
import { GetPluginListHandler, ReloadPluginHandler, SetPluginStatusHandler, UninstallPluginHandler } from '@/napcat-webui-backend/src/api/Plugin';
|
|
import { GetPluginStoreListHandler, GetPluginStoreDetailHandler, InstallPluginFromStoreHandler } from '@/napcat-webui-backend/src/api/PluginStore';
|
|
|
|
const router: Router = Router();
|
|
|
|
router.get('/List', GetPluginListHandler);
|
|
router.post('/Reload', ReloadPluginHandler);
|
|
router.post('/SetStatus', SetPluginStatusHandler);
|
|
router.post('/Uninstall', UninstallPluginHandler);
|
|
|
|
// 插件商店相关路由
|
|
router.get('/Store/List', GetPluginStoreListHandler);
|
|
router.get('/Store/Detail/:id', GetPluginStoreDetailHandler);
|
|
router.post('/Store/Install', InstallPluginFromStoreHandler);
|
|
|
|
export { router as PluginRouter };
|