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:
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user