Add keyboard navigation shortcuts
This commit is contained in:
@@ -182,6 +182,7 @@ private struct ChatComposer: View {
|
||||
Label("Send", systemImage: "paperplane.fill")
|
||||
.labelStyle(.iconOnly)
|
||||
}
|
||||
.keyboardShortcut(.return, modifiers: .command)
|
||||
.buttonStyle(.borderedProminent)
|
||||
.disabled(text.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty)
|
||||
.help("Send")
|
||||
|
||||
@@ -43,6 +43,7 @@ struct ProjectBrowserView: View {
|
||||
} label: {
|
||||
Label("New Project", systemImage: "plus")
|
||||
}
|
||||
.keyboardShortcut("n", modifiers: .command)
|
||||
.disabled(viewModel.isCreatingProject)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ struct ProjectInspectorView: View {
|
||||
} label: {
|
||||
Label("Save", systemImage: "tray.and.arrow.down")
|
||||
}
|
||||
.keyboardShortcut("s", modifiers: .command)
|
||||
.disabled(isSaving)
|
||||
}
|
||||
.padding(16)
|
||||
|
||||
Reference in New Issue
Block a user