feat: modernize UI, add mobile card layout, and fix iOS sidebar interactions

This commit is contained in:
spinline
2026-02-01 14:08:25 +03:00
parent 8f7af0d1f8
commit 5d2c7249eb
5 changed files with 147 additions and 10 deletions

View File

@@ -46,14 +46,24 @@ pub fn TorrentTable() -> impl IntoView {
let filtered_torrents = move || {
let mut torrents = store.torrents.get().into_iter().filter(|t| {
let filter = store.filter.get();
match filter {
let search = store.search_query.get().to_lowercase();
let matches_filter = match filter {
crate::store::FilterStatus::All => true,
crate::store::FilterStatus::Downloading => t.status == shared::TorrentStatus::Downloading,
crate::store::FilterStatus::Seeding => t.status == shared::TorrentStatus::Seeding,
crate::store::FilterStatus::Completed => t.status == shared::TorrentStatus::Seeding || t.status == shared::TorrentStatus::Paused, // Approximate
crate::store::FilterStatus::Inactive => t.status == shared::TorrentStatus::Paused || t.status == shared::TorrentStatus::Error,
_ => true
}
_ => true
};
let matches_search = if search.is_empty() {
true
} else {
t.name.to_lowercase().contains(&search)
};
matches_filter && matches_search
}).collect::<Vec<_>>();
torrents.sort_by(|a, b| {