fix(frontend): address move semantics and signal/callback types for Leptos 0.8
Some checks failed
Build MIPS Binary / build (push) Failing after 1m22s
Some checks failed
Build MIPS Binary / build (push) Failing after 1m22s
This commit is contained in:
@@ -3,7 +3,7 @@ use leptos::logging;
|
|||||||
use leptos::html;
|
use leptos::html;
|
||||||
use leptos::task::spawn_local;
|
use leptos::task::spawn_local;
|
||||||
use leptos_use::{on_click_outside, use_timeout_fn};
|
use leptos_use::{on_click_outside, use_timeout_fn};
|
||||||
use crate::store::{get_action_messages, show_toast_with_signal, FilterStatus, TorrentStore};
|
use crate::store::{get_action_messages, show_toast_with_signal, FilterStatus};
|
||||||
use crate::api;
|
use crate::api;
|
||||||
use shared::{NotificationLevel, Torrent};
|
use shared::{NotificationLevel, Torrent};
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
@@ -192,7 +192,7 @@ pub fn TorrentTable() -> impl IntoView {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
view! { <span class="ml-1 text-xs opacity-0 group-hover:opacity-50">"▲"</span> }
|
view! { <span class="ml-1 text-xs opacity-0 group-hover:opacity-50">"▲"</span> }
|
||||||
.into_view()
|
.into_any()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -382,8 +382,8 @@ pub fn TorrentTable() -> impl IntoView {
|
|||||||
visible=true
|
visible=true
|
||||||
position=menu_position.get()
|
position=menu_position.get()
|
||||||
torrent_hash=selected_hash.get().unwrap_or_default()
|
torrent_hash=selected_hash.get().unwrap_or_default()
|
||||||
on_close=Callback::from(move |()| set_menu_visible.set(false))
|
on_close=Callback::new(move |()| set_menu_visible.set(false))
|
||||||
on_action=Callback::from(move |args| on_action(args))
|
on_action=Callback::new(move |args| on_action(args))
|
||||||
/>
|
/>
|
||||||
</Show>
|
</Show>
|
||||||
</div>
|
</div>
|
||||||
@@ -449,7 +449,7 @@ fn TorrentRow(
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
<td class="font-medium truncate max-w-xs" title={t.name.clone()}>
|
<td class="font-medium truncate max-w-xs" title={t.name.clone()}>
|
||||||
{t.name}
|
{t.name.clone()}
|
||||||
</td>
|
</td>
|
||||||
<td class="opacity-80 font-mono text-[11px]">{format_bytes(t.size)}</td>
|
<td class="opacity-80 font-mono text-[11px]">{format_bytes(t.size)}</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -614,4 +614,4 @@ fn TorrentCard(
|
|||||||
}
|
}
|
||||||
</Show>
|
</Show>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
use wasm_bindgen::prelude::*;
|
use wasm_bindgen::prelude::*;
|
||||||
use web_sys::{Notification, NotificationOptions};
|
use web_sys::{Notification, NotificationOptions};
|
||||||
use leptos::*;
|
use leptos::prelude::*;
|
||||||
|
use reactive_graph::traits::Get; // Signal::get() için gerekli
|
||||||
use leptos_use::{use_web_notification, UseWebNotificationReturn, NotificationPermission};
|
use leptos_use::{use_web_notification, UseWebNotificationReturn, NotificationPermission};
|
||||||
|
|
||||||
/// Request browser notification permission from user
|
/// Request browser notification permission from user
|
||||||
|
|||||||
Reference in New Issue
Block a user