Stop text wrapping in the Changes tab on iPhone
This commit is contained in:
@@ -242,7 +242,28 @@ private struct ChangesHead: View {
|
|||||||
@Environment(Overlays.self) private var overlays
|
@Environment(Overlays.self) private var overlays
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
|
ViewThatFits(in: .horizontal) {
|
||||||
HStack(alignment: .center, spacing: 12) {
|
HStack(alignment: .center, spacing: 12) {
|
||||||
|
info
|
||||||
|
Spacer(minLength: 0)
|
||||||
|
controls
|
||||||
|
}
|
||||||
|
VStack(alignment: .leading, spacing: 6) {
|
||||||
|
info
|
||||||
|
ViewThatFits(in: .horizontal) {
|
||||||
|
toggle
|
||||||
|
ScrollView(.horizontal) {
|
||||||
|
toggle
|
||||||
|
}
|
||||||
|
.fixedSize(horizontal: false, vertical: true)
|
||||||
|
}
|
||||||
|
send
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.modifier(HeaderBar())
|
||||||
|
}
|
||||||
|
|
||||||
|
private var info: some View {
|
||||||
VStack(alignment: .leading, spacing: 4) {
|
VStack(alignment: .leading, spacing: 4) {
|
||||||
if let n = model.pinned {
|
if let n = model.pinned {
|
||||||
SnapWhere(n: n)
|
SnapWhere(n: n)
|
||||||
@@ -252,7 +273,17 @@ private struct ChangesHead: View {
|
|||||||
.foregroundStyle(Palette.muted)
|
.foregroundStyle(Palette.muted)
|
||||||
.textSelection(.enabled)
|
.textSelection(.enabled)
|
||||||
}
|
}
|
||||||
Spacer(minLength: 0)
|
}
|
||||||
|
|
||||||
|
private var controls: some View {
|
||||||
|
HStack(spacing: 12) {
|
||||||
|
send
|
||||||
|
toggle
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ViewBuilder
|
||||||
|
private var send: some View {
|
||||||
if let taskId = store.selectedTaskId, let drafts = store.drafts {
|
if let taskId = store.selectedTaskId, let drafts = store.drafts {
|
||||||
let n = drafts.lineComments(taskId).filter(lineCommentReady(store.images, taskId)).count
|
let n = drafts.lineComments(taskId).filter(lineCommentReady(store.images, taskId)).count
|
||||||
if n > 0 {
|
if n > 0 {
|
||||||
@@ -264,9 +295,6 @@ private struct ChangesHead: View {
|
|||||||
.help("Send the line comments to the task's agent as one message")
|
.help("Send the line comments to the task's agent as one message")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
toggle
|
|
||||||
}
|
|
||||||
.modifier(HeaderBar())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private func sendComments(_ taskId: String, _ drafts: Drafts) {
|
private func sendComments(_ taskId: String, _ drafts: Drafts) {
|
||||||
|
|||||||
Reference in New Issue
Block a user