File tree Expand file tree Collapse file tree 7 files changed +10
-10
lines changed
TableProMobile/TableProMobile/Views Expand file tree Collapse file tree 7 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ struct ConnectedView: View {
2323 @State private var showFailureAlert = false
2424 @State private var selectedTab = ConnectedTab . tables
2525 @State private var queryHistory : [ QueryHistoryItem ] = [ ]
26- private let historyStorage = QueryHistoryStorage ( )
26+ @ State private var historyStorage = QueryHistoryStorage ( )
2727 @State private var databases : [ String ] = [ ]
2828 @State private var activeDatabase : String = " "
2929 @State private var schemas : [ String ] = [ ]
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ struct ConnectionFormView: View {
9898 _sshAuthMethod = State ( initialValue: ssh. authMethod)
9999 _sshKeyPath = State ( initialValue: ssh. privateKeyPath ?? " " )
100100 _sshKeyContent = State ( initialValue: ssh. privateKeyData ?? " " )
101- if ssh . privateKeyData != nil && ! ssh. privateKeyData! . isEmpty {
101+ if let keyData = ssh. privateKeyData, !keyData . isEmpty {
102102 _sshKeyInputMode = State ( initialValue: . paste)
103103 }
104104 }
@@ -603,7 +603,7 @@ struct ConnectionFormView: View {
603603 }
604604
605605 if storageFailed {
606- credentialError = " Some credentials could not be saved to the keychain. You may need to re-enter them later. "
606+ credentialError = String ( localized : " Some credentials could not be saved to the keychain. You may need to re-enter them later. " )
607607 showCredentialError = true
608608 }
609609
Original file line number Diff line number Diff line change @@ -385,6 +385,9 @@ struct DataBrowserView: View {
385385 let result = try await session. driver. execute ( query: query)
386386 columns = result. columns
387387 rows = result. rows
388+ if rows. count < pagination. pageSize, pagination. totalRows == nil {
389+ pagination. totalRows = pagination. currentOffset + rows. count
390+ }
388391 if columnDetails. isEmpty {
389392 columnDetails = try await session. driver. fetchColumns ( table: table. name, schema: nil )
390393 }
Original file line number Diff line number Diff line change @@ -64,16 +64,14 @@ struct GroupManagementView: View {
6464 . navigationTitle ( " Groups " )
6565 . navigationBarTitleDisplayMode ( . inline)
6666 . toolbar {
67- ToolbarItem ( placement: . confirmationAction) {
68- Button ( " Done " ) { dismiss ( ) }
69- }
7067 ToolbarItemGroup ( placement: . topBarTrailing) {
7168 EditButton ( )
7269 Button {
7370 showingAddGroup = true
7471 } label: {
7572 Image ( systemName: " plus " )
7673 }
74+ Button ( " Done " ) { dismiss ( ) }
7775 }
7876 }
7977 . sheet ( isPresented: $showingAddGroup) {
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ struct InsertRowView: View {
137137 Button ( " OK " , role: . cancel) { }
138138 } message: {
139139 if let recovery = operationError? . recovery {
140- Text ( " \( operationError? . message ?? " " ) \n \( recovery) " )
140+ Text ( verbatim : " \( operationError? . message ?? " " ) \( recovery) " )
141141 } else {
142142 Text ( operationError? . message ?? " " )
143143 }
Original file line number Diff line number Diff line change @@ -344,6 +344,7 @@ struct QueryEditorView: View {
344344
345345 editorFocused = false
346346 isExecuting = true
347+ defer { isExecuting = false }
347348 appError = nil
348349 result = nil
349350
@@ -359,7 +360,5 @@ struct QueryEditorView: View {
359360 let context = ErrorContext ( operation: " executeQuery " )
360361 self . appError = ErrorClassifier . classify ( error, context: context)
361362 }
362-
363- isExecuting = false
364363 }
365364}
Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ struct RowDetailView: View {
205205 Button ( " OK " , role: . cancel) { }
206206 } message: {
207207 if let recovery = operationError? . recovery {
208- Text ( " \( operationError? . message ?? " " ) \n \( recovery) " )
208+ Text ( verbatim : " \( operationError? . message ?? " " ) \( recovery) " )
209209 } else {
210210 Text ( operationError? . message ?? " " )
211211 }
You can’t perform that action at this time.
0 commit comments