feat: make tags clickable for searching specific tags

Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-08-29 12:19:37 -03:00
parent e0536506b9
commit 467e91ab47

View File

@@ -134,7 +134,12 @@ fn build_item_list(conn: &Connection, params: &ListQueryParams, columns: &[Colum
},
"time" => item.ts.format("%Y-%m-%d %H:%M:%S").to_string(),
"size" => item.size.map(|s| s.to_string()).unwrap_or_default(),
"tags" => tags.iter().map(|t| t.name.clone()).collect::<Vec<_>>().join(", "),
"tags" => {
tags.iter()
.map(|t| format!("<a href=\"/?tags={}\">{}</a>", t.name, t.name))
.collect::<Vec<_>>()
.join(", ")
},
_ => {
if column.name.starts_with("meta:") {
let meta_key = &column.name[5..];