About page mentionning third-parties including [IceCubesApp](https://github.com/dimillian/IceCubesApp)
This commit is contained in:
parent
cee5dbd8eb
commit
36c7922f39
|
@ -68,6 +68,7 @@ public enum RouterDestination: Hashable {
|
|||
case settings
|
||||
case privacy
|
||||
case account(acc: Account)
|
||||
case about
|
||||
}
|
||||
|
||||
extension View {
|
||||
|
@ -80,6 +81,8 @@ extension View {
|
|||
PrivacyView()
|
||||
case .account(let acc):
|
||||
AccountView(account: acc)
|
||||
case .about:
|
||||
AboutView()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,33 @@ import SwiftUI
|
|||
|
||||
struct AboutView: View {
|
||||
var body: some View {
|
||||
Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
|
||||
List {
|
||||
NavigationLink {
|
||||
aboutApp
|
||||
} label: {
|
||||
Text("about.app")
|
||||
.tint(Color.blue)
|
||||
}
|
||||
.listRowSeparator(.hidden)
|
||||
.listRowBackground(Color.appBackground)
|
||||
}
|
||||
.listStyle(.plain)
|
||||
.navigationTitle("about")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
}
|
||||
|
||||
var aboutApp: some View {
|
||||
ScrollView {
|
||||
VStack (spacing: 15) {
|
||||
Text("about.app.details")
|
||||
.multilineTextAlignment(.leading)
|
||||
Text("about.app.third-party")
|
||||
.multilineTextAlignment(.leading)
|
||||
}
|
||||
.padding(.horizontal)
|
||||
}
|
||||
.navigationTitle("about.app")
|
||||
.navigationBarTitleDisplayMode(.large)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,13 +8,19 @@ struct SettingsView: View {
|
|||
|
||||
var body: some View {
|
||||
List {
|
||||
Button {
|
||||
navigator.navigate(to: .about)
|
||||
} label: {
|
||||
Label("about", systemImage: "info.circle")
|
||||
}
|
||||
.listRowSeparator(.hidden)
|
||||
|
||||
Button {
|
||||
navigator.navigate(to: .privacy)
|
||||
} label: {
|
||||
Label("setting.privacy", systemImage: "lock")
|
||||
}
|
||||
// .listRowSeparator(.hidden)
|
||||
.listRowSeparator(.visible)
|
||||
.listRowSeparator(.hidden)
|
||||
|
||||
Button {
|
||||
UserDefaults.standard.removeObject(forKey: AppAccount.saveKey)
|
||||
|
@ -24,7 +30,7 @@ struct SettingsView: View {
|
|||
.foregroundStyle(.red)
|
||||
}
|
||||
.tint(Color.red)
|
||||
.listRowSeparator(.hidden)
|
||||
.listRowSeparator(.visible, edges: .bottom)
|
||||
}
|
||||
.withCovers(sheetDestination: $sheet)
|
||||
.listStyle(.inset)
|
||||
|
|
Loading…
Reference in New Issue