Compare commits

...

3 Commits

Author SHA1 Message Date
spinline
6acb299fbe fix(mobile): add type=button and remove overlay
All checks were successful
Build MIPS Binary / build (push) Successful in 4m11s
2026-02-08 04:37:16 +03:00
spinline
ab49c2ded5 fix(mobile): use pointerdown like statusbar
All checks were successful
Build MIPS Binary / build (push) Successful in 4m15s
2026-02-08 04:27:12 +03:00
spinline
e4957e930d fix(mobile): fix sort dropdown button events
All checks were successful
Build MIPS Binary / build (push) Successful in 4m14s
2026-02-08 04:17:08 +03:00

View File

@@ -339,14 +339,6 @@ pub fn TorrentTable() -> impl IntoView {
</div> </div>
<div class="md:hidden flex flex-col h-full bg-base-200 relative"> <div class="md:hidden flex flex-col h-full bg-base-200 relative">
// Transparent overlay to close sort dropdown
<Show when=move || sort_open.get()>
<div
class="fixed inset-0 z-[98] cursor-default"
on:pointerdown=move |_| set_sort_open.set(false)
></div>
</Show>
<div class="px-3 py-2 border-b border-base-200 flex justify-between items-center bg-base-100/95 backdrop-blur z-10 shrink-0"> <div class="px-3 py-2 border-b border-base-200 flex justify-between items-center bg-base-100/95 backdrop-blur z-10 shrink-0">
<span class="text-xs font-bold opacity-50 uppercase tracking-wider">"Torrents"</span> <span class="text-xs font-bold opacity-50 uppercase tracking-wider">"Torrents"</span>
@@ -368,7 +360,6 @@ pub fn TorrentTable() -> impl IntoView {
<ul <ul
class="absolute top-full right-0 z-[100] menu p-2 shadow bg-base-100 rounded-box w-48 mt-1 border border-base-200 text-xs" class="absolute top-full right-0 z-[100] menu p-2 shadow bg-base-100 rounded-box w-48 mt-1 border border-base-200 text-xs"
style=move || if sort_open.get() { "display: block" } else { "display: none" } style=move || if sort_open.get() { "display: block" } else { "display: none" }
on:pointerdown=move |e| e.stop_propagation()
> >
<li class="menu-title px-2 py-1 opacity-50 text-[10px] uppercase font-bold">"Sort By"</li> <li class="menu-title px-2 py-1 opacity-50 text-[10px] uppercase font-bold">"Sort By"</li>
{ {
@@ -383,20 +374,21 @@ pub fn TorrentTable() -> impl IntoView {
(SortColumn::AddedDate, "Date"), (SortColumn::AddedDate, "Date"),
]; ];
columns.into_iter().map(|(col, label)| { columns.into_iter().map(|(col, label)| {
let is_active = move || sort_col.get() == col; let is_active = move || sort_col.get() == col;
let current_dir = move || sort_dir.get(); let current_dir = move || sort_dir.get();
view! { view! {
<li> <li>
<button <button
class=move || if is_active() { "bg-primary/10 text-primary font-bold flex justify-between" } else { "flex justify-between" } type="button"
on:pointerdown=move |e| { class=move || if is_active() { "bg-primary/10 text-primary font-bold flex justify-between" } else { "flex justify-between" }
e.stop_propagation(); on:pointerdown=move |e| {
handle_sort(col); e.stop_propagation();
set_sort_open.set(false); handle_sort(col);
} set_sort_open.set(false);
> }
>
{label} {label}
<Show when=is_active fallback=|| ()> <Show when=is_active fallback=|| ()>
<span class="opacity-70 text-[10px]"> <span class="opacity-70 text-[10px]">