diff --git a/src/modes/server/pages.rs b/src/modes/server/pages.rs
index 95c05a1..fb6967c 100644
--- a/src/modes/server/pages.rs
+++ b/src/modes/server/pages.rs
@@ -123,7 +123,11 @@ fn build_item_list(conn: &Connection, params: &ListQueryParams, columns: &[Colum
html.push_str("
");
for column in columns {
let value = match column.name.as_str() {
- "id" => item.id.map(|id| id.to_string()).unwrap_or_default(),
+ "id" => {
+ let id_value = item.id.map(|id| id.to_string()).unwrap_or_default();
+ // Make the ID a link to the item details page
+ format!("{}", item_id, id_value)
+ },
"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::>().join(", "),
@@ -141,6 +145,9 @@ fn build_item_list(conn: &Connection, params: &ListQueryParams, columns: &[Colum
let display_value = if let Some(max_len_str) = &column.max_len {
if let Ok(max_len) = max_len_str.parse::() {
if value.chars().count() > max_len {
+ // Note: This might truncate HTML, which isn't ideal
+ // For simplicity, we'll just truncate the text content
+ // A better approach would be to strip HTML tags first, but that's more complex
let truncated: String = value.chars().take(max_len).collect();
format!("{}...", truncated)
} else {