Merge remote-tracking branch 'refs/remotes/origin/UIRefinementsSL'

This commit is contained in:
Sebastian Lenzlinger 2023-07-12 11:02:13 +02:00
commit 216cdac025
2 changed files with 42 additions and 37 deletions

View File

@ -30,11 +30,13 @@ struct ContentView: View {
.environmentObject(dataStore)
}
HStack {
Spacer()
Button(action: {
self.currentView = 0
}) {
VStack {
Label("Discovery", systemImage: "dot.radiowaves.left.and.right")
Image(systemName: "dot.radiowaves.left.and.right")
Text("Discovery")
}
}
Spacer()
@ -42,7 +44,8 @@ struct ContentView: View {
self.currentView = 1
}) {
VStack {
Label("Feeds", systemImage: "person.2")
Image(systemName: "person.2")
Text("Feeds")
}
}
Spacer()
@ -50,13 +53,14 @@ struct ContentView: View {
self.currentView = 2
}) {
VStack {
Label("Settings",systemImage: "gear")
Image(systemName: "gear")
Text("Settings")
}
}
Spacer()
}
.frame(height: UIScreen.main.bounds.height * 0.05)
}
.padding()
}

View File

@ -16,42 +16,43 @@ struct SettingsView: View {
var body: some View {
List {
Section(header: Text("Personal Feed ID")) {
Label(dataStore.personalID, systemImage: "person.crop.circle")
}
Section(header: Text("Friends")) {
ForEach(dataStore.friends) { friend in
Label(friend, systemImage: "person")
NavigationView {
List {
Section(header: Text("Personal Feed ID")) {
Label(dataStore.personalID, systemImage: "person.crop.circle")
}
}
}
.navigationTitle("Settings")
.toolbar {
ToolbarItem(placement: .confirmationAction) {
Button("Edit") {
isPresentingEditView = true
}
}
}
.sheet(isPresented: $isPresentingEditView) {
NavigationStack {
SettingsEditView()
.navigationTitle("Settings")
.toolbar {
ToolbarItem(placement: .cancellationAction){
Button("Cancel") {
isPresentingEditView = false
}
}
ToolbarItem(placement: .confirmationAction) {
Button("Done") {
isPresentingEditView = false
}
}
Section(header: Text("Friends")) {
ForEach(dataStore.friends) { friend in
Label(friend, systemImage: "person")
}
}
}
.navigationTitle("Settings")
.toolbar {
ToolbarItem(placement: .confirmationAction) {
Button("Edit") {
isPresentingEditView = true
}
}
}
.sheet(isPresented: $isPresentingEditView) {
NavigationStack {
SettingsEditView()
.navigationTitle("Settings")
.toolbar {
ToolbarItem(placement: .cancellationAction){
Button("Cancel") {
isPresentingEditView = false
}
}
ToolbarItem(placement: .confirmationAction) {
Button("Done") {
isPresentingEditView = false
}
}
}
}
}
}
}