From 244da3731831d15ee36ffc5b840c6df4596db812 Mon Sep 17 00:00:00 2001 From: tigerenwork Date: Sun, 5 Jul 2026 21:10:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E7=AA=97=E5=8F=A3=E6=97=A0=E6=B3=95=E7=BD=AE=E5=89=8D=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/Views/MenuBar/BugListPopover.swift | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Sources/Views/MenuBar/BugListPopover.swift b/Sources/Views/MenuBar/BugListPopover.swift index 2e44ac4..00006cb 100644 --- a/Sources/Views/MenuBar/BugListPopover.swift +++ b/Sources/Views/MenuBar/BugListPopover.swift @@ -4,6 +4,7 @@ import SwiftUI struct BugListPopover: View { @State private var bugStore = BugStore.shared @State private var tokenManager = TokenManager.shared + @Environment(\.openSettings) private var openSettings var body: some View { VStack(spacing: 0) { @@ -90,7 +91,16 @@ struct BugListPopover: View { Button("Refresh") { Task { await PollerService.shared.fetchNow() } } - SettingsLink { + Button { + openSettings() + // Bugger runs as an accessory (no Dock icon), so the Settings + // window would otherwise open behind whatever is frontmost. + // Activate on the next runloop pass, once the window exists, + // to bring it on top. + DispatchQueue.main.async { + NSRunningApplication.current.activate(options: [.activateAllWindows]) + } + } label: { Label("Settings", systemImage: "gear") } Button(action: { NSApp.terminate(nil) }) {