6 Commits

Author SHA1 Message Date
Sebastian Lenzlinger
232d007686 Merge remote-tracking branch 'refs/remotes/origin/UIRefinementsSL' 2023-07-12 11:17:18 +02:00
severin.memmishofer
8720640f8c Changed NavigationView to NavigationStack for better design on iPad 2023-07-12 11:13:40 +02:00
Sebastian Lenzlinger
216cdac025 Merge remote-tracking branch 'refs/remotes/origin/UIRefinementsSL' 2023-07-12 11:02:13 +02:00
Sebastian Lenzlinger
46b048472c Update gitignore 2023-07-12 11:01:58 +02:00
severin.memmishofer
4b24048477 Fixed some graphical Issues, like the toolbar labels and the navigation title 2023-07-12 10:19:43 +02:00
Sebastian Lenzlinger
5e199f41f8 Refactor Navigation Toolbar into Separate View 2023-07-11 18:22:58 +02:00
5 changed files with 25 additions and 18 deletions

2
.gitignore vendored
View File

@@ -1,2 +1,4 @@
xcuserdata xcuserdata
*.xcuserdatad *.xcuserdatad
.DS_STORE
SLAppDevel.developerprofile

View File

@@ -130,6 +130,7 @@
96454F1C2A558EBC0040BEBD /* ContentView.swift */, 96454F1C2A558EBC0040BEBD /* ContentView.swift */,
96BD33112A5C3FFC007A6E53 /* Views */, 96BD33112A5C3FFC007A6E53 /* Views */,
F581F59A2A5AE72F0081C383 /* BluetoothController.swift */, F581F59A2A5AE72F0081C383 /* BluetoothController.swift */,
F5A4B1222A5D5F8B00F5AE01 /* BTPeripheral.swift */,
96454F1E2A558EBD0040BEBD /* Assets.xcassets */, 96454F1E2A558EBD0040BEBD /* Assets.xcassets */,
96454F202A558EBD0040BEBD /* Preview Content */, 96454F202A558EBD0040BEBD /* Preview Content */,
F5847B612A599BF4009E28D4 /* Body.swift */, F5847B612A599BF4009E28D4 /* Body.swift */,
@@ -137,7 +138,6 @@
F5847B652A599EA4009E28D4 /* Feed.swift */, F5847B652A599EA4009E28D4 /* Feed.swift */,
F5847B692A59AB24009E28D4 /* FeedStore.swift */, F5847B692A59AB24009E28D4 /* FeedStore.swift */,
96BD330D2A5C254B007A6E53 /* TextApp.swift */, 96BD330D2A5C254B007A6E53 /* TextApp.swift */,
F5A4B1222A5D5F8B00F5AE01 /* BTPeripheral.swift */,
F5A4B1242A5D7A8D00F5AE01 /* DataStore.swift */, F5A4B1242A5D7A8D00F5AE01 /* DataStore.swift */,
); );
path = RippleChat; path = RippleChat;

View File

@@ -29,15 +29,13 @@ struct ContentView: View {
FeedListView(feeds: []) FeedListView(feeds: [])
.environmentObject(dataStore) .environmentObject(dataStore)
} }
} HStack {
.padding() Spacer()
.toolbar {
ToolbarItemGroup(placement: .bottomBar) {
Button(action: { Button(action: {
self.currentView = 0 self.currentView = 0
}) { }) {
VStack { VStack {
Label("Discovery", systemImage: "dot.radiowaves.left.and.right") Image(systemName: "dot.radiowaves.left.and.right")
Text("Discovery") Text("Discovery")
} }
} }
@@ -46,7 +44,7 @@ struct ContentView: View {
self.currentView = 1 self.currentView = 1
}) { }) {
VStack { VStack {
Label("Feeds", systemImage: "person.2") Image(systemName: "person.2")
Text("Feeds") Text("Feeds")
} }
} }
@@ -55,13 +53,16 @@ struct ContentView: View {
self.currentView = 2 self.currentView = 2
}) { }) {
VStack { VStack {
Label("Settings", systemImage: "gear") Image(systemName: "gear")
Text("Settings") Text("Settings")
} }
} }
Spacer()
} }
.frame(height: UIScreen.main.bounds.height * 0.05)
} }
} }
} }

View File

@@ -14,11 +14,12 @@ struct PeeringView: View {
var body: some View { var body: some View {
Text("Peering View") Text("Peering View")
NavigationView { NavigationStack {
List(bluetoothController.peripheralNames, id: \.self) { peripheral in List(bluetoothController.peripheralNames, id: \.self) { peripheral in
Text(peripheral) Text(peripheral)
} }
.navigationTitle("Peripherals") .navigationTitle("Peripherals")
.navigationViewStyle(StackNavigationViewStyle())
} }
} }
} }

View File

@@ -16,14 +16,8 @@ struct SettingsView: View {
var body: some View { var body: some View {
NavigationStack {
List { List {
HStack {
Spacer()
Button("Edit") {
isPresentingEditView = true
}
}
Section(header: Text("Personal Feed ID")) { Section(header: Text("Personal Feed ID")) {
Label(dataStore.personalID, systemImage: "person.crop.circle") Label(dataStore.personalID, systemImage: "person.crop.circle")
} }
@@ -34,6 +28,14 @@ struct SettingsView: View {
} }
} }
.navigationTitle("Settings") .navigationTitle("Settings")
.navigationViewStyle(StackNavigationViewStyle())
.toolbar {
ToolbarItem(placement: .confirmationAction) {
Button("Edit") {
isPresentingEditView = true
}
}
}
.sheet(isPresented: $isPresentingEditView) { .sheet(isPresented: $isPresentingEditView) {
NavigationStack { NavigationStack {
SettingsEditView() SettingsEditView()
@@ -53,6 +55,7 @@ struct SettingsView: View {
} }
} }
} }
}
} }