diff --git a/frontend/src/components/torrent/table.rs b/frontend/src/components/torrent/table.rs
index 1ee9147..a274117 100644
--- a/frontend/src/components/torrent/table.rs
+++ b/frontend/src/components/torrent/table.rs
@@ -284,7 +284,82 @@ pub fn TorrentTable() -> impl IntoView {
-
+
+ // Toolbar
+
+
"Torrents"
+
+ // Sort Dropdown
+
+
+
+
+ {
+ let columns = vec![
+ (SortColumn::Name, "Name"),
+ (SortColumn::Size, "Size"),
+ (SortColumn::Progress, "Progress"),
+ (SortColumn::Status, "Status"),
+ (SortColumn::DownSpeed, "Down Speed"),
+ (SortColumn::UpSpeed, "Up Speed"),
+ (SortColumn::ETA, "ETA"),
+ ];
+
+ // Helper to close dropdown using the same logic as statusbar
+ let close_dropdown = move || {
+ if let Some(doc) = web_sys::window().and_then(|w| w.document()) {
+ if let Some(active) = doc.active_element() {
+ let _ = active.dyn_into::().map(|el| el.blur());
+ }
+ }
+ };
+
+ columns.into_iter().map(|(col, label)| {
+ let is_active = move || sort_col.get() == col;
+ let current_dir = move || sort_dir.get();
+ let close = close_dropdown.clone();
+
+ view! {
+ -
+
+
+ }
+ }).collect::>()
+ }
+
+
+
+
+ // Scrollable Content
+
{move || filtered_torrents().into_iter().map(|t| {
let progress_class = if t.percent_complete >= 100.0 { "progress-success" } else { "progress-primary" };
let status_str = format!("{:?}", t.status);
@@ -299,8 +374,6 @@ pub fn TorrentTable() -> impl IntoView {
// We don't need t_hash_click separately if we use t_hash, but existing pattern uses clones
let t_hash_click = t.hash.clone();
-
-
// Long press logic
let (timer_id, set_timer_id) = create_signal(Option::::None);
let t_hash_long = t.hash.clone();
@@ -415,7 +488,8 @@ pub fn TorrentTable() -> impl IntoView {
}
}).collect::
>()}
-
+
+