Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion TablePro/Views/Backup/BackupResultSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ struct BackupResultSheet: View {
onClose()
}
.buttonStyle(.borderedProminent)
.keyboardShortcut(.return)
.keyboardShortcut(.defaultAction)
}
}
.padding(24)
Expand Down
3 changes: 2 additions & 1 deletion TablePro/Views/Connection/ConnectionGroupPicker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,14 @@ struct CreateGroupSheet: View {
Button("Cancel") {
dismiss()
}
.keyboardShortcut(.cancelAction)

Button("Create") {
onSave(groupName, groupColor, selectedParentId)
dismiss()
}
.keyboardShortcut(.return)
.buttonStyle(.borderedProminent)
.keyboardShortcut(.defaultAction)
.disabled(groupName.trimmingCharacters(in: .whitespaces).isEmpty)
}
}
Expand Down
3 changes: 2 additions & 1 deletion TablePro/Views/Connection/ConnectionTagEditor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,14 @@ private struct CreateTagSheet: View {

HStack {
Button("Cancel") { dismiss() }
.keyboardShortcut(.cancelAction)
Spacer()
Button("Create") {
onSave(tagName, tagColor)
dismiss()
}
.keyboardShortcut(.return)
.buttonStyle(.borderedProminent)
.keyboardShortcut(.defaultAction)
.disabled(tagName.trimmingCharacters(in: .whitespaces).isEmpty)
}
.padding(12)
Expand Down
16 changes: 15 additions & 1 deletion TablePro/Views/Settings/AIProviderDetailSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ struct AIProviderDetailSheet: View {
@State private var copilotService = CopilotService.shared
@State private var copilotErrorMessage: String?

@State private var showRemoveConfirmation = false

enum TestResult: Equatable {
case success
case failure(String)
Expand Down Expand Up @@ -89,6 +91,18 @@ struct AIProviderDetailSheet: View {
}
}
.frame(minWidth: 520, minHeight: 480)
.confirmationDialog(
String(format: String(localized: "Remove “%@”?"), draft.displayName),
isPresented: $showRemoveConfirmation,
titleVisibility: .visible
) {
Button(String(localized: "Remove Provider"), role: .destructive) {
onDelete?()
}
Button(String(localized: "Cancel"), role: .cancel) {}
} message: {
Text(String(localized: "The provider configuration and stored API key will be deleted."))
}
}

private var navigationTitle: String {
Expand Down Expand Up @@ -461,7 +475,7 @@ struct AIProviderDetailSheet: View {
private func deleteSection(onDelete: @escaping () -> Void) -> some View {
Section {
Button(role: .destructive) {
onDelete()
showRemoveConfirmation = true
} label: {
Label(String(localized: "Remove Provider"), systemImage: "trash")
.frame(maxWidth: .infinity)
Expand Down
1 change: 0 additions & 1 deletion TablePro/Views/Settings/LicenseActivationSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ struct LicenseActivationSheet: View {
dismiss()
}
.keyboardShortcut(.cancelAction)
.keyboardShortcut(.cancelAction)
}
}
.padding(.top, 20)
Expand Down
2 changes: 2 additions & 0 deletions TablePro/Views/Settings/Sections/PairingApprovalSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ struct PairingApprovalSheet: View {
)
onComplete(.success(approval))
}
.buttonStyle(.borderedProminent)
.keyboardShortcut(.defaultAction)
.disabled(approveDisabled)
}
}
Expand Down
Loading