About page mentionning third-parties including [IceCubesApp](https://github.com/dimillian/IceCubesApp)

This commit is contained in:
Lumaa 2023-12-30 20:59:09 +01:00
parent cee5dbd8eb
commit 36c7922f39
3 changed files with 39 additions and 4 deletions

View File

@ -68,6 +68,7 @@ public enum RouterDestination: Hashable {
case settings case settings
case privacy case privacy
case account(acc: Account) case account(acc: Account)
case about
} }
extension View { extension View {
@ -80,6 +81,8 @@ extension View {
PrivacyView() PrivacyView()
case .account(let acc): case .account(let acc):
AccountView(account: acc) AccountView(account: acc)
case .about:
AboutView()
} }
} }
} }

View File

@ -4,7 +4,33 @@ import SwiftUI
struct AboutView: View { struct AboutView: View {
var body: some 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)
} }
} }

View File

@ -8,13 +8,19 @@ struct SettingsView: View {
var body: some View { var body: some View {
List { List {
Button {
navigator.navigate(to: .about)
} label: {
Label("about", systemImage: "info.circle")
}
.listRowSeparator(.hidden)
Button { Button {
navigator.navigate(to: .privacy) navigator.navigate(to: .privacy)
} label: { } label: {
Label("setting.privacy", systemImage: "lock") Label("setting.privacy", systemImage: "lock")
} }
// .listRowSeparator(.hidden) .listRowSeparator(.hidden)
.listRowSeparator(.visible)
Button { Button {
UserDefaults.standard.removeObject(forKey: AppAccount.saveKey) UserDefaults.standard.removeObject(forKey: AppAccount.saveKey)
@ -24,7 +30,7 @@ struct SettingsView: View {
.foregroundStyle(.red) .foregroundStyle(.red)
} }
.tint(Color.red) .tint(Color.red)
.listRowSeparator(.hidden) .listRowSeparator(.visible, edges: .bottom)
} }
.withCovers(sheetDestination: $sheet) .withCovers(sheetDestination: $sheet)
.listStyle(.inset) .listStyle(.inset)