Track history visit counts

This commit is contained in:
2026-05-08 04:43:59 -04:00
parent 349597d283
commit 6aee36cb66
4 changed files with 91 additions and 5 deletions
@@ -281,10 +281,18 @@ fn render_history_row(
)
.child(
div()
.flex()
.items_center()
.gap_2()
.text_xs()
.truncate()
.text_color(rgb(colors::MUTED))
.child(entry.url().display_url()),
.child(div().min_w_0().truncate().child(entry.url().display_url()))
.child(div().text_color(rgb(colors::MUTED_SOFT)).child("-"))
.child(
div()
.text_color(rgb(colors::MUTED_SOFT))
.child(visit_count_label(entry.visit_count())),
),
),
)
.child(
@@ -317,3 +325,10 @@ fn render_history_row(
)
.into_any_element()
}
fn visit_count_label(visit_count: u32) -> String {
match visit_count {
1 => "1 visit".to_string(),
count => format!("{count} visits"),
}
}