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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Import connections and passwords from DataGrip, including SSH tunnels and SSL settings. The source app doesn't need to be running. (#1374)

### Changed

- Active Connections is now a searchable popover anchored to the toolbar that closes on Escape or clicking outside, instead of a modal dialog. (#1350)

### Fixed

- Raw SQL filter now suggests columns and keywords at every position in the expression, including after AND and OR, instead of only the first column. (#1346)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import SwiftUI
import TableProPluginKit

struct ConnectionToolbarButton: View {
let coordinator: MainContentCoordinator
@Bindable var coordinator: MainContentCoordinator

var body: some View {
Button {
Expand All @@ -18,6 +18,9 @@ struct ConnectionToolbarButton: View {
Label("Connection", systemImage: "network")
}
.help(String(localized: "Switch Connection (⌘⌥C)"))
.popover(isPresented: $coordinator.isConnectionSwitcherShown, arrowEdge: .bottom) {
ConnectionSwitcherPopover()
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion TablePro/Views/Main/MainContentCommandActions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ final class MainContentCommandActions {
}

func openConnectionSwitcher() {
coordinator?.activeSheet = .connectionSwitcher
coordinator?.isConnectionSwitcherShown = true
}

// MARK: - Undo/Redo (Group A — Called Directly)
Expand Down
3 changes: 1 addition & 2 deletions TablePro/Views/Main/MainContentCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ struct DisplayFormatsCacheEntry {
/// Uses a single `.sheet(item:)` modifier instead of multiple `.sheet(isPresented:)`.
enum ActiveSheet: Identifiable {
case quickSwitcher
case connectionSwitcher
case sqlPreview
case exportDialog
case importDialog
Expand All @@ -56,7 +55,6 @@ enum ActiveSheet: Identifiable {
var id: String {
switch self {
case .quickSwitcher: "quickSwitcher"
case .connectionSwitcher: "connectionSwitcher"
case .sqlPreview: "sqlPreview"
case .exportDialog: "exportDialog"
case .importDialog: "importDialog"
Expand Down Expand Up @@ -157,6 +155,7 @@ final class MainContentCoordinator {
var tableMetadata: TableMetadata?
var activeSheet: ActiveSheet?
var isDatabaseSwitcherShown = false
var isConnectionSwitcherShown = false
var databaseToDrop: String?
var importFileURL: URL?
var exportPreselectedTableNames: Set<String>?
Expand Down
2 changes: 0 additions & 2 deletions TablePro/Views/Main/MainContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,6 @@ struct MainContentView: View {
databaseType: connection.type,
onSelect: coordinator.handleQuickSwitcherSelection
)
case .connectionSwitcher:
ConnectionSwitcherSheet(isPresented: dismissBinding)
case .sqlPreview:
SQLReviewSheet(
isPresented: dismissBinding,
Expand Down
Loading
Loading