feat: 新增隧道管理功能,前后端完整实现
- 新增统一 ApiResponse 类型定义,与 Rust 端响应结构对齐 - 新增 Rust 后端隧道数据库表、模型、命令和 API 接口 - 新增前端隧道类型定义、API 调用、卡片组件和表单弹窗 - 新增中英双语隧道相关国际化文案 - 更新服务器类型定义,引入共享的 ApiResponse
This commit is contained in:
+1
-7
@@ -2,13 +2,7 @@
|
||||
* 服务器相关的类型定义,字段与 Rust 端 `models::Server` / `models::ServerPayload` 一一对应。
|
||||
*/
|
||||
|
||||
/** 统一响应结构,对应 Rust 端 `models::ApiResponse<T>` */
|
||||
export interface ApiResponse<T = unknown> {
|
||||
success: boolean
|
||||
code: number
|
||||
msg: string
|
||||
data: T | null
|
||||
}
|
||||
export type { ApiResponse } from "./api"
|
||||
|
||||
/** 传输协议,对应 frpc 的 transport.protocol */
|
||||
export type ServerProtocol = "tcp" | "kcp" | "quic" | "websocket"
|
||||
|
||||
Reference in New Issue
Block a user