This commit is contained in:
pandadev 2024-08-05 15:27:18 +02:00
commit ac5db4c632
No known key found for this signature in database
GPG key ID: C39629DACB8E762F
5 changed files with 50 additions and 6 deletions

View file

@ -15,15 +15,15 @@ pub async fn check_for_updates(app: AppHandle) {
let new_ver = &update.version;
let mut msg = String::new();
msg.extend([
&format!("New Version: {new_ver}\nCurrent Version: {cur_ver}\n\n"),
&format!("{cur_ver} -> {new_ver}\n\n"),
"Would you like to install it now?",
]);
app.dialog()
.message(msg)
.title("Update Available")
.ok_button_label("Yes")
.cancel_button_label("No")
.ok_button_label("Install")
.cancel_button_label("Cancel")
.show(move |response| {
if !response {
return;
@ -43,4 +43,4 @@ pub async fn check_for_updates(app: AppHandle) {
println!("Failed to check for updates: {:?}", e);
}
}
}
}