mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 00:35:38 +08:00
feat: enhance auto log cleaning options with 1-day retention and update related configurations
This commit is contained in:
@@ -134,7 +134,7 @@ pub struct IVerge {
|
||||
pub test_list: Option<Vec<IVergeTestItem>>,
|
||||
|
||||
/// 日志清理
|
||||
/// 0: 不清理; 1: 7天; 2: 30天; 3: 90天
|
||||
/// 0: 不清理; 1: 1天;2: 7天; 3: 30天; 4: 90天
|
||||
pub auto_log_clean: Option<i32>,
|
||||
|
||||
/// 是否启用随机端口
|
||||
|
||||
@@ -317,9 +317,13 @@ impl Handle {
|
||||
|
||||
let system_opt = handle.notification_system.read();
|
||||
if let Some(system) = system_opt.as_ref() {
|
||||
system.send_event(FrontendEvent::ProfileChanged { current_profile_id: profile_id });
|
||||
system.send_event(FrontendEvent::ProfileChanged {
|
||||
current_profile_id: profile_id,
|
||||
});
|
||||
} else {
|
||||
log::warn!("Notification system not initialized when trying to send ProfileChanged event.");
|
||||
log::warn!(
|
||||
"Notification system not initialized when trying to send ProfileChanged event."
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -333,7 +337,9 @@ impl Handle {
|
||||
if let Some(system) = system_opt.as_ref() {
|
||||
system.send_event(FrontendEvent::TimerUpdated { profile_index });
|
||||
} else {
|
||||
log::warn!("Notification system not initialized when trying to send TimerUpdated event.");
|
||||
log::warn!(
|
||||
"Notification system not initialized when trying to send TimerUpdated event."
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -347,7 +353,9 @@ impl Handle {
|
||||
if let Some(system) = system_opt.as_ref() {
|
||||
system.send_event(FrontendEvent::StartupCompleted);
|
||||
} else {
|
||||
log::warn!("Notification system not initialized when trying to send StartupCompleted event.");
|
||||
log::warn!(
|
||||
"Notification system not initialized when trying to send StartupCompleted event."
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user