Desktop: Open links in default browser and prevent popups (#3006)

* Deny all browser popups

* Open links with default browser

* Fix review comments
This commit is contained in:
Timon
2025-08-06 15:28:10 +00:00
committed by GitHub
parent 0462d0ea2f
commit 5f2432cacf
7 changed files with 124 additions and 5 deletions
+9
View File
@@ -107,6 +107,15 @@ impl WinitApp {
}
}
for message in responses.extract_if(.., |m| matches!(m, FrontendMessage::TriggerVisitLink { .. })) {
let _ = thread::spawn(move || {
let FrontendMessage::TriggerVisitLink { url } = message else { unreachable!() };
if let Err(e) = open::that(&url) {
tracing::error!("Failed to open URL: {}: {}", url, e);
}
});
}
if responses.is_empty() {
return;
}