Make starting a new task on iPhone one tap
This commit is contained in:
@@ -56,7 +56,6 @@ struct PhoneView: View {
|
|||||||
@Environment(Overlays.self) private var overlays
|
@Environment(Overlays.self) private var overlays
|
||||||
@ViewState private var tab = PhoneTab.lead
|
@ViewState private var tab = PhoneTab.lead
|
||||||
@ViewState private var path: [PhoneRoute] = []
|
@ViewState private var path: [PhoneRoute] = []
|
||||||
@ViewState private var typing = false
|
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack(spacing: 0) {
|
VStack(spacing: 0) {
|
||||||
@@ -78,17 +77,9 @@ struct PhoneView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
if !typing {
|
|
||||||
tabBar
|
tabBar
|
||||||
}
|
}
|
||||||
}
|
|
||||||
.scrollDismissesKeyboard(.interactively)
|
.scrollDismissesKeyboard(.interactively)
|
||||||
.onReceive(NotificationCenter.default.publisher(for: UIResponder.keyboardWillShowNotification)) { _ in
|
|
||||||
typing = true
|
|
||||||
}
|
|
||||||
.onReceive(NotificationCenter.default.publisher(for: UIResponder.keyboardWillHideNotification)) { _ in
|
|
||||||
typing = false
|
|
||||||
}
|
|
||||||
.overlay {
|
.overlay {
|
||||||
OverlayHost()
|
OverlayHost()
|
||||||
}
|
}
|
||||||
@@ -153,6 +144,18 @@ struct PhoneView: View {
|
|||||||
tabButton("More", .more)
|
tabButton("More", .more)
|
||||||
Spacer(minLength: 0)
|
Spacer(minLength: 0)
|
||||||
ConnectionMark()
|
ConnectionMark()
|
||||||
|
Button {
|
||||||
|
overlays.openSwitcher(store)
|
||||||
|
} label: {
|
||||||
|
Image(systemName: "plus")
|
||||||
|
.font(Fonts.font(17, weight: 600))
|
||||||
|
.foregroundStyle(Palette.accent)
|
||||||
|
.padding(.horizontal, 10)
|
||||||
|
.padding(.vertical, 8)
|
||||||
|
.contentShape(Rectangle())
|
||||||
|
}
|
||||||
|
.buttonStyle(.plain)
|
||||||
|
.accessibilityLabel("New task")
|
||||||
Button {
|
Button {
|
||||||
tab = .tasks
|
tab = .tasks
|
||||||
path = []
|
path = []
|
||||||
|
|||||||
Reference in New Issue
Block a user