chore: 完成项目多维度优化与功能迭代

本次提交包含多项改进:
1. 新增Vitest测试配置与相关测试用例
2. 完善Deep Link监听与OAuth回调支持
3. 修复并优化多个React组件的依赖与性能
4. 更新后端API域名与端点地址
5. 优化KV存储服务实现与类型定义
6. 调整用户信息展示与权限相关逻辑
7. 重构部分业务逻辑,使用useCallback优化性能
8. 更新依赖包与Cargo.lock依赖版本
This commit is contained in:
Yukino_fox
2026-07-05 10:28:36 +08:00
parent 6f197babf6
commit 21c1183b1d
32 changed files with 1889 additions and 1280 deletions
+2 -2
View File
@@ -2128,9 +2128,9 @@ checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2"
[[package]]
name = "iri-string"
version = "0.7.11"
version = "0.7.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8e7418f59cc01c88316161279a7f665217ae316b388e58a0d10e29f54f1e5eb"
checksum = "25e659a4bb38e810ebc252e53b5814ff908a8c58c2a9ce2fae1bbec24cbf4e20"
dependencies = [
"memchr",
"serde",
+9 -9
View File
@@ -444,7 +444,7 @@ pub async fn oauth_get_authorization_url(
let code_challenge = generate_code_challenge(&code_verifier);
let url = format!(
"https://sectl.top/oauth/authorize?client_id={}&redirect_uri={}&response_type=code&state={}&code_challenge={}&code_challenge_method=S256",
"https://sectl.cn/oauth/authorize?client_id={}&redirect_uri={}&response_type=code&state={}&code_challenge={}&code_challenge_method=S256",
platform_id,
urlencoding::encode(&callback_url),
urlencoding::encode(&state),
@@ -490,7 +490,7 @@ pub async fn oauth_exchange_code(
println!("[OAuth] 请求参数:{:?}", payload);
let response = client
.post("https://appwrite.sectl.top/api/oauth/token")
.post("https://appwrite.sectl.cn/api/oauth/token")
.json(&payload)
.send()
.await
@@ -547,7 +547,7 @@ pub async fn oauth_revoke_token(
}
let response = client
.post("https://appwrite.sectl.top/api/oauth/revoke")
.post("https://appwrite.sectl.cn/api/oauth/revoke")
.json(&payload)
.send()
.await
@@ -574,7 +574,7 @@ pub async fn oauth_introspect_token(
let client = &state_guard.http_client;
let response = client
.post("https://appwrite.sectl.top/api/oauth/introspect")
.post("https://appwrite.sectl.cn/api/oauth/introspect")
.json(&serde_json::json!({
"token": token,
"client_id": platform_id,
@@ -613,7 +613,7 @@ pub async fn oauth_get_user_info(
let client = &state_guard.http_client;
let response = client
.get("https://appwrite.sectl.top/api/oauth/userinfo")
.get("https://appwrite.sectl.cn/api/oauth/userinfo")
.header("Authorization", format!("Bearer {}", access_token))
.send()
.await
@@ -664,7 +664,7 @@ pub async fn oauth_refresh_token(
let client = &state_guard.http_client;
let response = client
.post("https://appwrite.sectl.top/api/oauth/token")
.post("https://appwrite.sectl.cn/api/oauth/refresh")
.json(&serde_json::json!({
"grant_type": "refresh_token",
"refresh_token": refresh_token,
@@ -719,7 +719,7 @@ pub async fn oauth_get_storage_usage(
let client = &state_guard.http_client;
let response = client
.get("https://appwrite.sectl.top/api/cloud/storage/usage")
.get("https://appwrite.sectl.cn/api/cloud-storage/usage")
.query(&[("client_id", platform_id), ("user_id", user_id)])
.header("Authorization", format!("Bearer {}", access_token))
.send()
@@ -787,7 +787,7 @@ pub async fn oauth_report_online(
}
let response = client
.post("https://appwrite.sectl.top/api/stats/online")
.post("https://appwrite.sectl.cn/api/stats/online")
.json(&payload)
.send()
.await
@@ -911,7 +911,7 @@ pub async fn oauth_refresh_access_token(
println!("[OAuth] 刷新 token 请求参数: {:?}", payload);
let response = client
.post("https://appwrite.sectl.top/api/oauth/token")
.post("https://appwrite.sectl.cn/api/oauth/refresh")
.json(&payload)
.send()
.await