Ferrite-backup/Ferrite/Views/AboutView.swift
kingbri ff35ab7cfa Ferrite: Clean up UI changes
- Migrate the empty view to a common view which vertically centers
itself to the screen's bounds

- Don't initialize underlying state variables in init as this is
discouraged behavior. Instead, hook the source list editor to an ID
that refreshes when an existing source list URL has been set

Signed-off-by: kingbri <bdashore3@proton.me>
2022-09-05 18:31:44 -04:00

46 lines
1.6 KiB
Swift

//
// AboutView.swift
// Ferrite
//
// Created by Brian Dashore on 7/26/22.
//
import SwiftUI
struct AboutView: View {
var body: some View {
List {
Section {
ListRowTextView(leftText: "Version", rightText: UIApplication.shared.appVersion)
ListRowTextView(leftText: "Build number", rightText: UIApplication.shared.appBuild)
ListRowTextView(leftText: "Build type", rightText: UIApplication.shared.buildType)
ListRowLinkView(text: "Discord server", link: "https://discord.gg/sYQxnuD7Fj")
ListRowLinkView(text: "GitHub repository", link: "https://github.com/bdashore3/Ferrite")
} header: {
VStack(alignment: .center) {
Image("AppImage")
.resizable()
.frame(width: 100, height: 100)
.clipShape(RoundedRectangle(cornerRadius: 100 * 0.225, style: .continuous))
.padding(.top, 24)
Text("Ferrite is a free and open source application developed by kingbri under the GNU-GPLv3 license.")
.textCase(.none)
.foregroundColor(.label)
.font(.body)
.padding(.top, 8)
.padding(.bottom, 20)
}
.listRowInsets(EdgeInsets(top: 0, leading: 7, bottom: 0, trailing: 0))
}
}
.listStyle(.insetGrouped)
.navigationTitle("About")
}
}
struct AboutView_Previews: PreviewProvider {
static var previews: some View {
AboutView()
}
}