Add settings for batch auth handling. (#870)

This commit is contained in:
Max Goedjen authored and GitHub committed 2026-11-17 07:15:56 +00:00
1 parent 164aacc94e
commit 56c2f841ed
10 files changed
+191 -20

No files matched your search

@@ -3,11 +3,14 @@ import SecretKit
import SecretAgentKit
import SmartCardSecretKit
import Common
import ApplicationServices
import SettingsKit
struct PendingRequestsView: View {
private let authenticationHandler: any AuthenticationHandlerProtocol
@Environment(\.dismissWindow) var dismiss
@Environment(\.settingsStore) var settingsStore
init(authenticationHandler: some AuthenticationHandlerProtocol) {
self.authenticationHandler = authenticationHandler
@@ -92,6 +95,19 @@ struct PendingRequestsView: View {
}
}
.safeAreaPadding(20)
.onAppear {
guard settingsStore.showDockItemWithPendingRequestsScreen else { return }
var process = ProcessSerialNumber(highLongOfPSN: 0, lowLongOfPSN: UInt32(kCurrentProcess))
unsafe TransformProcessType(&process, ProcessApplicationTransformState(kProcessTransformToForegroundApplication))
NSApplication.shared.dockTile.showsApplicationBadge = true
NSApplication.shared.dockTile.display()
NSApplication.shared.requestUserAttention(.criticalRequest)
}
.onDisappear {
guard settingsStore.showDockItemWithPendingRequestsScreen else { return }
var process = ProcessSerialNumber(highLongOfPSN: 0, lowLongOfPSN: UInt32(kCurrentProcess))
unsafe TransformProcessType(&process, ProcessApplicationTransformState(kProcessTransformToBackgroundApplication))
}
}
}