Improved progress display

Previously, the progress bar updated only after completing an entire table.

For large tables such as LIBARC, this could make the application appear to have stopped responding.

Phase 10 updates the interface while rows are being exported.
This commit is contained in:
Mark Gregory
2026-10-18 14:19:52 +01:00
parent c389d91da2
commit 33ec9f7f14
4 changed files with 105 additions and 3 deletions
+20
View File
@@ -1,6 +1,10 @@
import SwiftUI
import AppKit
extension Notification.Name {
static let workbenchRevealSQLEditor = Notification.Name("WorkbenchReplacement.RevealSQLEditor")
}
@main
struct WorkbenchReplacementApp: App {
@StateObject private var model = DatabaseModel()
@@ -410,6 +414,7 @@ struct WorkbenchFileCommands: Commands {
CommandGroup(replacing: .newItem) {
Button("New Query Tab") {
model.newQueryTab()
NotificationCenter.default.post(name: .workbenchRevealSQLEditor, object: nil)
}
.keyboardShortcut("t", modifiers: .command)
}
@@ -420,6 +425,21 @@ struct WorkbenchFileCommands: Commands {
}
.keyboardShortcut("o", modifiers: .command)
Menu("Open Recent SQL Script") {
if model.recentSQLScripts.isEmpty {
Text("No Recent Scripts")
} else {
ForEach(model.recentSQLScripts, id: \.self) { path in
Button(URL(fileURLWithPath: path).lastPathComponent) {
model.openRecentSQLScript(at: path)
}
.help(path)
}
Divider()
Button("Clear Recent Scripts") { model.clearRecentSQLScripts() }
}
}
Divider()
Button("Save SQL Script") {