updates
This commit is contained in:
@@ -35,7 +35,12 @@ struct MonitorMenuView: View {
|
||||
Spacer()
|
||||
if monitor.results[server.id]?.refreshing == true { ProgressView().controlSize(.mini) }
|
||||
else if let report = monitor.results[server.id]?.report {
|
||||
Text("\(report.counts.ok) OK").font(.caption2).foregroundStyle(.secondary)
|
||||
VStack(alignment: .trailing, spacing: 2) {
|
||||
Text("\(report.counts.ok) OK").font(.caption2)
|
||||
if let uptime = report.uptimeLabel {
|
||||
Text("Up \(uptime)").font(.caption2)
|
||||
}
|
||||
}.foregroundStyle(.secondary)
|
||||
}
|
||||
if server.id == monitor.selectedID { Image(systemName: "checkmark") }
|
||||
}.padding(.horizontal, 14).padding(.vertical, 8)
|
||||
@@ -55,6 +60,17 @@ struct MonitorMenuView: View {
|
||||
ScrollView {
|
||||
LazyVStack(alignment: .leading, spacing: 0) {
|
||||
if let report = monitor.report {
|
||||
HStack(spacing: 8) {
|
||||
Image(systemName: "clock.arrow.circlepath")
|
||||
.foregroundStyle(.secondary)
|
||||
Text("Uptime").font(.system(size: 12, weight: .medium))
|
||||
Spacer()
|
||||
Text(report.uptimeLabel ?? "Not available")
|
||||
.font(.system(size: 12, weight: .medium, design: .monospaced))
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
.padding(.horizontal, 14).padding(.vertical, 10)
|
||||
Divider()
|
||||
if !monitor.selectedServices.isEmpty {
|
||||
Text("SERVICES")
|
||||
.font(.caption.bold()).foregroundStyle(.secondary)
|
||||
|
||||
Reference in New Issue
Block a user