Settings: inline heartbeat inputs
This commit is contained in:
@@ -66,8 +66,8 @@ struct ConfigSettings: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
LabeledContent("Heartbeat") {
|
LabeledContent("Heartbeat") {
|
||||||
VStack(alignment: .leading, spacing: 8) {
|
VStack(alignment: .leading, spacing: 6) {
|
||||||
HStack(spacing: 8) {
|
HStack(spacing: 12) {
|
||||||
Stepper(
|
Stepper(
|
||||||
value: Binding(
|
value: Binding(
|
||||||
get: { self.heartbeatMinutes ?? 10 },
|
get: { self.heartbeatMinutes ?? 10 },
|
||||||
@@ -77,15 +77,15 @@ struct ConfigSettings: View {
|
|||||||
Text("Every \(self.heartbeatMinutes ?? 10) min")
|
Text("Every \(self.heartbeatMinutes ?? 10) min")
|
||||||
}
|
}
|
||||||
.help("Set to 0 to disable automatic heartbeats")
|
.help("Set to 0 to disable automatic heartbeats")
|
||||||
}
|
|
||||||
|
|
||||||
TextField("HEARTBEAT", text: self.$heartbeatBody)
|
TextField("HEARTBEAT", text: self.$heartbeatBody)
|
||||||
.textFieldStyle(.roundedBorder)
|
.textFieldStyle(.roundedBorder)
|
||||||
.frame(width: 320)
|
.frame(width: 240)
|
||||||
.onChange(of: self.heartbeatBody) { _, _ in
|
.onChange(of: self.heartbeatBody) { _, _ in
|
||||||
self.autosaveConfig()
|
self.autosaveConfig()
|
||||||
}
|
}
|
||||||
.help("Message body sent on each heartbeat")
|
.help("Message body sent on each heartbeat")
|
||||||
|
}
|
||||||
|
|
||||||
Text("Heartbeats keep Pi sessions warm; 0 minutes disables them.")
|
Text("Heartbeats keep Pi sessions warm; 0 minutes disables them.")
|
||||||
.font(.footnote)
|
.font(.footnote)
|
||||||
|
|||||||
Reference in New Issue
Block a user