feat(server): 添加系统重启功能支持

添加后台任务支持用于处理系统重启请求,实现延迟进程终止机制,
允许系统安全地重启并在重启后自动恢复服务。

feat(frontend): 实现前端系统重启控制面板

在状态页面添加重启对话框组件,提供用户友好的重启确认界面,
包含重启状态监控和错误处理功能,确保用户可以安全重启系统。

docs(deployment): 更新部署指南添加URL协议要求说明

详细说明NANO_AUTHZ_URL和NANO_DEPLOY_URL环境变量必须包含
http://协议前缀的要求,添加常见错误示例和容器重建步骤,
帮助用户避免注册页面502错误问题。
This commit is contained in:
2026-03-19 10:26:43 +08:00
parent 4e45f8b717
commit bfa77204bf
4 changed files with 280 additions and 16 deletions

View File

@ -529,6 +529,16 @@ export async function getStatus(): Promise<SystemStatus> {
return fetchJSON('/api/status');
}
export async function restartSystem(): Promise<{
ok: boolean;
restarting: boolean;
detail: string;
}> {
return fetchJSON('/api/system/restart', {
method: 'POST',
});
}
// ---------------------------------------------------------------------------
// Cron (proxied)
// ---------------------------------------------------------------------------