krz/hutch

an ios client for sourcehut

clone: git clone https://gitbay.org/krz/hutch.git

main: Hutch/Views/More/ManPageBrowserView.swift · raw

 1import SwiftUI
 2
 3/// Entry point for the man.sr.ht browser in the More tab.
 4/// Shows the official sr.ht man pages from the bundled catalog, which the
 5/// scheduled sync workflow keeps current with man.sr.ht.
 6struct ManPageBrowserView: View {
 7    private let officialDocs = ManPageCatalog.load()
 8
 9    var body: some View {
10        List {
11            Section("Official Man Pages") {
12                ForEach(officialDocs) { doc in
13                    NavigationLink(value: MoreRoute.manPage(doc.url)) {
14                        Text(doc.title)
15                    }
16                }
17                .themedRow()
18            }
19        }
20        .themedList()
21        .navigationTitle("Man Pages")
22        .navigationBarTitleDisplayMode(.inline)
23    }
24}