disable dev log
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -114,9 +114,6 @@ export function UpdateChecker({ useMirror = true, customEndpoint, includePrerele
|
||||
downloadUrl = `https://cdn.upup.cool/${downloadUrl}`
|
||||
}
|
||||
|
||||
// 打印最终下载链接
|
||||
console.log("[下载更新] 最终下载链接:", downloadUrl)
|
||||
|
||||
const path = await invoke<string>("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",
|
||||
}}
|
||||
/>
|
||||
<span className="text-xs text-zinc-500 dark:text-zinc-400">
|
||||
{/* <span className="text-xs text-zinc-500 dark:text-zinc-400">
|
||||
{downloadProgress}%
|
||||
</span>
|
||||
</span> */}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user