field_ios

In-the-field app for Radroots on iOS
git clone https://radroots.dev/git/field_ios.git
Log | Files | Refs | README | LICENSE

TeraTodayDiscoveryView.swift (872B)


      1 import SwiftUI
      2 
      3 struct TeraTodayDiscoveryView: View {
      4   @ObservedObject var store: TeraTodayStore
      5 
      6   var body: some View {
      7     VStack(alignment: .leading, spacing: 8) {
      8       if let message = store.discovery.message {
      9         Text(message).font(.footnote).foregroundStyle(.secondary)
     10       }
     11       if let failure = store.discovery.failure {
     12         Label(failure.message, systemImage: failure.systemImage)
     13           .font(.footnote)
     14       }
     15       if store.discovery.isSearching {
     16         ProgressView("Searching older posts…")
     17       } else if store.discovery.canSearchOlder {
     18         Button("Search older posts") { Task { await store.searchOlderPosts() } }
     19           .frame(minHeight: 44)
     20           .accessibilityIdentifier("tera.today.search_older")
     21       }
     22     }
     23     .accessibilityElement(children: .contain)
     24     .accessibilityIdentifier("tera.today.discovery")
     25   }
     26 }