From 36241ce8ff513965c9f9a3852deda6abe93413b0 Mon Sep 17 00:00:00 2001 From: gyanano <1624055384@qq.com> Date: Wed, 2 Sep 2026 10:06:59 -0700 Subject: [PATCH] fix(ui): open release notes in the system browser MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plain is a no-op inside the Tauri webview, so the "view release notes" button in Settings did nothing. Add a small open_url command that hands http(s) URLs to the OS opener (macOS open / Windows rundll32 / Linux xdg-open) — the same mechanism the installer launcher already uses — and wire the button through it. --- frontend/src/components/SettingsModal.tsx | 17 ++++++++---- src-tauri/src/main.rs | 8 +++++- src-tauri/src/updater.rs | 34 +++++++++++++++++++++++ 3 files changed, 53 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/SettingsModal.tsx b/frontend/src/components/SettingsModal.tsx index c9e5b79..96771d5 100644 --- a/frontend/src/components/SettingsModal.tsx +++ b/frontend/src/components/SettingsModal.tsx @@ -318,6 +318,15 @@ const SettingsModal: React.FC = ({ open, onOpenChange }) => }; // Download update + const handleViewReleaseNotes = async () => { + if (!updateInfo?.release_url) return; + try { + await invoke('open_url', { url: updateInfo.release_url }); + } catch (error) { + console.error('Failed to open release notes:', error); + } + }; + const handleDownloadUpdate = async () => { if (!updateInfo?.download_url || !updateInfo?.asset_name) return; @@ -726,11 +735,9 @@ const SettingsModal: React.FC = ({ open, onOpenChange }) => -