Session Cache Implementation
Nucleic-Session: B2346642-3353-4BD5-9DE2-A8B77BD66C98 Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
@@ -28,6 +28,23 @@ struct SessionsView: View {
|
|||||||
: "Waiting to connect to your Mac…"))
|
: "Waiting to connect to your Mac…"))
|
||||||
} else {
|
} else {
|
||||||
List {
|
List {
|
||||||
|
// Offline: the rows below are the saved history, not a live view — say so.
|
||||||
|
if !store.connectivity.isLive {
|
||||||
|
Section {
|
||||||
|
HStack(spacing: 8) {
|
||||||
|
Image(systemName: "wifi.slash").foregroundStyle(.secondary)
|
||||||
|
Text("Offline — showing saved chats")
|
||||||
|
.font(.footnote).foregroundStyle(.secondary)
|
||||||
|
Spacer(minLength: 8)
|
||||||
|
if store.isPaired {
|
||||||
|
Button("Reconnect") { store.reconnect() }
|
||||||
|
.font(.caption.weight(.semibold))
|
||||||
|
.buttonStyle(.borderless)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.listRowBackground(Color.clear)
|
||||||
|
}
|
||||||
ForEach(grouped, id: \.title) { group in
|
ForEach(grouped, id: \.title) { group in
|
||||||
Section(group.title.uppercased()) {
|
Section(group.title.uppercased()) {
|
||||||
ForEach(group.rows, id: \.sessionID) { summary in
|
ForEach(group.rows, id: \.sessionID) { summary in
|
||||||
|
|||||||
Reference in New Issue
Block a user