diff --git a/frontend/src/components/context_menu.rs b/frontend/src/components/context_menu.rs index 382ba7b..5404ed5 100644 --- a/frontend/src/components/context_menu.rs +++ b/frontend/src/components/context_menu.rs @@ -1,5 +1,7 @@ use leptos::prelude::*; -use crate::components::ui::context_menu::*; +use crate::components::ui::context_menu::{ + ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuTrigger, +}; #[component] pub fn TorrentContextMenu( @@ -7,72 +9,38 @@ pub fn TorrentContextMenu( torrent_hash: String, on_action: Callback<(String, String)>, ) -> impl IntoView { - let hash = StoredValue::new(torrent_hash); - - let menu_action = move |action: &'static str| { - on_action.run((action.to_string(), hash.get_value())); + let hash = torrent_hash.clone(); + let on_action_stored = StoredValue::new(on_action); + + // Define helper to avoid move issues + let run_action = move |action: &str| { + on_action_stored.get_value().run((action.to_string(), hash.clone())); }; + let hash_c1 = torrent_hash.clone(); + let hash_c2 = torrent_hash.clone(); + let hash_c3 = torrent_hash.clone(); + let hash_c4 = torrent_hash.clone(); + view! { {children()} - - - - - - - "Start" - - - - - - - "Stop" - - - - - - - "Recheck" - - -
- - - - - - "Remove" - - - - - - - "Remove with Data" - "Hold" - + + + "Başlat" + + + "Durdur" + + + "Sil" + + + "Verilerle Birlikte Sil" + } -} \ No newline at end of file +} diff --git a/frontend/src/components/layout/sidebar.rs b/frontend/src/components/layout/sidebar.rs index 4e70d92..485236d 100644 --- a/frontend/src/components/layout/sidebar.rs +++ b/frontend/src/components/layout/sidebar.rs @@ -146,48 +146,50 @@ pub fn Sidebar() -> impl IntoView { - - // Push Notification Toggle -
-
- "Bildirimler" - "Web Push" + +
+ // Push Notification Toggle +
+
+ "Bildirimler" + "Web Push" +
+
- -
-
-
- {first_letter} -
-
-
{username}
-
"Yönetici"
-
- -
- +
+
+ {first_letter} +
+
+
{username}
+
"Yönetici"
+
- +
+ + + +
diff --git a/frontend/src/components/ui/separator.rs b/frontend/src/components/ui/separator.rs index 0809cdc..749fd61 100644 --- a/frontend/src/components/ui/separator.rs +++ b/frontend/src/components/ui/separator.rs @@ -1,35 +1,20 @@ use leptos::prelude::*; -use tw_merge::*; +use tailwind_fuse::tw_merge; + +#[derive(Clone, Copy, PartialEq, Eq, Default, Debug)] +pub enum SeparatorOrientation { #[default] Horizontal, Vertical } #[component] pub fn Separator( #[prop(into, optional)] orientation: Signal, #[prop(into, optional)] class: String, - // children: Children, ) -> impl IntoView { - let merged_class = Memo::new(move |_| { - let orientation = orientation.get(); - let separator = SeparatorClass { orientation }; - separator.with_class(class.clone()) - }); - - view! {