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

### Added

- Previous Page, Next Page, First Page, and Last Page are now in the Query menu, so the result pager is discoverable and keyboard-reachable from the menu bar (Previous and Next keep their Cmd+[ and Cmd+] shortcuts). (#1490)
- Keyboard control of the sidebar: focus the filter field (Cmd+Option+F), and switch between the Tables and Favorites sidebars (Ctrl+1 and Ctrl+2). From the filter field, Tab or the Down arrow moves into the list. All three are rebindable in Settings, Keyboard. (#1490)
- Mark a table as a favorite by clicking the star button at the end of its sidebar row. Favorites are scoped to the connection, database, and schema, pinned to the top of their section, appear in a dedicated Tables group in the Favorites tab, and sync through iCloud when the Table Favorites toggle is on.
- A plus button in the bottom bar of the Tables sidebar opens a menu to create a new table or view, without right-clicking. It's disabled while safe mode blocks writes.
Expand Down
26 changes: 26 additions & 0 deletions TablePro/TableProApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,32 @@ struct AppMenuCommands: Commands {

Divider()

Button(String(localized: "Previous Page")) {
actions?.goToPreviousPage()
}
.optionalKeyboardShortcut(shortcut(for: .previousPage))
.disabled(!(actions?.isConnected ?? false))

Button(String(localized: "Next Page")) {
actions?.goToNextPage()
}
.optionalKeyboardShortcut(shortcut(for: .nextPage))
.disabled(!(actions?.isConnected ?? false))

Button(String(localized: "First Page")) {
actions?.goToFirstPage()
}
.optionalKeyboardShortcut(shortcut(for: .firstPage))
.disabled(!(actions?.isConnected ?? false))

Button(String(localized: "Last Page")) {
actions?.goToLastPage()
}
.optionalKeyboardShortcut(shortcut(for: .lastPage))
.disabled(!(actions?.isConnected ?? false))

Divider()

Button(String(localized: "Save as Favorite")) {
actions?.saveAsFavorite()
}
Expand Down
16 changes: 16 additions & 0 deletions TablePro/Views/Main/MainContentCommandActions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,22 @@ final class MainContentCommandActions {
coordinator?.inspectorProxy?.toggleInspector()
}

func goToPreviousPage() {
coordinator?.goToPreviousPage()
}

func goToNextPage() {
coordinator?.goToNextPage()
}

func goToFirstPage() {
coordinator?.goToFirstPage()
}

func goToLastPage() {
coordinator?.goToLastPage()
}

func focusSidebarSearch() {
coordinator?.splitViewController?.focusSidebarSearch()
}
Expand Down
Loading