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:
@@ -89,6 +89,11 @@ struct MainView: View {
|
||||
) == "dark" ? .dark : .light
|
||||
)
|
||||
.background(Color(nsColor: .windowBackgroundColor))
|
||||
.onReceive(NotificationCenter.default.publisher(for: .workbenchRevealSQLEditor)) { _ in
|
||||
administrationPage = nil
|
||||
navigatorMode = 1
|
||||
DispatchQueue.main.async { sqlFocusRequest += 1 }
|
||||
}
|
||||
.task {
|
||||
if model.databases.isEmpty, model.selected != nil {
|
||||
model.loadDatabases()
|
||||
@@ -842,8 +847,40 @@ struct MainView: View {
|
||||
}
|
||||
.help("Format SQL")
|
||||
|
||||
Divider()
|
||||
.frame(height: 17)
|
||||
Divider().frame(height: 17)
|
||||
|
||||
Button {
|
||||
model.openSQLScript()
|
||||
} label: {
|
||||
Image(systemName: "folder")
|
||||
}
|
||||
.help("Open SQL Script…")
|
||||
|
||||
Button {
|
||||
model.saveSQLScript()
|
||||
} label: {
|
||||
Image(systemName: "square.and.arrow.down")
|
||||
}
|
||||
.help("Save SQL Script")
|
||||
|
||||
Menu {
|
||||
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)
|
||||
}
|
||||
}
|
||||
Divider()
|
||||
Button("Clear Recent Scripts") { model.clearRecentSQLScripts() }
|
||||
}
|
||||
} label: {
|
||||
Image(systemName: "clock.arrow.circlepath")
|
||||
}
|
||||
.help("Recent SQL Scripts")
|
||||
|
||||
Divider().frame(height: 17)
|
||||
|
||||
Button {
|
||||
showingQueryHistory = true
|
||||
|
||||
Reference in New Issue
Block a user