Add backend and frontend support for NapCat auto-update
Introduces backend API and router for updating NapCat, including update logic and pending update application on startup. Adds frontend integration with update button and request handling. Refactors system info component to remove legacy new version tip. Updates types and runtime to track working environment for update selection. Implements lazy loading for pty in unixTerminal to avoid early initialization.
This commit is contained in:
1 parent
907861102b
commit
acdd56eb5e
11 files changed
+641
-164
No files matched your search
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* @file UpdateNapCat路由
|
||||
*/
|
||||
|
||||
import { Router } from 'express';
|
||||
import { UpdateNapCatHandler } from '@/napcat-webui-backend/src/api/UpdateNapCat';
|
||||
|
||||
const router = Router();
|
||||
|
||||
// POST /api/UpdateNapCat/update - 更新NapCat
|
||||
router.post('/update', UpdateNapCatHandler);
|
||||
|
||||
export { router as UpdateNapCatRouter };
|
||||
@@ -14,6 +14,7 @@ import { LogRouter } from '@/napcat-webui-backend/src/router/Log';
|
||||
import { BaseRouter } from '@/napcat-webui-backend/src/router/Base';
|
||||
import { FileRouter } from './File';
|
||||
import { WebUIConfigRouter } from './WebUIConfig';
|
||||
import { UpdateNapCatRouter } from './UpdateNapCat';
|
||||
|
||||
const router = Router();
|
||||
|
||||
@@ -38,5 +39,7 @@ router.use('/Log', LogRouter);
|
||||
router.use('/File', FileRouter);
|
||||
// router:WebUI配置相关路由
|
||||
router.use('/WebUIConfig', WebUIConfigRouter);
|
||||
// router:更新NapCat相关路由
|
||||
router.use('/UpdateNapCat', UpdateNapCatRouter);
|
||||
|
||||
export { router as ALLRouter };
|
||||
Reference in new issue
Block a user