Settings Feature Enhancement
Nucleic-Session: 89BFAB13-D559-43FC-BE28-0B2639BECF0F Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
@@ -412,6 +412,22 @@ struct AddDeviceView: View {
|
|||||||
.toolbar {
|
.toolbar {
|
||||||
ToolbarItem(placement: .confirmationAction) { Button("Done") { dismiss() } }
|
ToolbarItem(placement: .confirmationAction) { Button("Done") { dismiss() } }
|
||||||
}
|
}
|
||||||
|
// A Mac joining via this code needs the user's OK — the accepting Mac forwarded its
|
||||||
|
// confirm here so it can be approved from the phone (an iPhone/iPad joins hands-free).
|
||||||
|
.confirmationDialog(
|
||||||
|
"Let “\(store.pendingMacPairRequest?.label ?? "another Mac")” join?",
|
||||||
|
isPresented: Binding(
|
||||||
|
get: { store.pendingMacPairRequest != nil },
|
||||||
|
set: { if !$0 { store.respondMacPair(false) } }),
|
||||||
|
titleVisibility: .visible
|
||||||
|
) {
|
||||||
|
Button("Allow") { store.respondMacPair(true) }
|
||||||
|
Button("Don't allow", role: .destructive) { store.respondMacPair(false) }
|
||||||
|
Button("Cancel", role: .cancel) { store.respondMacPair(false) }
|
||||||
|
} message: {
|
||||||
|
Text("It joins the whole group — it gets the same control of your Macs' sessions an "
|
||||||
|
+ "iPhone does, and every Mac here stays connected.")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Fire the request as the sheet appears; `onDismiss` (on the presenter) tells the Mac to
|
// Fire the request as the sheet appears; `onDismiss` (on the presenter) tells the Mac to
|
||||||
// close its pairing window.
|
// close its pairing window.
|
||||||
|
|||||||
Reference in New Issue
Block a user