Move POI alerts to FYI
This commit is contained in:
@@ -45,7 +45,7 @@ struct OrchestratorView: View {
|
||||
Button("Recompute Now") { orchestrator.recomputeNow() }
|
||||
}
|
||||
|
||||
Section("Feed") {
|
||||
Section("Winner") {
|
||||
if let feed = orchestrator.lastFeed, let winner = feed.winnerItem() {
|
||||
Text(winner.title)
|
||||
.font(.headline)
|
||||
@@ -54,36 +54,56 @@ struct OrchestratorView: View {
|
||||
.font(.subheadline)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
Text("type \(winner.type.rawValue) • prio \(String(format: "%.2f", winner.priority)) • ttl \(winner.ttlSec)s")
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
|
||||
if feed.feed.count > 1 {
|
||||
Divider()
|
||||
LabeledContent("Type") { Text(winner.type.rawValue) }
|
||||
LabeledContent("Bucket") { Text(winner.bucket.rawValue) }
|
||||
LabeledContent("Priority") { Text(String(format: "%.2f", winner.priority)) }
|
||||
LabeledContent("TTL") { Text("\(winner.ttlSec)s") }
|
||||
if let poiType = winner.poiType {
|
||||
LabeledContent("POI type") { Text(poiType.rawValue) }
|
||||
}
|
||||
if let startsAt = winner.startsAt {
|
||||
LabeledContent("Starts at") { Text("\(startsAt)") }
|
||||
}
|
||||
LabeledContent("ID") {
|
||||
Text(winner.id)
|
||||
.font(.caption)
|
||||
.textSelection(.enabled)
|
||||
}
|
||||
} else {
|
||||
Text("No winner yet")
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
}
|
||||
|
||||
ForEach(feed.feed, id: \.id) { item in
|
||||
VStack(alignment: .leading, spacing: 6) {
|
||||
HStack {
|
||||
Text(item.title)
|
||||
.font(.headline)
|
||||
.lineLimit(1)
|
||||
Spacer()
|
||||
Text(item.type.rawValue)
|
||||
Section("Feed") {
|
||||
if let feed = orchestrator.lastFeed {
|
||||
if feed.feed.isEmpty {
|
||||
Text("No feed items yet")
|
||||
.foregroundStyle(.secondary)
|
||||
} else {
|
||||
ForEach(feed.feed, id: \.id) { item in
|
||||
VStack(alignment: .leading, spacing: 6) {
|
||||
HStack {
|
||||
Text(item.title)
|
||||
.font(.headline)
|
||||
.lineLimit(1)
|
||||
Spacer()
|
||||
Text(item.type.rawValue)
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
if !item.subtitle.isEmpty {
|
||||
Text(item.subtitle)
|
||||
.font(.subheadline)
|
||||
.foregroundStyle(.secondary)
|
||||
.lineLimit(1)
|
||||
}
|
||||
Text("bucket \(item.bucket.rawValue) • prio \(String(format: "%.2f", item.priority)) • ttl \(item.ttlSec)s")
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
if !item.subtitle.isEmpty {
|
||||
Text(item.subtitle)
|
||||
.font(.subheadline)
|
||||
.foregroundStyle(.secondary)
|
||||
.lineLimit(1)
|
||||
}
|
||||
Text("bucket \(item.bucket.rawValue) • prio \(String(format: "%.2f", item.priority)) • ttl \(item.ttlSec)s")
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
.padding(.vertical, 4)
|
||||
}
|
||||
.padding(.vertical, 4)
|
||||
}
|
||||
} else {
|
||||
Text("No feed yet")
|
||||
|
||||
Reference in New Issue
Block a user