feat: add allow auto update option for profiles and update UI components

This commit is contained in:
Tunglies
2025-10-18 17:03:12 +08:00
parent 98725bbecf
commit c2d7bf296a
7 changed files with 37 additions and 2 deletions

View File

@@ -45,6 +45,14 @@ pub async fn update_profile(
} else if item.url.is_none() {
log::warn!(target: "app", "[订阅更新] {uid} 缺少URL无法更新");
bail!("failed to get the profile item url");
} else if !item
.option
.as_ref()
.and_then(|o| o.allow_auto_update)
.unwrap_or(true)
{
log::info!(target: "app", "[订阅更新] {} 禁止自动更新,跳过更新", uid);
None
} else {
log::info!(target: "app",
"[订阅更新] {} 是远程订阅URL: {}",