Fix hotkey checks and settings UI
This commit is contained in:
parent
3e609d1e3b
commit
ccfc077cc1
@ -168,7 +168,7 @@ struct ContentView: View {
|
||||
private var isSetupComplete: Bool {
|
||||
hasLoadedData &&
|
||||
whisperState.currentTranscriptionModel != nil &&
|
||||
KeyboardShortcuts.getShortcut(for: .toggleMiniRecorder) != nil &&
|
||||
hotkeyManager.selectedHotkey1 != .none &&
|
||||
AXIsProcessTrusted() &&
|
||||
CGPreflightScreenCaptureAccess()
|
||||
}
|
||||
|
||||
@ -69,7 +69,7 @@ struct MetricsView: View {
|
||||
private var isSetupComplete: Bool {
|
||||
hasLoadedData &&
|
||||
whisperState.currentTranscriptionModel != nil &&
|
||||
KeyboardShortcuts.getShortcut(for: .toggleMiniRecorder) != nil &&
|
||||
hotkeyManager.selectedHotkey1 != .none &&
|
||||
AXIsProcessTrusted() &&
|
||||
CGPreflightScreenCaptureAccess()
|
||||
}
|
||||
|
||||
@ -183,6 +183,7 @@ struct PermissionCard: View {
|
||||
}
|
||||
|
||||
struct PermissionsView: View {
|
||||
@EnvironmentObject private var hotkeyManager: HotkeyManager
|
||||
@StateObject private var permissionManager = PermissionManager()
|
||||
|
||||
var body: some View {
|
||||
@ -216,7 +217,7 @@ struct PermissionsView: View {
|
||||
icon: "keyboard",
|
||||
title: "Keyboard Shortcut",
|
||||
description: "Set up a keyboard shortcut to use VoiceInk anywhere",
|
||||
isGranted: permissionManager.isKeyboardShortcutSet,
|
||||
isGranted: hotkeyManager.selectedHotkey1 != .none,
|
||||
buttonTitle: "Configure Shortcut",
|
||||
buttonAction: {
|
||||
NotificationCenter.default.post(
|
||||
|
||||
@ -48,7 +48,7 @@ struct SettingsView: View {
|
||||
}
|
||||
|
||||
// "Add another hotkey" button
|
||||
if hotkeyManager.selectedHotkey2 == .none {
|
||||
if hotkeyManager.selectedHotkey1 != .none && hotkeyManager.selectedHotkey2 == .none {
|
||||
HStack {
|
||||
Spacer()
|
||||
Button(action: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user