mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Add scroll view to notification and location permissions
This commit is contained in:
parent
6176831930
commit
6a75793f57
2 changed files with 102 additions and 94 deletions
|
|
@ -36647,6 +36647,7 @@
|
|||
}
|
||||
},
|
||||
"The Router roles are designed for high vantage locations like mountaintops and towers. This node needs to be able to have a good direct connection to most of the nodes on the network or else this will significantly hurt the network." : {
|
||||
"extractionState" : "stale",
|
||||
"localizations" : {
|
||||
"it" : {
|
||||
"stringUnit" : {
|
||||
|
|
@ -36673,6 +36674,9 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"The Router roles are only for high vantage locations like mountaintops and towers with few nearby nodes, not for use in urban areas. Improper use will hurt your local mesh." : {
|
||||
|
||||
},
|
||||
"The secondary public key authorized to send admin messages to this node." : {
|
||||
"localizations" : {
|
||||
|
|
|
|||
|
|
@ -78,110 +78,114 @@ struct DeviceOnboarding: View {
|
|||
}
|
||||
|
||||
var notificationView: some View {
|
||||
VStack {
|
||||
ScrollView(.vertical, showsIndicators: false) {
|
||||
VStack {
|
||||
Text("App Notifications")
|
||||
.font(.largeTitle.bold())
|
||||
.multilineTextAlignment(.center)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
}
|
||||
Spacer()
|
||||
VStack(alignment: .leading, spacing: 16) {
|
||||
Text("Send Notifications")
|
||||
.font(.title2.bold())
|
||||
.multilineTextAlignment(.center)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
makeRow(
|
||||
icon: "message",
|
||||
title: "Incoming Messages",
|
||||
subtitle: "Meshtastic notifications for channel messages and direct messages"
|
||||
)
|
||||
makeRow(
|
||||
icon: "flipphone",
|
||||
title: "New Nodes",
|
||||
subtitle: "Allow Meshtastic to send notifications for messages, newly discovered nodes and low battery alerts for the connected device."
|
||||
)
|
||||
makeRow(
|
||||
icon: "battery.25percent",
|
||||
title: "Low Battery",
|
||||
subtitle: "Allow Meshtastic to send notifications for messages, newly discovered nodes and low battery alerts for the connected device."
|
||||
)
|
||||
Text("Critical Alerts")
|
||||
.font(.title2.bold())
|
||||
.multilineTextAlignment(.center)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
makeRow(
|
||||
icon: "exclamationmark.triangle.fill",
|
||||
subtitle: "Select packets sent as critical will ignore the mute switch and Do Not Disturb settings in the OS notification center."
|
||||
)
|
||||
}
|
||||
.padding()
|
||||
Spacer()
|
||||
Button {
|
||||
Task {
|
||||
await requestNotificationsPermissions()
|
||||
await goToNextStep(after: .notifications)
|
||||
VStack {
|
||||
Text("App Notifications")
|
||||
.font(.largeTitle.bold())
|
||||
.multilineTextAlignment(.center)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
}
|
||||
} label: {
|
||||
Text("Configure notification permissions")
|
||||
.frame(maxWidth: .infinity)
|
||||
Spacer()
|
||||
VStack(alignment: .leading, spacing: 16) {
|
||||
Text("Send Notifications")
|
||||
.font(.title2.bold())
|
||||
.multilineTextAlignment(.center)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
makeRow(
|
||||
icon: "message",
|
||||
title: "Incoming Messages",
|
||||
subtitle: "Meshtastic notifications for channel messages and direct messages"
|
||||
)
|
||||
makeRow(
|
||||
icon: "flipphone",
|
||||
title: "New Nodes",
|
||||
subtitle: "Allow Meshtastic to send notifications for messages, newly discovered nodes and low battery alerts for the connected device."
|
||||
)
|
||||
makeRow(
|
||||
icon: "battery.25percent",
|
||||
title: "Low Battery",
|
||||
subtitle: "Allow Meshtastic to send notifications for messages, newly discovered nodes and low battery alerts for the connected device."
|
||||
)
|
||||
Text("Critical Alerts")
|
||||
.font(.title2.bold())
|
||||
.multilineTextAlignment(.center)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
makeRow(
|
||||
icon: "exclamationmark.triangle.fill",
|
||||
subtitle: "Select packets sent as critical will ignore the mute switch and Do Not Disturb settings in the OS notification center."
|
||||
)
|
||||
}
|
||||
.padding()
|
||||
Spacer()
|
||||
Button {
|
||||
Task {
|
||||
await requestNotificationsPermissions()
|
||||
await goToNextStep(after: .notifications)
|
||||
}
|
||||
} label: {
|
||||
Text("Configure notification permissions")
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
.buttonBorderShape(.capsule)
|
||||
.controlSize(.large)
|
||||
.padding()
|
||||
.buttonStyle(.borderedProminent)
|
||||
}
|
||||
.buttonBorderShape(.capsule)
|
||||
.controlSize(.large)
|
||||
.padding()
|
||||
.buttonStyle(.borderedProminent)
|
||||
}
|
||||
}
|
||||
|
||||
var locationView: some View {
|
||||
VStack {
|
||||
ScrollView(.vertical, showsIndicators: false) {
|
||||
VStack {
|
||||
Text("Phone Location")
|
||||
.font(.largeTitle.bold())
|
||||
.multilineTextAlignment(.center)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
}
|
||||
VStack(alignment: .leading, spacing: 16) {
|
||||
Text("Meshtastic uses your phone's location to enable a number of features. You can update your location permissions at any time from Settings > App Settings > Open Settings.")
|
||||
.font(.body.bold())
|
||||
.multilineTextAlignment(.center)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
makeRow(
|
||||
icon: "location",
|
||||
title: "Share Location",
|
||||
subtitle: "Use your phone GPS to send locations to your node to instead of using a hardware GPS on your node."
|
||||
)
|
||||
makeRow(
|
||||
icon: "lines.measurement.horizontal",
|
||||
title: "Distance Measurements",
|
||||
subtitle: "Used to display the distance between your phone and other Meshtastic nodes where positions are available."
|
||||
)
|
||||
makeRow(
|
||||
icon: "line.3.horizontal.decrease.circle",
|
||||
title: "Distance Filters",
|
||||
subtitle: "Filter the node list and mesh map based on proximity to your phone."
|
||||
)
|
||||
makeRow(
|
||||
icon: "mappin",
|
||||
title: "Mesh Map Location",
|
||||
subtitle: "Enables the blue location dot for your phone in the mesh map."
|
||||
)
|
||||
}
|
||||
.padding()
|
||||
Spacer()
|
||||
Button {
|
||||
Task {
|
||||
await requestLocationPermissions()
|
||||
VStack {
|
||||
Text("Phone Location")
|
||||
.font(.largeTitle.bold())
|
||||
.multilineTextAlignment(.center)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
}
|
||||
} label: {
|
||||
Text("Configure Location Permissions")
|
||||
.frame(maxWidth: .infinity)
|
||||
VStack(alignment: .leading, spacing: 16) {
|
||||
Text("Meshtastic uses your phone's location to enable a number of features. You can update your location permissions at any time from Settings > App Settings > Open Settings.")
|
||||
.font(.body.bold())
|
||||
.multilineTextAlignment(.center)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
makeRow(
|
||||
icon: "location",
|
||||
title: "Share Location",
|
||||
subtitle: "Use your phone GPS to send locations to your node to instead of using a hardware GPS on your node."
|
||||
)
|
||||
makeRow(
|
||||
icon: "lines.measurement.horizontal",
|
||||
title: "Distance Measurements",
|
||||
subtitle: "Used to display the distance between your phone and other Meshtastic nodes where positions are available."
|
||||
)
|
||||
makeRow(
|
||||
icon: "line.3.horizontal.decrease.circle",
|
||||
title: "Distance Filters",
|
||||
subtitle: "Filter the node list and mesh map based on proximity to your phone."
|
||||
)
|
||||
makeRow(
|
||||
icon: "mappin",
|
||||
title: "Mesh Map Location",
|
||||
subtitle: "Enables the blue location dot for your phone in the mesh map."
|
||||
)
|
||||
}
|
||||
.padding()
|
||||
Spacer()
|
||||
Button {
|
||||
Task {
|
||||
await requestLocationPermissions()
|
||||
}
|
||||
} label: {
|
||||
Text("Configure Location Permissions")
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
.padding()
|
||||
.buttonBorderShape(.capsule)
|
||||
.controlSize(.large)
|
||||
.padding()
|
||||
.buttonStyle(.borderedProminent)
|
||||
}
|
||||
.padding()
|
||||
.buttonBorderShape(.capsule)
|
||||
.controlSize(.large)
|
||||
.padding()
|
||||
.buttonStyle(.borderedProminent)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue