feat: show refresh icon + last-updated time in popover header

Header now always shows: ↻ 2m ago  (or 'Never' before first fetch).
Refresh spinner replaces the text while loading. More discoverable
than the bare relative timestamp that was there before.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
tigerenwork 2026-06-29 23:45:24 +08:00
parent f4668b38d6
commit 07ac29faa6
1 changed files with 5 additions and 3 deletions

View File

@ -27,9 +27,11 @@ struct BugListPopover: View {
ProgressView() ProgressView()
.scaleEffect(0.7) .scaleEffect(0.7)
.frame(width: 16, height: 16) .frame(width: 16, height: 16)
} } else {
if let lastUpdated = bugStore.lastUpdated { Image(systemName: "arrow.triangle.2.circlepath")
Text(formatted(lastUpdated)) .font(.caption2)
.foregroundStyle(.secondary)
Text(bugStore.lastUpdated.map(formatted) ?? "Never")
.font(.caption) .font(.caption)
.foregroundStyle(.secondary) .foregroundStyle(.secondary)
} }