From 99dfccfdf790a7938dc0dc4f69a988c22abcb845 Mon Sep 17 00:00:00 2001 From: share121 Date: Sat, 28 Feb 2026 11:52:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=BC=80=E6=9C=BA?= =?UTF-8?q?=E8=87=AA=E5=90=AF=E6=97=B6=EF=BC=8C=E7=AA=97=E5=8F=A3=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/main.rs | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f35ea1d..2b4ef22 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1686,7 +1686,7 @@ dependencies = [ [[package]] name = "fast-down-gui" -version = "0.1.37" +version = "0.1.38" dependencies = [ "arboard", "auto-launch", diff --git a/Cargo.toml b/Cargo.toml index 54265a0..4bf8326 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fast-down-gui" -version = "0.1.37" +version = "0.1.38" edition = "2024" license = "MIT" authors = ["share121 <2854631158@qq.com>"] diff --git a/src/main.rs b/src/main.rs index 3d02102..1d81e3e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -73,6 +73,7 @@ async fn main() -> color_eyre::Result<()> { { let _ = auto.enable().log_err("启用开机自启失败"); } + let args: Vec<_> = std::env::args().collect(); let entries = db.inner.data.iter().map(|e| e.to_entry_data(*e.key())); let list_model = Rc::new(VecModel::from_iter(entries)); @@ -299,7 +300,9 @@ async fn main() -> color_eyre::Result<()> { let _ = open::that(DB_DIR.as_os_str()).log_err("打开日志文件夹失败"); }); - ui.show()?; + if args.iter().all(|s| s != "--hidden") { + ui.show()?; + } slint::run_event_loop_until_quit()?; Ok(()) }