diff --git a/src-tauri/src/cmds.rs b/src-tauri/src/cmds.rs index 0b66ded..8db4a3e 100644 --- a/src-tauri/src/cmds.rs +++ b/src-tauri/src/cmds.rs @@ -322,18 +322,18 @@ pub async fn check_app_update( let use_mirror = use_mirror.unwrap_or(false); let include_prerelease = include_prerelease.unwrap_or(false); - println!("[检查更新命令] 当前应用版本: {}", current_version); - println!("[检查更新命令] 使用镜像: {}", use_mirror); - println!("[检查更新命令] 包含预发布版本: {}", include_prerelease); - if let Some(ref ep) = endpoint { - println!("[检查更新命令] 自定义端点: {}", ep); - } + // println!("[检查更新命令] 当前应用版本: {}", current_version); + // println!("[检查更新命令] 使用镜像: {}", use_mirror); + // println!("[检查更新命令] 包含预发布版本: {}", include_prerelease); + // if let Some(ref ep) = endpoint { + // println!("[检查更新命令] 自定义端点: {}", ep); + // } // 从环境变量获取 GitHub 仓库信息,如果没有则使用默认值 const DEFAULT_GITHUB_REPO: &str = "plsgo/cstb"; let github_repo_str = std::env::var("GITHUB_REPO").ok(); let github_repo = github_repo_str.as_deref().unwrap_or(DEFAULT_GITHUB_REPO); - println!("[检查更新命令] GitHub 仓库: {}", github_repo); + // println!("[检查更新命令] GitHub 仓库: {}", github_repo); let result = wrap_err!(check_update( endpoint.as_deref(), @@ -343,11 +343,11 @@ pub async fn check_app_update( include_prerelease ).await)?; - if result.is_some() { - println!("[检查更新命令] ✓ 返回更新信息"); - } else { - println!("[检查更新命令] ✗ 无更新可用"); - } + // if result.is_some() { + // println!("[检查更新命令] ✓ 返回更新信息"); + // } else { + // println!("[检查更新命令] ✗ 无更新可用"); + // } Ok(result) } diff --git a/src/components/cstb/UpdateChecker.tsx b/src/components/cstb/UpdateChecker.tsx index 6e66f9c..f453d40 100644 --- a/src/components/cstb/UpdateChecker.tsx +++ b/src/components/cstb/UpdateChecker.tsx @@ -113,9 +113,6 @@ export function UpdateChecker({ useMirror = true, customEndpoint, includePrerele if (useMirror) { downloadUrl = `https://cdn.upup.cool/${downloadUrl}` } - - // 打印最终下载链接 - console.log("[下载更新] 最终下载链接:", downloadUrl) const path = await invoke("download_app_update", { downloadUrl: downloadUrl, @@ -278,11 +275,14 @@ export function UpdateChecker({ useMirror = true, customEndpoint, includePrerele value={downloadProgress} color="primary" size="sm" - showValueLabel={false} + showValueLabel={true} + classNames={{ + value: "text-xs text-zinc-500 dark:text-zinc-400", + }} /> - + {/* {downloadProgress}% - + */} )}