IceCubesApp/IceCubesApp/App/Tabs/Settings/AboutView.swift

107 lines
3 KiB
Swift
Raw Normal View History

import DesignSystem
2023-02-04 16:17:38 +00:00
import Env
import SwiftUI
struct AboutView: View {
@Environment(RouterPath.self) private var routerPath
@EnvironmentObject private var theme: Theme
2023-02-04 16:17:38 +00:00
let versionNumber: String
init() {
if let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String {
2023-02-04 16:17:38 +00:00
versionNumber = version + " "
} else {
versionNumber = ""
}
}
2023-02-04 16:17:38 +00:00
var body: some View {
2023-03-12 11:58:00 +00:00
List {
Section {
HStack {
Spacer()
Image("icon0")
.resizable()
.frame(width: 50, height: 50)
.cornerRadius(4)
Image("icon14")
.resizable()
.frame(width: 50, height: 50)
.cornerRadius(4)
Image("icon17")
.resizable()
.frame(width: 50, height: 50)
.cornerRadius(4)
Image("icon23")
.resizable()
.frame(width: 50, height: 50)
.cornerRadius(4)
Spacer()
}
2023-03-13 12:38:28 +00:00
2023-03-12 11:58:00 +00:00
Link(destination: URL(string: "https://github.com/Dimillian/IceCubesApp/blob/main/PRIVACY.MD")!) {
Label("settings.support.privacy-policy", systemImage: "lock")
}
2023-03-13 12:38:28 +00:00
2023-03-12 11:58:00 +00:00
Link(destination: URL(string: "https://github.com/Dimillian/IceCubesApp/blob/main/TERMS.MD")!) {
Label("settings.support.terms-of-use", systemImage: "checkmark.shield")
}
} footer: {
Text("\(versionNumber)©2023 Thomas Ricouard")
}
.listRowBackground(theme.primaryBackgroundColor)
2023-03-13 12:38:28 +00:00
2023-03-12 11:58:00 +00:00
Section {
Text("""
2023-02-04 16:17:38 +00:00
[EmojiText](https://github.com/divadretlaw/EmojiText)
2023-02-04 16:17:38 +00:00
[HTML2Markdown](https://gitlab.com/mflint/HTML2Markdown)
2023-02-04 16:17:38 +00:00
[KeychainSwift](https://github.com/evgenyneu/keychain-swift)
2023-02-04 16:17:38 +00:00
[LRUCache](https://github.com/nicklockwood/LRUCache)
2023-02-12 15:29:41 +00:00
[Bodega](https://github.com/mergesort/Bodega)
2023-02-04 16:17:38 +00:00
[Nuke](https://github.com/kean/Nuke)
2023-02-04 16:17:38 +00:00
[SwiftSoup](https://github.com/scinfu/SwiftSoup.git)
2023-02-04 16:17:38 +00:00
[Atkinson Hyperlegible](https://github.com/googlefonts/atkinson-hyperlegible)
2023-02-04 16:17:38 +00:00
[OpenDyslexic](http://opendyslexic.org)
[SwiftUI-Introspect](https://github.com/siteline/SwiftUI-Introspect)
[RevenueCat](https://github.com/RevenueCat/purchases-ios)
2023-09-16 12:15:03 +00:00
[SFSafeSymbols](https://github.com/SFSafeSymbols/SFSafeSymbols)
2023-02-04 16:17:38 +00:00
""")
.multilineTextAlignment(.leading)
.font(.scaledSubheadline)
.foregroundColor(.gray)
2023-03-12 11:58:00 +00:00
} header: {
Text("settings.about.built-with")
.textCase(nil)
}
2023-03-12 11:58:00 +00:00
.listRowBackground(theme.primaryBackgroundColor)
}
2023-03-12 11:58:00 +00:00
.listStyle(.insetGrouped)
.scrollContentBackground(.hidden)
.background(theme.secondaryBackgroundColor)
.navigationTitle(Text("settings.about.title"))
.navigationBarTitleDisplayMode(.large)
.environment(\.openURL, OpenURLAction { url in
routerPath.handle(url: url)
})
}
}
struct AboutView_Previews: PreviewProvider {
2023-02-04 16:17:38 +00:00
static var previews: some View {
AboutView()
2023-03-04 08:31:22 +00:00
.environmentObject(Theme.shared)
2023-02-04 16:17:38 +00:00
}
}