Release NapCat / validate-version (push) Canceled after 0s
Release NapCat / Build-Framework (push) Canceled after 0s
Release NapCat / Build-Shell (push) Canceled after 0s
Release NapCat / Download-QNX64 (push) Canceled after 0s
Release NapCat / release-napcat (push) Canceled after 0s
Introduces a new SSE-based plugin installation API for real-time progress updates and adds frontend support for selecting download mirrors, especially for GitHub-based plugins. Refactors backend plugin directory handling, improves logging, and updates the frontend to use the new API with user-selectable mirrors and progress feedback.
19 lines
899 B
TypeScript
19 lines
899 B
TypeScript
import { Router } from 'express';
|
|
import { GetPluginListHandler, ReloadPluginHandler, SetPluginStatusHandler, UninstallPluginHandler } from '@/napcat-webui-backend/src/api/Plugin';
|
|
import { GetPluginStoreListHandler, GetPluginStoreDetailHandler, InstallPluginFromStoreHandler, InstallPluginFromStoreSSEHandler } 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);
|
|
router.get('/Store/Install/SSE', InstallPluginFromStoreSSEHandler);
|
|
|
|
export { router as PluginRouter };
|