macos better alert

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-02-19 21:11:17 +08:00
parent 30c795dc4f
commit e1254c0b24
2 changed files with 23 additions and 13 deletions

View File

@@ -6,14 +6,15 @@ use hbb_common::platform::macos;
fn main() {
#[cfg(target_os = "linux")]
linux::system_message("test title", "test message", true).ok();
let res = linux::system_message("test title", "test message", true);
#[cfg(target_os = "macos")]
macos::alert(
"RustDesk".to_owned(),
let res = macos::alert(
"System Preferences".to_owned(),
"warning".to_owned(),
"test title".to_owned(),
"test message".to_owned(),
["Ok".to_owned()].to_vec(),
)
.ok();
);
#[cfg(any(target_os = "linux", target_os = "macos"))]
println!("result {:?}", &res);
}