Center task modals

This commit is contained in:
Ian Gulliver
2026-10-20 22:40:48 -07:00
parent 9af1463507
commit ee73b93a30
4 changed files with 6 additions and 12 deletions
+2 -2
View File
@@ -88,13 +88,13 @@ final class Overlays {
}
}
func showConfirm(_ paragraphs: [String], action: String, danger: Bool = false, anchor: CGRect? = nil) async -> Bool {
func showConfirm(_ paragraphs: [String], action: String, danger: Bool = false, anchor: CGRect? = nil, inPane: Bool = false) async -> Bool {
let content = VStack(alignment: .leading, spacing: 12) {
ForEach(Array(paragraphs.enumerated()), id: \.offset) { _, p in
ModalText(text: p)
}
}
return await showModal(content, [ModalButton(label: "Cancel", value: "cancel"), ModalButton(label: action, value: "ok", primary: true, danger: danger)], anchor: anchor) == "ok"
return await showModal(content, [ModalButton(label: "Cancel", value: "cancel"), ModalButton(label: action, value: "ok", primary: true, danger: danger)], anchor: anchor, inPane: inPane) == "ok"
}
func showChoice(_ content: some View, _ choices: [ModalButton], anchor: CGRect? = nil) async -> String {