Add per-UIN NapCat config and core UI
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

Backend: add per-UIN config support (napcat_{uin}.json) with read/write helpers, handlers (GetUinConfig/SetUinConfig) and router entries; handlers check login status via WebUiDataRuntime and fall back to napcat.json when needed. Frontend: add QQManager methods to get/set per-UIN config, new CoreConfigCard React component for core settings (autoTimeSync, fileLog, consoleLog) and register it in the config page tabs. Types: expose autoTimeSync in NapCatConfig type. Config writes create config directory and merge updates with existing per-UIN config.
This commit is contained in:
手瓜一十雪 committed 2026-03-05 16:35:51 +08:00
1 parent 2dcba633ba
commit d2d0b258bc
7 files changed
+294 -5

No files matched your search

@@ -1,12 +1,16 @@
import { Router } from 'express';
import { NapCatGetConfigHandler, NapCatSetConfigHandler } from '@/napcat-webui-backend/src/api/NapCatConfig';
import { NapCatGetConfigHandler, NapCatSetConfigHandler, NapCatGetUinConfigHandler, NapCatSetUinConfigHandler } from '@/napcat-webui-backend/src/api/NapCatConfig';
const router: Router = Router();
// router:获取 NapCat 配置
// router:获取 NapCat 配置(napcat.json 登录前配置)
router.get('/GetConfig', NapCatGetConfigHandler);
// router:设置 NapCat 配置
// router:设置 NapCat 配置(napcat.json 登录前配置)
router.post('/SetConfig', NapCatSetConfigHandler);
// router:获取 NapCat per-uin 配置(napcat_{uin}.json 登录后配置)
router.get('/GetUinConfig', NapCatGetUinConfigHandler);
// router:设置 NapCat per-uin 配置(napcat_{uin}.json 登录后配置)
router.post('/SetUinConfig', NapCatSetUinConfigHandler);
export { router as NapCatConfigRouter };