feat(update): 应用内更新提示支持英文 release notes

This commit is contained in:
t8y2 committed 2026-07-07 00:26:56 +08:00
1 parent f45011977f
commit 9cbe857a2a
11 files changed
+214 -20

No files matched your search

+3 -2
View File
@@ -90,8 +90,9 @@ fn tag_version(version: &str) -> String {
}
#[tauri::command]
pub async fn check_for_updates() -> Result<UpdateInfo, String> {
let release = dbx_core::update::fetch_latest_release().await?;
pub async fn check_for_updates(locale: Option<String>) -> Result<UpdateInfo, String> {
let locale = locale.unwrap_or_else(|| "zh-CN".to_string());
let release = dbx_core::update::fetch_latest_release(&locale).await?;
let current_version = env!("CARGO_PKG_VERSION");
let mut info = dbx_core::update::build_update_info(release, current_version);
info.portable_mode = crate::data_dir::is_portable_mode();