Fix router address button

This commit is contained in:
Leon Böttger committed 2025-05-15 17:55:52 +02:00
1 parent c18a240ab3
commit 6ea0782565
3 files changed
+56 -29

No files matched your search

+21 -19
View File
@@ -205,16 +205,17 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
func openAlert(type: AlertType) {
// Create an NSWindow to host the SwiftUI view
let alertWindow = NSWindow(
contentRect: NSRect(x: 0, y: 0, width: issueViewWidth, height: issueViewHeight),
styleMask: [.titled, .closable],
backing: .buffered,
defer: false
)
switch type {
DispatchQueue.main.async { [self] in
// Create an NSWindow to host the SwiftUI view
let alertWindow = NSWindow(
contentRect: NSRect(x: 0, y: 0, width: issueViewWidth, height: issueViewHeight),
styleMask: [.titled, .closable],
backing: .buffered,
defer: false
)
switch type {
case .ApIsolation:
apIsolationAlertWindow = alertWindow
alertWindow.contentView = NSHostingView(rootView: ApIsolationIssueView())
@@ -224,16 +225,17 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
case .Firewall:
firewallAlertWindow = alertWindow
alertWindow.contentView = NSHostingView(rootView: FirewallIssueView())
}
alertWindow.title = "QuickDrop"
alertWindow.center()
alertWindow.isReleasedWhenClosed = false
alertWindow.setFrameAutosaveName(type.rawValue)
NSApp.activate(ignoringOtherApps: true)
alertWindow.makeKeyAndOrderFront(nil)
alertWindow.level = .normal
}
alertWindow.title = "QuickDrop"
alertWindow.center()
alertWindow.isReleasedWhenClosed = false
alertWindow.setFrameAutosaveName(type.rawValue)
NSApp.activate(ignoringOtherApps: true)
alertWindow.makeKeyAndOrderFront(nil)
alertWindow.level = .normal
}