diff --git a/RippleChat/ContentView.swift b/RippleChat/ContentView.swift index 07f8d4f..1667f54 100644 --- a/RippleChat/ContentView.swift +++ b/RippleChat/ContentView.swift @@ -29,16 +29,12 @@ struct ContentView: View { FeedListView(feeds: []) .environmentObject(dataStore) } - } - .padding() - .toolbar { - ToolbarItemGroup(placement: .bottomBar) { + HStack { Button(action: { self.currentView = 0 }) { VStack { Label("Discovery", systemImage: "dot.radiowaves.left.and.right") - Text("Discovery") } } Spacer() @@ -47,7 +43,6 @@ struct ContentView: View { }) { VStack { Label("Feeds", systemImage: "person.2") - Text("Feeds") } } Spacer() @@ -55,12 +50,14 @@ struct ContentView: View { self.currentView = 2 }) { VStack { - Label("Settings", systemImage: "gear") - Text("Settings") + Label("Settings",systemImage: "gear") } } } + .frame(height: UIScreen.main.bounds.height * 0.05) } + .padding() + } } diff --git a/RippleChat/Views/SettingsView.swift b/RippleChat/Views/SettingsView.swift index fbb9bbe..d050e3e 100644 --- a/RippleChat/Views/SettingsView.swift +++ b/RippleChat/Views/SettingsView.swift @@ -12,48 +12,49 @@ struct SettingsView: View { @EnvironmentObject var dataStore: DataStore @State private var isPresentingEditView = false - + var body: some View { - - List { - HStack { - Spacer() - Button("Edit") { - isPresentingEditView = true - } - } - 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") - } + + 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") } } - .navigationTitle("Settings") - .sheet(isPresented: $isPresentingEditView) { - NavigationStack { - SettingsEditView() - .navigationTitle("Settings") - .toolbar { - ToolbarItem(placement: .cancellationAction){ - Button("Cancel") { - isPresentingEditView = false - } - } - ToolbarItem(placement: .confirmationAction) { - Button("Done") { - isPresentingEditView = false - } + } + .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 + } + } + } + } } } - + }