diff --git a/backend_log.txt b/backend_log.txt
new file mode 100644
index 0000000..e69de29
diff --git a/frontend/src/app.rs b/frontend/src/app.rs
index 252cbd5..f9d8b7e 100644
--- a/frontend/src/app.rs
+++ b/frontend/src/app.rs
@@ -4,8 +4,11 @@ use crate::components::torrent::table::TorrentTable;
use crate::components::auth::login::Login;
use crate::components::auth::setup::Setup;
use crate::api;
-use leptos::*;
-use leptos_router::*;
+use leptos::prelude::*;
+use leptos::logging;
+use leptos::task::spawn_local;
+use leptos_router::components::{Router, Routes, Route};
+use leptos_router::hooks::use_navigate;
#[component]
pub fn App() -> impl IntoView {
@@ -89,7 +92,7 @@ pub fn App() -> impl IntoView {
view! {
-
+
} />
} />
diff --git a/frontend/src/components/auth/login.rs b/frontend/src/components/auth/login.rs
index ce8a900..ec99c18 100644
--- a/frontend/src/components/auth/login.rs
+++ b/frontend/src/components/auth/login.rs
@@ -1,4 +1,7 @@
-use leptos::*;
+use leptos::prelude::*;
+use leptos::logging;
+use leptos::html;
+use leptos::task::spawn_local;
use crate::api;
#[component]
diff --git a/frontend/src/components/auth/setup.rs b/frontend/src/components/auth/setup.rs
index ca6d2e9..8a22835 100644
--- a/frontend/src/components/auth/setup.rs
+++ b/frontend/src/components/auth/setup.rs
@@ -1,4 +1,7 @@
-use leptos::*;
+use leptos::prelude::*;
+use leptos::logging;
+use leptos::html;
+use leptos::task::spawn_local;
use crate::api;
#[component]
diff --git a/frontend/src/components/context_menu.rs b/frontend/src/components/context_menu.rs
index 9abf309..98db3ef 100644
--- a/frontend/src/components/context_menu.rs
+++ b/frontend/src/components/context_menu.rs
@@ -1,4 +1,7 @@
-use leptos::*;
+use leptos::prelude::*;
+use leptos::logging;
+use leptos::html;
+use leptos::task::spawn_local;
use leptos_use::on_click_outside;
#[component]
diff --git a/frontend/src/components/layout/protected.rs b/frontend/src/components/layout/protected.rs
index ef3e4b2..ca9e20a 100644
--- a/frontend/src/components/layout/protected.rs
+++ b/frontend/src/components/layout/protected.rs
@@ -1,4 +1,7 @@
-use leptos::*;
+use leptos::prelude::*;
+use leptos::logging;
+use leptos::html;
+use leptos::task::spawn_local;
use crate::components::layout::sidebar::Sidebar;
use crate::components::layout::statusbar::StatusBar;
use crate::components::layout::toolbar::Toolbar;
diff --git a/frontend/src/components/layout/sidebar.rs b/frontend/src/components/layout/sidebar.rs
index cfd73c7..7a078cd 100644
--- a/frontend/src/components/layout/sidebar.rs
+++ b/frontend/src/components/layout/sidebar.rs
@@ -1,5 +1,8 @@
use leptos::wasm_bindgen::JsCast;
-use leptos::*;
+use leptos::prelude::*;
+use leptos::logging;
+use leptos::html;
+use leptos::task::spawn_local;
use crate::api;
#[component]
diff --git a/frontend/src/components/layout/statusbar.rs b/frontend/src/components/layout/statusbar.rs
index cc20541..a59add9 100644
--- a/frontend/src/components/layout/statusbar.rs
+++ b/frontend/src/components/layout/statusbar.rs
@@ -1,6 +1,9 @@
-use leptos::*;
+use leptos::prelude::*;
+use leptos::logging;
+use leptos::html;
+use leptos::task::spawn_local;
use leptos_use::storage::use_local_storage;
-use codee::string::FromToStringCodec;
+use ::codee::string::FromToStringCodec;
use shared::GlobalLimitRequest;
use crate::api;
diff --git a/frontend/src/components/layout/toolbar.rs b/frontend/src/components/layout/toolbar.rs
index 3471dfd..e6753af 100644
--- a/frontend/src/components/layout/toolbar.rs
+++ b/frontend/src/components/layout/toolbar.rs
@@ -1,4 +1,7 @@
-use leptos::*;
+use leptos::prelude::*;
+use leptos::logging;
+use leptos::html;
+use leptos::task::spawn_local;
#[component]
pub fn Toolbar() -> impl IntoView {
diff --git a/frontend/src/components/modal.rs b/frontend/src/components/modal.rs
index 05f5746..78f1ae8 100644
--- a/frontend/src/components/modal.rs
+++ b/frontend/src/components/modal.rs
@@ -1,4 +1,7 @@
-use leptos::*;
+use leptos::prelude::*;
+use leptos::logging;
+use leptos::html;
+use leptos::task::spawn_local;
#[component]
pub fn Modal(
diff --git a/frontend/src/components/toast.rs b/frontend/src/components/toast.rs
index dd79064..16e114b 100644
--- a/frontend/src/components/toast.rs
+++ b/frontend/src/components/toast.rs
@@ -1,4 +1,7 @@
-use leptos::*;
+use leptos::prelude::*;
+use leptos::logging;
+use leptos::html;
+use leptos::task::spawn_local;
use shared::NotificationLevel;
// ============================================================================
@@ -29,22 +32,22 @@ fn ToastItem(
- }.into_view(),
+ }.into_any(),
NotificationLevel::Success => view! {
- }.into_view(),
+ }.into_any(),
NotificationLevel::Warning => view! {
- }.into_view(),
+ }.into_any(),
NotificationLevel::Error => view! {
- }.into_view(),
+ }.into_any(),
};
view! {
diff --git a/frontend/src/components/torrent/add_torrent.rs b/frontend/src/components/torrent/add_torrent.rs
index 428fbdd..2b2571e 100644
--- a/frontend/src/components/torrent/add_torrent.rs
+++ b/frontend/src/components/torrent/add_torrent.rs
@@ -1,4 +1,7 @@
-use leptos::*;
+use leptos::prelude::*;
+use leptos::logging;
+use leptos::html;
+use leptos::task::spawn_local;
use leptos::html::Dialog;
use crate::store::{show_toast_with_signal, TorrentStore};
use crate::api;
@@ -85,9 +88,9 @@ pub fn AddTorrentModal(
diff --git a/frontend/src/components/torrent/table.rs b/frontend/src/components/torrent/table.rs
index 134f995..d8083c9 100644
--- a/frontend/src/components/torrent/table.rs
+++ b/frontend/src/components/torrent/table.rs
@@ -1,8 +1,12 @@
-use leptos::*;
+use leptos::prelude::*;
+use leptos::logging;
+use leptos::html;
+use leptos::task::spawn_local;
use leptos_use::{on_click_outside, use_timeout_fn};
-use crate::store::{get_action_messages, show_toast_with_signal};
+use crate::store::{get_action_messages, show_toast_with_signal, FilterStatus, TorrentStore};
use crate::api;
-use shared::NotificationLevel;
+use shared::{NotificationLevel, Torrent};
+use std::collections::HashMap;
fn format_bytes(bytes: i64) -> String {
const UNITS: [&str; 6] = ["B", "KB", "MB", "GB", "TB", "PB"];
@@ -180,10 +184,10 @@ pub fn TorrentTable() -> impl IntoView {
if sort_col.get() == col {
match sort_dir.get() {
SortDirection::Ascending => {
- view! { "▲" }.into_view()
+ view! { "▲" }.into_any()
}
SortDirection::Descending => {
- view! { "▼" }.into_view()
+ view! { "▼" }.into_any()
}
}
} else {
@@ -378,8 +382,8 @@ pub fn TorrentTable() -> impl IntoView {
visible=true
position=menu_position.get()
torrent_hash=selected_hash.get().unwrap_or_default()
- on_close=Callback::from(move |_| set_menu_visible.set(false))
- on_action=Callback::from(on_action)
+ on_close=Callback::from(move |()| set_menu_visible.set(false))
+ on_action=Callback::from(move |args| on_action(args))
/>
@@ -391,7 +395,7 @@ fn TorrentRow(
hash: String,
selected_hash: ReadSignal