- 集成 tauri-plugin-opener:Cargo/lib.rs/capabilities/npm 四处接线,新增 src/openExternal.ts(桌面走 opener,浏览器回退 window.open,相对路径绝对化) - 关于页 4 个链接、活动栏官网菜单、代理错误横幅 2 处健康检查链接全部改走 openExternal,桌面端可正常跳转 - 设置→外观 主题顺序调整为 深色/浅色/跟随系统 - release 二进制重编并验证(浏览器实测关于页链接可开文档页) - 附带工作区中未提交的扁平化重构现状(另一会话进行中) - homepage 落地页与文档终检通过(8787 / 与 /docs 双 200)
65 lines
1.4 KiB
Rust
65 lines
1.4 KiB
Rust
use serde::{Deserialize, Serialize};
|
|
use std::collections::HashMap;
|
|
|
|
#[derive(Debug, Deserialize)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct BodySpec {
|
|
pub mode: String,
|
|
pub raw: Option<String>,
|
|
}
|
|
|
|
#[derive(Debug, Deserialize)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct HttpSpec {
|
|
pub method: String,
|
|
pub url: String,
|
|
#[serde(default)]
|
|
pub headers: HashMap<String, String>,
|
|
pub query: Option<HashMap<String, String>>,
|
|
pub body: Option<BodySpec>,
|
|
pub timeout_ms: Option<u64>,
|
|
pub proxy: Option<ProxySettings>,
|
|
}
|
|
|
|
#[derive(Debug, Serialize)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct HttpResult {
|
|
pub status: u16,
|
|
pub headers: HashMap<String, String>,
|
|
pub body: String,
|
|
pub time_ms: u128,
|
|
pub size: usize,
|
|
}
|
|
|
|
#[derive(Debug, Deserialize)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct WsSpec {
|
|
pub url: String,
|
|
pub protocols: Option<Vec<String>>,
|
|
#[serde(default)]
|
|
pub headers: HashMap<String, String>,
|
|
}
|
|
|
|
#[derive(Clone, Serialize)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct WsEvent {
|
|
pub session_id: String,
|
|
pub kind: String,
|
|
pub data: String,
|
|
}
|
|
|
|
#[derive(Debug, Deserialize)]
|
|
pub struct ProxySettings {
|
|
pub mode: String,
|
|
pub http: String,
|
|
pub https: String,
|
|
pub bypass: String,
|
|
pub auth: Option<ProxyAuth>,
|
|
}
|
|
|
|
#[derive(Debug, Deserialize)]
|
|
pub struct ProxyAuth {
|
|
pub username: String,
|
|
pub password: String,
|
|
}
|