feat(update): 应用内更新提示支持英文 release notes
This commit is contained in:
1 parent
f45011977f
commit
9cbe857a2a
11 files changed
+214
-20
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user