fix(macos): hide session store path in remote mode

main
Peter Steinberger 2025-12-14 03:38:47 +00:00
parent 3729d269d0
commit efc7181aa0
1 changed files with 15 additions and 10 deletions

View File

@ -4,6 +4,7 @@ import SwiftUI
@MainActor
struct SessionsSettings: View {
private let isPreview: Bool
@ObservedObject private var state = AppStateStore.shared
@State private var rows: [SessionRow]
@State private var storePath: String = SessionLoader.defaultStorePath
@State private var lastLoaded: Date?
@ -62,11 +63,13 @@ struct SessionsSettings: View {
}
}
Spacer()
if self.state.connectionMode == .local {
Text(self.storePath)
.font(.caption.monospaced())
.foregroundStyle(.secondary)
.multilineTextAlignment(.trailing)
}
}
HStack(spacing: 10) {
Button {
@ -79,6 +82,7 @@ struct SessionsSettings: View {
.buttonStyle(.bordered)
.help("Refresh session store")
if self.state.connectionMode == .local {
Button {
self.revealStore()
} label: {
@ -86,6 +90,7 @@ struct SessionsSettings: View {
.labelStyle(.titleAndIcon)
}
.disabled(!FileManager.default.fileExists(atPath: self.storePath))
}
if self.loading {
ProgressView().controlSize(.small)