mirror of
https://github.com/wahyd4/links.git
synced 2026-08-08 21:04:53 +10:00
Showing smaller counter
This commit is contained in:
@@ -56,6 +56,34 @@ struct LinkListView: View {
|
||||
.padding(.horizontal)
|
||||
.padding(.vertical, 8)
|
||||
|
||||
// Count indicator (shows filtered count and total)
|
||||
if !linkViewModel.isLoading {
|
||||
HStack(spacing: 6) {
|
||||
let filtered = linkViewModel.filteredLinks.count
|
||||
let total = linkViewModel.links.count
|
||||
// Use monospace digits for subtle alignment
|
||||
Text("\(filtered)")
|
||||
.font(.caption)
|
||||
.fontWeight(.semibold)
|
||||
.padding(.horizontal, 6)
|
||||
.padding(.vertical, 2)
|
||||
.background(Color.secondary.opacity(0.15))
|
||||
.foregroundColor(.secondary)
|
||||
.cornerRadius(4)
|
||||
.accessibilityLabel("Filtered links count")
|
||||
if filtered != total && total > 0 {
|
||||
Text("of \(total)")
|
||||
.font(.caption2)
|
||||
.foregroundColor(.secondary)
|
||||
.transition(.opacity)
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.padding(.horizontal)
|
||||
.padding(.bottom, 2)
|
||||
.transition(.opacity)
|
||||
}
|
||||
|
||||
// Links list
|
||||
if linkViewModel.isLoading {
|
||||
ProgressView()
|
||||
|
||||
Reference in New Issue
Block a user