Center task modals
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user