mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-03-01 08:10:25 +00:00
Disable plugin upload feature
Comment out the backend import route and corresponding frontend upload UI to disable plugin uploads. Backend: commented out POST /Import route in packages/napcat-webui-backend/src/router/Plugin.ts. Frontend: removed (commented) the upload Button and hidden file input in packages/napcat-webui-frontend/src/pages/dashboard/plugin.tsx. This temporarily prevents users from uploading plugins.
This commit is contained in:
@@ -68,7 +68,7 @@ router.post('/Config', SetPluginConfigHandler);
|
|||||||
router.get('/Config/SSE', PluginConfigSSEHandler);
|
router.get('/Config/SSE', PluginConfigSSEHandler);
|
||||||
router.post('/Config/Change', PluginConfigChangeHandler);
|
router.post('/Config/Change', PluginConfigChangeHandler);
|
||||||
router.post('/RegisterManager', RegisterPluginManagerHandler);
|
router.post('/RegisterManager', RegisterPluginManagerHandler);
|
||||||
router.post('/Import', upload.single('plugin'), ImportLocalPluginHandler);
|
// router.post('/Import', upload.single('plugin'), ImportLocalPluginHandler); // 禁用插件上传
|
||||||
router.get('/Icon/:pluginId', GetPluginIconHandler);
|
router.get('/Icon/:pluginId', GetPluginIconHandler);
|
||||||
|
|
||||||
// 插件商店相关路由
|
// 插件商店相关路由
|
||||||
|
|||||||
@@ -182,6 +182,7 @@ export default function PluginPage () {
|
|||||||
>
|
>
|
||||||
<IoMdRefresh size={24} />
|
<IoMdRefresh size={24} />
|
||||||
</Button>
|
</Button>
|
||||||
|
{/* 禁用插件上传
|
||||||
<Button
|
<Button
|
||||||
className="bg-primary-100/50 hover:bg-primary-200/50 text-primary-700 backdrop-blur-md"
|
className="bg-primary-100/50 hover:bg-primary-200/50 text-primary-700 backdrop-blur-md"
|
||||||
radius='full'
|
radius='full'
|
||||||
@@ -197,6 +198,7 @@ export default function PluginPage () {
|
|||||||
className="hidden"
|
className="hidden"
|
||||||
onChange={handleFileChange}
|
onChange={handleFileChange}
|
||||||
/>
|
/>
|
||||||
|
*/}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{pluginManagerNotFound ? (
|
{pluginManagerNotFound ? (
|
||||||
|
|||||||
Reference in New Issue
Block a user