Remove all iOS 14 specific components and workarounds and comply with SwiftUI 3. Signed-off-by: kingbri <bdashore3@proton.me>
51 lines
1.8 KiB
Swift
51 lines
1.8 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: Application.shared.appVersion)
|
|
ListRowTextView(leftText: "Build number", rightText: Application.shared.appBuild)
|
|
ListRowTextView(leftText: "Build type", rightText: Application.shared.buildType)
|
|
|
|
if let commitHash = Bundle.main.commitHash {
|
|
ListRowTextView(leftText: "Commit", rightText: commitHash)
|
|
}
|
|
|
|
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(.init(uiColor: .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()
|
|
}
|
|
}
|