Compare commits
8 Commits
release-20
...
release-20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7129c9a8eb | ||
|
|
91202e7cf8 | ||
|
|
3c2fec8b8c | ||
|
|
ec23285a6a | ||
|
|
f075a87668 | ||
|
|
3ce980239c | ||
|
|
d00fc41010 | ||
|
|
0636020a86 |
3
Cargo.lock
generated
3
Cargo.lock
generated
@@ -320,9 +320,11 @@ dependencies = [
|
|||||||
"dotenvy",
|
"dotenvy",
|
||||||
"futures",
|
"futures",
|
||||||
"governor",
|
"governor",
|
||||||
|
"icons",
|
||||||
"jsonwebtoken",
|
"jsonwebtoken",
|
||||||
"leptos",
|
"leptos",
|
||||||
"leptos_axum",
|
"leptos_axum",
|
||||||
|
"leptos_ui",
|
||||||
"mime_guess",
|
"mime_guess",
|
||||||
"openssl",
|
"openssl",
|
||||||
"quick-xml",
|
"quick-xml",
|
||||||
@@ -343,6 +345,7 @@ dependencies = [
|
|||||||
"tower_governor",
|
"tower_governor",
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-subscriber",
|
"tracing-subscriber",
|
||||||
|
"tw_merge",
|
||||||
"utoipa",
|
"utoipa",
|
||||||
"utoipa-swagger-ui",
|
"utoipa-swagger-ui",
|
||||||
"web-push",
|
"web-push",
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
members = ["backend", "frontend", "shared"]
|
members = ["backend", "frontend", "shared"]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
|
[[workspace.metadata.leptos]]
|
||||||
|
tailwind-input-file = "frontend/input.css"
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
# En küçük binary boyutu
|
# En küçük binary boyutu
|
||||||
opt-level = "z"
|
opt-level = "z"
|
||||||
|
|||||||
@@ -46,4 +46,7 @@ governor = "0.10.4"
|
|||||||
# Leptos
|
# Leptos
|
||||||
leptos = { version = "0.8.15", features = ["nightly"] }
|
leptos = { version = "0.8.15", features = ["nightly"] }
|
||||||
leptos_axum = { version = "0.8.7" }
|
leptos_axum = { version = "0.8.7" }
|
||||||
jsonwebtoken = "9"
|
jsonwebtoken = "9"
|
||||||
|
tw_merge = { version = "0.1.17", features = ["variant"] }
|
||||||
|
icons = { version = "0.18.0", features = ["leptos"] }
|
||||||
|
leptos_ui = "0.3.20"
|
||||||
|
|||||||
@@ -3,70 +3,76 @@
|
|||||||
|
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--background: 0 0% 100%;
|
--radius: 0.625rem;
|
||||||
--foreground: 240 10% 3.9%;
|
--background: oklch(1 0 0);
|
||||||
--card: 0 0% 100%;
|
--foreground: oklch(0.145 0 0);
|
||||||
--card-foreground: 240 10% 3.9%;
|
--card: oklch(1 0 0);
|
||||||
--popover: 0 0% 100%;
|
--card-foreground: oklch(0.145 0 0);
|
||||||
--popover-foreground: 240 10% 3.9%;
|
--popover: oklch(1 0 0);
|
||||||
--primary: 240 5.9% 10%;
|
--popover-foreground: oklch(0.145 0 0);
|
||||||
--primary-foreground: 0 0% 98%;
|
--primary: oklch(0.205 0 0);
|
||||||
--secondary: 240 4.8% 95.9%;
|
--primary-foreground: oklch(0.985 0 0);
|
||||||
--secondary-foreground: 240 5.9% 10%;
|
--secondary: oklch(0.97 0 0);
|
||||||
--muted: 240 4.8% 95.9%;
|
--secondary-foreground: oklch(0.205 0 0);
|
||||||
--muted-foreground: 240 3.8% 46.1%;
|
--muted: oklch(0.97 0 0);
|
||||||
--accent: 240 4.8% 95.9%;
|
--muted-foreground: oklch(0.556 0 0);
|
||||||
--accent-foreground: 240 5.9% 10%;
|
--accent: oklch(0.97 0 0);
|
||||||
--destructive: 0 84.2% 60.2%;
|
--accent-foreground: oklch(0.205 0 0);
|
||||||
--destructive-foreground: 0 0% 98%;
|
--destructive: oklch(0.577 0.245 27.325);
|
||||||
--border: 240 5.9% 90%;
|
--border: oklch(0.922 0 0);
|
||||||
--input: 240 5.9% 90%;
|
--input: oklch(0.922 0 0);
|
||||||
--ring: 240 5.9% 10%;
|
--ring: oklch(0.708 0 0);
|
||||||
--radius: 0.5rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.dark {
|
.dark {
|
||||||
--background: 240 10% 3.9%;
|
--background: oklch(0.145 0 0);
|
||||||
--foreground: 0 0% 98%;
|
--foreground: oklch(0.985 0 0);
|
||||||
--card: 240 10% 3.9%;
|
--card: oklch(0.205 0 0);
|
||||||
--card-foreground: 0 0% 98%;
|
--card-foreground: oklch(0.985 0 0);
|
||||||
--popover: 240 10% 3.9%;
|
--popover: oklch(0.205 0 0);
|
||||||
--popover-foreground: 0 0% 98%;
|
--popover-foreground: oklch(0.985 0 0);
|
||||||
--primary: 0 0% 98%;
|
--primary: oklch(0.922 0 0);
|
||||||
--primary-foreground: 240 5.9% 10%;
|
--primary-foreground: oklch(0.205 0 0);
|
||||||
--secondary: 240 3.7% 15.9%;
|
--secondary: oklch(0.269 0 0);
|
||||||
--secondary-foreground: 0 0% 98%;
|
--secondary-foreground: oklch(0.985 0 0);
|
||||||
--muted: 240 3.7% 15.9%;
|
--muted: oklch(0.269 0 0);
|
||||||
--muted-foreground: 240 5% 64.9%;
|
--muted-foreground: oklch(0.708 0 0);
|
||||||
--accent: 240 3.7% 15.9%;
|
--accent: oklch(0.269 0 0);
|
||||||
--accent-foreground: 0 0% 98%;
|
--accent-foreground: oklch(0.985 0 0);
|
||||||
--destructive: 0 62.8% 30.6%;
|
--destructive: oklch(0.704 0.191 22.216);
|
||||||
--destructive-foreground: 0 0% 98%;
|
--border: oklch(1 0 0 / 10%);
|
||||||
--border: 240 3.7% 15.9%;
|
--input: oklch(1 0 0 / 15%);
|
||||||
--input: 240 3.7% 15.9%;
|
--ring: oklch(0.556 0 0);
|
||||||
--ring: 240 4.9% 83.9%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@theme inline {
|
@theme inline {
|
||||||
--color-background: hsl(var(--background));
|
--animate-shimmer: shimmer 2s infinite;
|
||||||
--color-foreground: hsl(var(--foreground));
|
|
||||||
--color-card: hsl(var(--card));
|
@keyframes shimmer {
|
||||||
--color-card-foreground: hsl(var(--card-foreground));
|
100% {
|
||||||
--color-popover: hsl(var(--popover));
|
transform: translateX(100%);
|
||||||
--color-popover-foreground: hsl(var(--popover-foreground));
|
}
|
||||||
--color-primary: hsl(var(--primary));
|
}
|
||||||
--color-primary-foreground: hsl(var(--primary-foreground));
|
|
||||||
--color-secondary: hsl(var(--secondary));
|
--color-background: var(--background);
|
||||||
--color-secondary-foreground: hsl(var(--secondary-foreground));
|
--color-foreground: var(--foreground);
|
||||||
--color-muted: hsl(var(--muted));
|
--color-card: var(--card);
|
||||||
--color-muted-foreground: hsl(var(--muted-foreground));
|
--color-card-foreground: var(--card-foreground);
|
||||||
--color-accent: hsl(var(--accent));
|
--color-popover: var(--popover);
|
||||||
--color-accent-foreground: hsl(var(--accent-foreground));
|
--color-popover-foreground: var(--popover-foreground);
|
||||||
--color-destructive: hsl(var(--destructive));
|
--color-primary: var(--primary);
|
||||||
--color-destructive-foreground: hsl(var(--destructive-foreground));
|
--color-primary-foreground: var(--primary-foreground);
|
||||||
--color-border: hsl(var(--border));
|
--color-secondary: var(--secondary);
|
||||||
--color-input: hsl(var(--input));
|
--color-secondary-foreground: var(--secondary-foreground);
|
||||||
--color-ring: hsl(var(--ring));
|
--color-muted: var(--muted);
|
||||||
|
--color-muted-foreground: var(--muted-foreground);
|
||||||
|
--color-accent: var(--accent);
|
||||||
|
--color-accent-foreground: var(--accent-foreground);
|
||||||
|
--color-destructive: var(--destructive);
|
||||||
|
--color-destructive-foreground: var(--destructive-foreground);
|
||||||
|
--color-border: var(--border);
|
||||||
|
--color-input: var(--input);
|
||||||
|
--color-ring: var(--ring);
|
||||||
--radius-sm: calc(var(--radius) - 4px);
|
--radius-sm: calc(var(--radius) - 4px);
|
||||||
--radius-md: calc(var(--radius) - 2px);
|
--radius-md: calc(var(--radius) - 2px);
|
||||||
--radius-lg: var(--radius);
|
--radius-lg: var(--radius);
|
||||||
@@ -77,6 +83,7 @@
|
|||||||
* {
|
* {
|
||||||
@apply border-border outline-ring/50;
|
@apply border-border outline-ring/50;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
@apply bg-background text-foreground;
|
@apply bg-background text-foreground;
|
||||||
}
|
}
|
||||||
@@ -89,4 +96,4 @@
|
|||||||
dialog {
|
dialog {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -24,10 +24,16 @@ pub fn TorrentContextMenu(
|
|||||||
{children()}
|
{children()}
|
||||||
</ContextMenuTrigger>
|
</ContextMenuTrigger>
|
||||||
<ContextMenuContent class="w-56 p-1.5">
|
<ContextMenuContent class="w-56 p-1.5">
|
||||||
<ContextMenuItem on:click={let h = hash_c1; move |_| on_action_stored.get_value().run(("start".to_string(), h.clone()))}>
|
<ContextMenuItem on:click={let h = hash_c1; move |_| {
|
||||||
|
on_action_stored.get_value().run(("start".to_string(), h.clone()));
|
||||||
|
crate::components::ui::context_menu::close_context_menu();
|
||||||
|
}}>
|
||||||
"Başlat"
|
"Başlat"
|
||||||
</ContextMenuItem>
|
</ContextMenuItem>
|
||||||
<ContextMenuItem on:click={let h = hash_c2; move |_| on_action_stored.get_value().run(("stop".to_string(), h.clone()))}>
|
<ContextMenuItem on:click={let h = hash_c2; move |_| {
|
||||||
|
on_action_stored.get_value().run(("stop".to_string(), h.clone()));
|
||||||
|
crate::components::ui::context_menu::close_context_menu();
|
||||||
|
}}>
|
||||||
"Durdur"
|
"Durdur"
|
||||||
</ContextMenuItem>
|
</ContextMenuItem>
|
||||||
|
|
||||||
|
|||||||
91
frontend/src/components/demos/demo_shimmer.rs
Normal file
91
frontend/src/components/demos/demo_shimmer.rs
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
use leptos::prelude::*;
|
||||||
|
use leptos::task::spawn_local;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
use crate::components::ui::button::{Button, ButtonVariant};
|
||||||
|
use crate::components::ui::card::{Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle};
|
||||||
|
use crate::components::ui::shimmer::Shimmer;
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
pub struct CardData {
|
||||||
|
pub title: String,
|
||||||
|
pub description: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Simulates a database fetch with 1 second delay
|
||||||
|
#[server]
|
||||||
|
pub async fn fetch_card_data() -> Result<CardData, ServerFnError> {
|
||||||
|
// Simulate network/database latency (only on server)
|
||||||
|
#[cfg(feature = "ssr")]
|
||||||
|
tokio::time::sleep(std::time::Duration::from_secs(1)).await;
|
||||||
|
|
||||||
|
Ok(CardData {
|
||||||
|
title: "Fetched Title".to_string(),
|
||||||
|
description: "This content was fetched from the server after a 1 second simulated delay. The shimmer effect automatically showed during the loading period.".to_string(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
#[component]
|
||||||
|
pub fn DemoShimmer() -> impl IntoView {
|
||||||
|
// Loading state
|
||||||
|
let loading = RwSignal::new(false);
|
||||||
|
|
||||||
|
// Store fetched data
|
||||||
|
let card_data = RwSignal::new(None::<CardData>);
|
||||||
|
|
||||||
|
// Fetch handler using spawn_local for reliable repeated calls
|
||||||
|
let on_fetch = move |_| {
|
||||||
|
spawn_local(async move {
|
||||||
|
loading.set(true);
|
||||||
|
let result = fetch_card_data().await;
|
||||||
|
if let Ok(data) = result {
|
||||||
|
card_data.set(Some(data));
|
||||||
|
}
|
||||||
|
loading.set(false);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
view! {
|
||||||
|
<div class="flex flex-col gap-4">
|
||||||
|
<div class="flex gap-2">
|
||||||
|
<Button variant=ButtonVariant::Outline on:click=move |_| loading.set(!loading.get())>
|
||||||
|
"Toggle Loading"
|
||||||
|
</Button>
|
||||||
|
<Button variant=ButtonVariant::Default on:click=on_fetch>
|
||||||
|
"Fetch Data (1s)"
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Shimmer loading=Signal::from(loading)>
|
||||||
|
<Card class="max-w-lg lg:max-w-2xl">
|
||||||
|
<CardHeader>
|
||||||
|
<CardTitle>
|
||||||
|
{move || {
|
||||||
|
card_data.get().map(|data| data.title).unwrap_or_else(|| "Card Title".to_string())
|
||||||
|
}}
|
||||||
|
</CardTitle>
|
||||||
|
</CardHeader>
|
||||||
|
|
||||||
|
<CardContent>
|
||||||
|
<CardDescription>
|
||||||
|
{move || {
|
||||||
|
card_data
|
||||||
|
.get()
|
||||||
|
.map(|data| data.description)
|
||||||
|
.unwrap_or_else(|| {
|
||||||
|
"Click 'Toggle Loading' for manual control, or 'Fetch Data' to simulate a real server call with 1 second delay."
|
||||||
|
.to_string()
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
</CardDescription>
|
||||||
|
</CardContent>
|
||||||
|
|
||||||
|
<CardFooter class="justify-end">
|
||||||
|
<Button variant=ButtonVariant::Outline>"Cancel"</Button>
|
||||||
|
<Button>"Confirm"</Button>
|
||||||
|
</CardFooter>
|
||||||
|
</Card>
|
||||||
|
</Shimmer>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
}
|
||||||
1
frontend/src/components/demos/mod.rs
Normal file
1
frontend/src/components/demos/mod.rs
Normal file
@@ -0,0 +1 @@
|
|||||||
|
pub mod demo_shimmer;
|
||||||
@@ -1,5 +1,31 @@
|
|||||||
use leptos::prelude::*;
|
use std::collections::hash_map::DefaultHasher;
|
||||||
|
use std::hash::{Hash, Hasher};
|
||||||
|
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||||
|
|
||||||
pub fn use_random_id_for(prefix: &str) -> String {
|
const PREFIX: &str = "rust_ui"; // Must NOT contain "/" or "-"
|
||||||
format!("{}_{}", prefix, js_sys::Math::random().to_string().replace(".", ""))
|
|
||||||
|
pub fn use_random_id() -> String {
|
||||||
|
format!("_{PREFIX}_{}", generate_hash())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn use_random_id_for(element: &str) -> String {
|
||||||
|
format!("{}_{PREFIX}_{}", element, generate_hash())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn use_random_transition_name() -> String {
|
||||||
|
let random_id = use_random_id();
|
||||||
|
format!("view-transition-name: {random_id}")
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========================================================== */
|
||||||
|
/* ✨ FUNCTIONS ✨ */
|
||||||
|
/* ========================================================== */
|
||||||
|
|
||||||
|
static COUNTER: AtomicUsize = AtomicUsize::new(1);
|
||||||
|
|
||||||
|
fn generate_hash() -> u64 {
|
||||||
|
let mut hasher = DefaultHasher::new();
|
||||||
|
let counter = COUNTER.fetch_add(1, Ordering::SeqCst);
|
||||||
|
counter.hash(&mut hasher);
|
||||||
|
hasher.finish()
|
||||||
|
}
|
||||||
@@ -5,3 +5,4 @@ pub mod torrent;
|
|||||||
pub mod auth;
|
pub mod auth;
|
||||||
// pub mod toast; (Removed)
|
// pub mod toast; (Removed)
|
||||||
pub mod ui;
|
pub mod ui;
|
||||||
|
pub mod demos;
|
||||||
|
|||||||
178
frontend/src/components/torrent/details.rs
Normal file
178
frontend/src/components/torrent/details.rs
Normal file
@@ -0,0 +1,178 @@
|
|||||||
|
use leptos::prelude::*;
|
||||||
|
use crate::components::ui::sheet::*;
|
||||||
|
use crate::components::ui::tabs::*;
|
||||||
|
use crate::components::ui::skeleton::*;
|
||||||
|
use shared::Torrent;
|
||||||
|
|
||||||
|
#[component]
|
||||||
|
pub fn TorrentDetailsSheet() -> impl IntoView {
|
||||||
|
let store = use_context::<crate::store::TorrentStore>().expect("store not provided");
|
||||||
|
|
||||||
|
// Setup an effect to open the sheet when a torrent is selected
|
||||||
|
Effect::new(move |_| {
|
||||||
|
if store.selected_torrent.get().is_some() {
|
||||||
|
if let Some(trigger) = document().get_element_by_id("torrent-details-trigger") {
|
||||||
|
use wasm_bindgen::JsCast;
|
||||||
|
let _ = trigger.dyn_into::<web_sys::HtmlElement>().map(|el| el.click());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
let selected_torrent = Memo::new(move |_| {
|
||||||
|
let hash = store.selected_torrent.get()?;
|
||||||
|
store.torrents.with(|map| map.get(&hash).cloned())
|
||||||
|
});
|
||||||
|
|
||||||
|
view! {
|
||||||
|
<Sheet>
|
||||||
|
<SheetTrigger attr:id="torrent-details-trigger" class="hidden">""</SheetTrigger>
|
||||||
|
<SheetContent
|
||||||
|
direction=SheetDirection::Bottom
|
||||||
|
class="h-[80vh] sm:h-[60vh] rounded-t-xl sm:rounded-t-2xl p-0 flex flex-col gap-0 border-t border-border shadow-2xl"
|
||||||
|
hide_close_button=true
|
||||||
|
>
|
||||||
|
<div class="px-6 py-4 border-b flex items-center justify-between sticky top-0 bg-card z-10">
|
||||||
|
<div class="flex flex-col gap-1 min-w-0">
|
||||||
|
<Show when=move || selected_torrent.get().is_some() fallback=move || view! { <Skeleton class="h-6 w-48" /> }>
|
||||||
|
<h2 class="font-bold text-lg truncate">
|
||||||
|
{move || selected_torrent.get().map(|t| t.name).unwrap_or_default()}
|
||||||
|
</h2>
|
||||||
|
</Show>
|
||||||
|
<Show when=move || selected_torrent.get().is_some() fallback=move || view! { <Skeleton class="h-4 w-24" /> }>
|
||||||
|
<p class="text-xs text-muted-foreground uppercase tracking-widest font-semibold flex items-center gap-2">
|
||||||
|
{move || selected_torrent.get().map(|t| format!("{:?}", t.status)).unwrap_or_default()}
|
||||||
|
<span class="bg-primary/20 text-primary px-1.5 py-0.5 rounded text-[10px] lowercase">{move || selected_torrent.get().map(|t| format!("{:.1}%", t.percent_complete)).unwrap_or_default()}</span>
|
||||||
|
</p>
|
||||||
|
</Show>
|
||||||
|
</div>
|
||||||
|
// Custom close button that also resets store.selected_torrent
|
||||||
|
<SheetClose class="rounded-full p-2 hover:bg-muted transition-colors border-none shadow-none cursor-pointer">
|
||||||
|
<icons::X class="size-5 opacity-70" on:click=move |_| store.selected_torrent.set(None) />
|
||||||
|
</SheetClose>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex-1 overflow-hidden p-6">
|
||||||
|
<Tabs default_value="general" class="h-full flex flex-col">
|
||||||
|
<TabsList class="w-full justify-start rounded-none border-b bg-transparent p-0">
|
||||||
|
<TabsTrigger value="general" class="data-[state=active]:bg-transparent data-[state=active]:shadow-none data-[state=active]:border-b-2 data-[state=active]:border-primary rounded-none">
|
||||||
|
"Genel"
|
||||||
|
</TabsTrigger>
|
||||||
|
<TabsTrigger value="files" class="data-[state=active]:bg-transparent data-[state=active]:shadow-none data-[state=active]:border-b-2 data-[state=active]:border-primary rounded-none">
|
||||||
|
"Dosyalar"
|
||||||
|
</TabsTrigger>
|
||||||
|
<TabsTrigger value="trackers" class="data-[state=active]:bg-transparent data-[state=active]:shadow-none data-[state=active]:border-b-2 data-[state=active]:border-primary rounded-none">
|
||||||
|
"İzleyiciler"
|
||||||
|
</TabsTrigger>
|
||||||
|
<TabsTrigger value="peers" class="data-[state=active]:bg-transparent data-[state=active]:shadow-none data-[state=active]:border-b-2 data-[state=active]:border-primary rounded-none">
|
||||||
|
"Eşler"
|
||||||
|
</TabsTrigger>
|
||||||
|
</TabsList>
|
||||||
|
|
||||||
|
<div class="flex-1 overflow-y-auto mt-4 pb-12">
|
||||||
|
<TabsContent value="general" class="space-y-6 animate-in fade-in slide-in-from-bottom-2 duration-300">
|
||||||
|
<crate::components::ui::shimmer::Shimmer
|
||||||
|
loading=Signal::derive(move || selected_torrent.get().is_none())
|
||||||
|
shimmer_color="rgba(0,0,0,0.06)"
|
||||||
|
background_color="rgba(0,0,0,0.04)"
|
||||||
|
>
|
||||||
|
{move || {
|
||||||
|
let t = selected_torrent.get().unwrap_or_else(|| shared::Torrent {
|
||||||
|
hash: "----------------------------------------".to_string(),
|
||||||
|
name: "Yükleniyor...".to_string(),
|
||||||
|
size: 0,
|
||||||
|
completed: 0,
|
||||||
|
down_rate: 0,
|
||||||
|
up_rate: 0,
|
||||||
|
eta: 0,
|
||||||
|
percent_complete: 0.0,
|
||||||
|
status: shared::TorrentStatus::Downloading,
|
||||||
|
error_message: "".to_string(),
|
||||||
|
added_date: 0,
|
||||||
|
label: None,
|
||||||
|
});
|
||||||
|
|
||||||
|
view! {
|
||||||
|
<div class="grid grid-cols-2 md:grid-cols-4 gap-6">
|
||||||
|
<InfoItem label="İndirilen / Toplam" value=format!("{} / {}", format_bytes(t.completed), format_bytes(t.size)) />
|
||||||
|
<InfoItem label="İndirme Hızı" value=format_speed(t.down_rate) class="text-blue-500" />
|
||||||
|
<InfoItem label="Gönderme Hızı" value=format_speed(t.up_rate) class="text-green-500" />
|
||||||
|
<InfoItem label="Eklenme Tarihi" value=format_date(t.added_date) />
|
||||||
|
<InfoItem label="Kalan Süre" value=format_duration(t.eta) />
|
||||||
|
<InfoItem label="Hash" value=t.hash class="col-span-2 md:col-span-4 break-all font-mono text-xs" />
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
</crate::components::ui::shimmer::Shimmer>
|
||||||
|
</TabsContent>
|
||||||
|
|
||||||
|
<TabsContent value="files" class="h-full">
|
||||||
|
<div class="flex flex-col items-center justify-center h-48 opacity-60">
|
||||||
|
<icons::File class="size-12 mb-3 text-muted-foreground" />
|
||||||
|
<p class="text-sm font-medium">"Dosya listesi yakında eklenecek"</p>
|
||||||
|
</div>
|
||||||
|
</TabsContent>
|
||||||
|
|
||||||
|
<TabsContent value="trackers" class="h-full">
|
||||||
|
<div class="flex flex-col items-center justify-center h-48 opacity-60">
|
||||||
|
<icons::Settings2 class="size-12 mb-3 text-muted-foreground" />
|
||||||
|
<p class="text-sm font-medium">"İzleyici listesi yakında eklenecek"</p>
|
||||||
|
</div>
|
||||||
|
</TabsContent>
|
||||||
|
|
||||||
|
<TabsContent value="peers" class="h-full">
|
||||||
|
<div class="flex flex-col items-center justify-center h-48 opacity-60">
|
||||||
|
<icons::Users class="size-12 mb-3 text-muted-foreground" />
|
||||||
|
<p class="text-sm font-medium">"Eş listesi yakında eklenecek"</p>
|
||||||
|
</div>
|
||||||
|
</TabsContent>
|
||||||
|
</div>
|
||||||
|
</Tabs>
|
||||||
|
</div>
|
||||||
|
</SheetContent>
|
||||||
|
</Sheet>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[component]
|
||||||
|
fn InfoItem(
|
||||||
|
label: &'static str,
|
||||||
|
value: String,
|
||||||
|
#[prop(optional)] class: &'static str
|
||||||
|
) -> impl IntoView {
|
||||||
|
view! {
|
||||||
|
<div class=tailwind_fuse::tw_merge!("flex flex-col gap-1", class)>
|
||||||
|
<span class="text-xs font-semibold text-muted-foreground uppercase opacity-80">{label}</span>
|
||||||
|
<span class="text-sm font-medium">{value}</span>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn format_bytes(bytes: i64) -> String {
|
||||||
|
const UNITS: [&str; 6] = ["B", "KB", "MB", "GB", "TB", "PB"];
|
||||||
|
if bytes < 1024 { return format!("{} B", bytes); }
|
||||||
|
let i = (bytes as f64).log2().div_euclid(10.0) as usize;
|
||||||
|
format!("{:.1} {}", (bytes as f64) / 1024_f64.powi(i as i32), UNITS[i])
|
||||||
|
}
|
||||||
|
|
||||||
|
fn format_speed(bytes_per_sec: i64) -> String {
|
||||||
|
if bytes_per_sec == 0 { return "0 B/s".to_string(); }
|
||||||
|
format!("{}/s", format_bytes(bytes_per_sec))
|
||||||
|
}
|
||||||
|
|
||||||
|
fn format_duration(seconds: i64) -> String {
|
||||||
|
if seconds <= 0 { return "∞".to_string(); }
|
||||||
|
let days = seconds / 86400;
|
||||||
|
let hours = (seconds % 86400) / 3600;
|
||||||
|
let minutes = (seconds % 3600) / 60;
|
||||||
|
let secs = seconds % 60;
|
||||||
|
if days > 0 { format!("{}g {}s", days, hours) }
|
||||||
|
else if hours > 0 { format!("{}s {}d", hours, minutes) }
|
||||||
|
else if minutes > 0 { format!("{}d {}sn", minutes, secs) }
|
||||||
|
else { format!("{}sn", secs) }
|
||||||
|
}
|
||||||
|
|
||||||
|
fn format_date(timestamp: i64) -> String {
|
||||||
|
if timestamp <= 0 { return "N/A".to_string(); }
|
||||||
|
let dt = chrono::DateTime::from_timestamp(timestamp, 0);
|
||||||
|
match dt { Some(dt) => dt.format("%d/%m/%Y %H:%M").to_string(), None => "N/A".to_string() }
|
||||||
|
}
|
||||||
@@ -1,2 +1,3 @@
|
|||||||
pub mod table;
|
pub mod table;
|
||||||
pub mod add_torrent;
|
pub mod add_torrent;
|
||||||
|
pub mod details;
|
||||||
|
|||||||
@@ -553,6 +553,8 @@ pub fn TorrentTable() -> impl IntoView {
|
|||||||
</div>
|
</div>
|
||||||
<div class="opacity-50">"VibeTorrent v3"</div>
|
<div class="opacity-50">"VibeTorrent v3"</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<crate::components::torrent::details::TorrentDetailsSheet />
|
||||||
</div>
|
</div>
|
||||||
}.into_any()
|
}.into_any()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,13 +3,17 @@ use leptos_ui::clx;
|
|||||||
|
|
||||||
mod components {
|
mod components {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
clx! {Card, div, "bg-card text-card-foreground flex flex-col gap-4 rounded-xl border py-6 shadow-sm"}
|
clx! {Card, div, "bg-card text-card-foreground flex flex-col gap-4 rounded-xl border py-6 shadow-sm"}
|
||||||
clx! {CardHeader, div, "@container/card-header flex flex-col items-start gap-1.5 px-6 [.border-b]:pb-6"}
|
// TODO. Change data-slot=card-action by data-name="CardAction".
|
||||||
|
clx! {CardHeader, div, "@container/card-header flex flex-col items-start gap-1.5 px-6 [.border-b]:pb-6 sm:grid sm:auto-rows-min sm:grid-rows-[auto_auto] has-data-[slot=card-action]:sm:grid-cols-[1fr_auto]"}
|
||||||
clx! {CardTitle, h2, "leading-none font-semibold"}
|
clx! {CardTitle, h2, "leading-none font-semibold"}
|
||||||
clx! {CardContent, div, "px-6"}
|
clx! {CardContent, div, "px-6"}
|
||||||
clx! {CardDescription, p, "text-muted-foreground text-sm"}
|
clx! {CardDescription, p, "text-muted-foreground text-sm"}
|
||||||
clx! {CardFooter, footer, "flex items-center px-6 [.border-t]:pt-6", "gap-2"}
|
clx! {CardFooter, footer, "flex items-center px-6 [.border-t]:pt-6", "gap-2"}
|
||||||
|
|
||||||
|
clx! {CardAction, div, "self-start sm:col-start-2 sm:row-span-2 sm:row-start-1 sm:justify-self-end"}
|
||||||
|
clx! {CardList, ul, "flex flex-col gap-4"}
|
||||||
|
clx! {CardItem, li, "flex items-center [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0"}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub use components::*;
|
pub use components::*;
|
||||||
@@ -17,8 +17,10 @@ pub mod separator;
|
|||||||
pub mod sheet;
|
pub mod sheet;
|
||||||
pub mod sidenav;
|
pub mod sidenav;
|
||||||
pub mod skeleton;
|
pub mod skeleton;
|
||||||
|
pub mod shimmer;
|
||||||
pub mod svg_icon;
|
pub mod svg_icon;
|
||||||
pub mod switch;
|
pub mod switch;
|
||||||
pub mod table;
|
pub mod table;
|
||||||
|
pub mod tabs;
|
||||||
pub mod theme_toggle;
|
pub mod theme_toggle;
|
||||||
pub mod toast;
|
pub mod toast;
|
||||||
52
frontend/src/components/ui/shimmer.rs
Normal file
52
frontend/src/components/ui/shimmer.rs
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
use leptos::prelude::*;
|
||||||
|
use tw_merge::*;
|
||||||
|
|
||||||
|
use crate::components::hooks::use_random::use_random_id_for;
|
||||||
|
|
||||||
|
#[component]
|
||||||
|
pub fn Shimmer(
|
||||||
|
/// Controls shimmer visibility (works with any bool signal)
|
||||||
|
#[prop(into)]
|
||||||
|
loading: Signal<bool>,
|
||||||
|
|
||||||
|
/// Color of the shimmer wave (default: "rgba(255,255,255,0.15)")
|
||||||
|
#[prop(into, optional)]
|
||||||
|
shimmer_color: Option<String>,
|
||||||
|
|
||||||
|
/// Background color of shimmer blocks (default: "rgba(255,255,255,0.08)")
|
||||||
|
#[prop(into, optional)]
|
||||||
|
background_color: Option<String>,
|
||||||
|
|
||||||
|
/// Animation duration in seconds (default: 1.5)
|
||||||
|
#[prop(optional)]
|
||||||
|
duration: Option<f64>,
|
||||||
|
|
||||||
|
/// Fallback border-radius for text elements in px (default: 4)
|
||||||
|
#[prop(optional)]
|
||||||
|
fallback_border_radius: Option<f64>,
|
||||||
|
|
||||||
|
/// Additional classes
|
||||||
|
#[prop(into, optional)]
|
||||||
|
class: String,
|
||||||
|
|
||||||
|
/// Children to wrap
|
||||||
|
children: Children,
|
||||||
|
) -> impl IntoView {
|
||||||
|
let shimmer_id = use_random_id_for("Shimmer");
|
||||||
|
let merged_class = tw_merge!("relative", class);
|
||||||
|
|
||||||
|
view! {
|
||||||
|
<div
|
||||||
|
id=shimmer_id
|
||||||
|
class=merged_class
|
||||||
|
data-name="Shimmer"
|
||||||
|
data-shimmer-loading=move || loading.get().to_string()
|
||||||
|
data-shimmer-color=shimmer_color
|
||||||
|
data-shimmer-bg-color=background_color
|
||||||
|
data-shimmer-duration=duration.map(|d| d.to_string())
|
||||||
|
data-shimmer-fallback-radius=fallback_border_radius.map(|r| r.to_string())
|
||||||
|
>
|
||||||
|
{children()}
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
}
|
||||||
108
frontend/src/components/ui/tabs.rs
Normal file
108
frontend/src/components/ui/tabs.rs
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
use leptos::context::Provider;
|
||||||
|
use leptos::prelude::*;
|
||||||
|
use tw_merge::tw_merge;
|
||||||
|
|
||||||
|
#[derive(Clone)]
|
||||||
|
pub struct TabsContext {
|
||||||
|
pub active_tab: RwSignal<String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[component]
|
||||||
|
pub fn Tabs(
|
||||||
|
#[prop(into)] default_value: String,
|
||||||
|
children: Children,
|
||||||
|
#[prop(optional, into)] class: String,
|
||||||
|
) -> impl IntoView {
|
||||||
|
let active_tab = RwSignal::new(default_value);
|
||||||
|
let ctx = TabsContext { active_tab };
|
||||||
|
|
||||||
|
let merged_class = tw_merge!("w-full", &class);
|
||||||
|
|
||||||
|
view! {
|
||||||
|
<Provider value=ctx>
|
||||||
|
<div data-name="Tabs" class=merged_class>
|
||||||
|
{children()}
|
||||||
|
</div>
|
||||||
|
</Provider>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[component]
|
||||||
|
pub fn TabsList(
|
||||||
|
children: Children,
|
||||||
|
#[prop(optional, into)] class: String,
|
||||||
|
) -> impl IntoView {
|
||||||
|
let merged_class = tw_merge!(
|
||||||
|
"inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
|
||||||
|
&class
|
||||||
|
);
|
||||||
|
|
||||||
|
view! {
|
||||||
|
<div data-name="TabsList" class=merged_class>
|
||||||
|
{children()}
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[component]
|
||||||
|
pub fn TabsTrigger(
|
||||||
|
#[prop(into)] value: String,
|
||||||
|
children: Children,
|
||||||
|
#[prop(optional, into)] class: String,
|
||||||
|
) -> impl IntoView {
|
||||||
|
let ctx = expect_context::<TabsContext>();
|
||||||
|
let v_clone = value.clone();
|
||||||
|
|
||||||
|
let is_active = Memo::new(move |_| ctx.active_tab.get() == v_clone);
|
||||||
|
|
||||||
|
let merged_class = move || tw_merge!(
|
||||||
|
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-pointer select-none",
|
||||||
|
if is_active.get() {
|
||||||
|
"bg-background text-foreground shadow-sm"
|
||||||
|
} else {
|
||||||
|
"hover:bg-background/50 hover:text-foreground"
|
||||||
|
},
|
||||||
|
&class
|
||||||
|
);
|
||||||
|
|
||||||
|
view! {
|
||||||
|
<button
|
||||||
|
data-name="TabsTrigger"
|
||||||
|
type="button"
|
||||||
|
class=merged_class
|
||||||
|
data-state=move || if is_active.get() { "active" } else { "inactive" }
|
||||||
|
on:click=move |_| ctx.active_tab.set(value.clone())
|
||||||
|
>
|
||||||
|
{children()}
|
||||||
|
</button>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[component]
|
||||||
|
pub fn TabsContent(
|
||||||
|
#[prop(into)] value: String,
|
||||||
|
children: Children,
|
||||||
|
#[prop(optional, into)] class: String,
|
||||||
|
) -> impl IntoView {
|
||||||
|
let ctx = expect_context::<TabsContext>();
|
||||||
|
let v_clone = value.clone();
|
||||||
|
|
||||||
|
let is_active = Memo::new(move |_| ctx.active_tab.get() == v_clone);
|
||||||
|
|
||||||
|
let merged_class = move || tw_merge!(
|
||||||
|
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
||||||
|
if !is_active.get() { "hidden" } else { "" },
|
||||||
|
&class
|
||||||
|
);
|
||||||
|
|
||||||
|
view! {
|
||||||
|
<div
|
||||||
|
data-name="TabsContent"
|
||||||
|
class=merged_class
|
||||||
|
data-state=move || if is_active.get() { "active" } else { "inactive" }
|
||||||
|
tabindex=move || if is_active.get() { "0" } else { "-1" }
|
||||||
|
>
|
||||||
|
{children()}
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
}
|
||||||
372
package-lock.json
generated
Normal file
372
package-lock.json
generated
Normal file
@@ -0,0 +1,372 @@
|
|||||||
|
{
|
||||||
|
"name": "vibetorrent-v3",
|
||||||
|
"lockfileVersion": 3,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {
|
||||||
|
"": {
|
||||||
|
"dependencies": {
|
||||||
|
"@tailwindcss/cli": "^4.1.18",
|
||||||
|
"tailwindcss": "^4.1.18",
|
||||||
|
"tw-animate-css": "^1.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@jridgewell/gen-mapping": {
|
||||||
|
"version": "0.3.13",
|
||||||
|
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",
|
||||||
|
"integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@jridgewell/sourcemap-codec": "^1.5.0",
|
||||||
|
"@jridgewell/trace-mapping": "^0.3.24"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@jridgewell/remapping": {
|
||||||
|
"version": "2.3.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz",
|
||||||
|
"integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@jridgewell/gen-mapping": "^0.3.5",
|
||||||
|
"@jridgewell/trace-mapping": "^0.3.24"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@jridgewell/resolve-uri": {
|
||||||
|
"version": "3.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
|
||||||
|
"integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@jridgewell/sourcemap-codec": {
|
||||||
|
"version": "1.5.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",
|
||||||
|
"integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/@jridgewell/trace-mapping": {
|
||||||
|
"version": "0.3.31",
|
||||||
|
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz",
|
||||||
|
"integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@jridgewell/resolve-uri": "^3.1.0",
|
||||||
|
"@jridgewell/sourcemap-codec": "^1.4.14"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@parcel/watcher": {
|
||||||
|
"version": "2.5.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.6.tgz",
|
||||||
|
"integrity": "sha512-tmmZ3lQxAe/k/+rNnXQRawJ4NjxO2hqiOLTHvWchtGZULp4RyFeh6aU4XdOYBFe2KE1oShQTv4AblOs2iOrNnQ==",
|
||||||
|
"hasInstallScript": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"detect-libc": "^2.0.3",
|
||||||
|
"is-glob": "^4.0.3",
|
||||||
|
"node-addon-api": "^7.0.0",
|
||||||
|
"picomatch": "^4.0.3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/parcel"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@parcel/watcher-android-arm64": "2.5.6",
|
||||||
|
"@parcel/watcher-darwin-arm64": "2.5.6",
|
||||||
|
"@parcel/watcher-darwin-x64": "2.5.6",
|
||||||
|
"@parcel/watcher-freebsd-x64": "2.5.6",
|
||||||
|
"@parcel/watcher-linux-arm-glibc": "2.5.6",
|
||||||
|
"@parcel/watcher-linux-arm-musl": "2.5.6",
|
||||||
|
"@parcel/watcher-linux-arm64-glibc": "2.5.6",
|
||||||
|
"@parcel/watcher-linux-arm64-musl": "2.5.6",
|
||||||
|
"@parcel/watcher-linux-x64-glibc": "2.5.6",
|
||||||
|
"@parcel/watcher-linux-x64-musl": "2.5.6",
|
||||||
|
"@parcel/watcher-win32-arm64": "2.5.6",
|
||||||
|
"@parcel/watcher-win32-ia32": "2.5.6",
|
||||||
|
"@parcel/watcher-win32-x64": "2.5.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@parcel/watcher-darwin-arm64": {
|
||||||
|
"version": "2.5.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.6.tgz",
|
||||||
|
"integrity": "sha512-Z2ZdrnwyXvvvdtRHLmM4knydIdU9adO3D4n/0cVipF3rRiwP+3/sfzpAwA/qKFL6i1ModaabkU7IbpeMBgiVEA==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/parcel"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tailwindcss/cli": {
|
||||||
|
"version": "4.1.18",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tailwindcss/cli/-/cli-4.1.18.tgz",
|
||||||
|
"integrity": "sha512-sMZ+lZbDyxwjD2E0L7oRUjJ01Ffjtme5OtjvvnC+cV4CEDcbqzbp25TCpxHj6kWLU9+DlqJOiNgSOgctC2aZmg==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@parcel/watcher": "^2.5.1",
|
||||||
|
"@tailwindcss/node": "4.1.18",
|
||||||
|
"@tailwindcss/oxide": "4.1.18",
|
||||||
|
"enhanced-resolve": "^5.18.3",
|
||||||
|
"mri": "^1.2.0",
|
||||||
|
"picocolors": "^1.1.1",
|
||||||
|
"tailwindcss": "4.1.18"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"tailwindcss": "dist/index.mjs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tailwindcss/node": {
|
||||||
|
"version": "4.1.18",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.1.18.tgz",
|
||||||
|
"integrity": "sha512-DoR7U1P7iYhw16qJ49fgXUlry1t4CpXeErJHnQ44JgTSKMaZUdf17cfn5mHchfJ4KRBZRFA/Coo+MUF5+gOaCQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@jridgewell/remapping": "^2.3.4",
|
||||||
|
"enhanced-resolve": "^5.18.3",
|
||||||
|
"jiti": "^2.6.1",
|
||||||
|
"lightningcss": "1.30.2",
|
||||||
|
"magic-string": "^0.30.21",
|
||||||
|
"source-map-js": "^1.2.1",
|
||||||
|
"tailwindcss": "4.1.18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tailwindcss/oxide": {
|
||||||
|
"version": "4.1.18",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.18.tgz",
|
||||||
|
"integrity": "sha512-EgCR5tTS5bUSKQgzeMClT6iCY3ToqE1y+ZB0AKldj809QXk1Y+3jB0upOYZrn9aGIzPtUsP7sX4QQ4XtjBB95A==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@tailwindcss/oxide-android-arm64": "4.1.18",
|
||||||
|
"@tailwindcss/oxide-darwin-arm64": "4.1.18",
|
||||||
|
"@tailwindcss/oxide-darwin-x64": "4.1.18",
|
||||||
|
"@tailwindcss/oxide-freebsd-x64": "4.1.18",
|
||||||
|
"@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.18",
|
||||||
|
"@tailwindcss/oxide-linux-arm64-gnu": "4.1.18",
|
||||||
|
"@tailwindcss/oxide-linux-arm64-musl": "4.1.18",
|
||||||
|
"@tailwindcss/oxide-linux-x64-gnu": "4.1.18",
|
||||||
|
"@tailwindcss/oxide-linux-x64-musl": "4.1.18",
|
||||||
|
"@tailwindcss/oxide-wasm32-wasi": "4.1.18",
|
||||||
|
"@tailwindcss/oxide-win32-arm64-msvc": "4.1.18",
|
||||||
|
"@tailwindcss/oxide-win32-x64-msvc": "4.1.18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tailwindcss/oxide-darwin-arm64": {
|
||||||
|
"version": "4.1.18",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.1.18.tgz",
|
||||||
|
"integrity": "sha512-Gc2q4Qhs660bhjyBSKgq6BYvwDz4G+BuyJ5H1xfhmDR3D8HnHCmT/BSkvSL0vQLy/nkMLY20PQ2OoYMO15Jd0A==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/detect-libc": {
|
||||||
|
"version": "2.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
|
||||||
|
"integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/enhanced-resolve": {
|
||||||
|
"version": "5.19.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.19.0.tgz",
|
||||||
|
"integrity": "sha512-phv3E1Xl4tQOShqSte26C7Fl84EwUdZsyOuSSk9qtAGyyQs2s3jJzComh+Abf4g187lUUAvH+H26omrqia2aGg==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"graceful-fs": "^4.2.4",
|
||||||
|
"tapable": "^2.3.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10.13.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/graceful-fs": {
|
||||||
|
"version": "4.2.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
|
||||||
|
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
|
||||||
|
"license": "ISC"
|
||||||
|
},
|
||||||
|
"node_modules/is-extglob": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
|
||||||
|
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/is-glob": {
|
||||||
|
"version": "4.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
|
||||||
|
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"is-extglob": "^2.1.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/jiti": {
|
||||||
|
"version": "2.6.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz",
|
||||||
|
"integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"bin": {
|
||||||
|
"jiti": "lib/jiti-cli.mjs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/lightningcss": {
|
||||||
|
"version": "1.30.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.30.2.tgz",
|
||||||
|
"integrity": "sha512-utfs7Pr5uJyyvDETitgsaqSyjCb2qNRAtuqUeWIAKztsOYdcACf2KtARYXg2pSvhkt+9NfoaNY7fxjl6nuMjIQ==",
|
||||||
|
"license": "MPL-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"detect-libc": "^2.0.3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 12.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/parcel"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"lightningcss-android-arm64": "1.30.2",
|
||||||
|
"lightningcss-darwin-arm64": "1.30.2",
|
||||||
|
"lightningcss-darwin-x64": "1.30.2",
|
||||||
|
"lightningcss-freebsd-x64": "1.30.2",
|
||||||
|
"lightningcss-linux-arm-gnueabihf": "1.30.2",
|
||||||
|
"lightningcss-linux-arm64-gnu": "1.30.2",
|
||||||
|
"lightningcss-linux-arm64-musl": "1.30.2",
|
||||||
|
"lightningcss-linux-x64-gnu": "1.30.2",
|
||||||
|
"lightningcss-linux-x64-musl": "1.30.2",
|
||||||
|
"lightningcss-win32-arm64-msvc": "1.30.2",
|
||||||
|
"lightningcss-win32-x64-msvc": "1.30.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/lightningcss-darwin-arm64": {
|
||||||
|
"version": "1.30.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.30.2.tgz",
|
||||||
|
"integrity": "sha512-ylTcDJBN3Hp21TdhRT5zBOIi73P6/W0qwvlFEk22fkdXchtNTOU4Qc37SkzV+EKYxLouZ6M4LG9NfZ1qkhhBWA==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"license": "MPL-2.0",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 12.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/parcel"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/magic-string": {
|
||||||
|
"version": "0.30.21",
|
||||||
|
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz",
|
||||||
|
"integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@jridgewell/sourcemap-codec": "^1.5.5"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/mri": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/node-addon-api": {
|
||||||
|
"version": "7.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz",
|
||||||
|
"integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/picocolors": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
|
||||||
|
"license": "ISC"
|
||||||
|
},
|
||||||
|
"node_modules/picomatch": {
|
||||||
|
"version": "4.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
|
||||||
|
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/jonschlinkert"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/source-map-js": {
|
||||||
|
"version": "1.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
|
||||||
|
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
|
||||||
|
"license": "BSD-3-Clause",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/tailwindcss": {
|
||||||
|
"version": "4.1.18",
|
||||||
|
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.18.tgz",
|
||||||
|
"integrity": "sha512-4+Z+0yiYyEtUVCScyfHCxOYP06L5Ne+JiHhY2IjR2KWMIWhJOYZKLSGZaP5HkZ8+bY0cxfzwDE5uOmzFXyIwxw==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/tapable": {
|
||||||
|
"version": "2.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.0.tgz",
|
||||||
|
"integrity": "sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/webpack"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/tw-animate-css": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tw-animate-css/-/tw-animate-css-1.4.0.tgz",
|
||||||
|
"integrity": "sha512-7bziOlRqH0hJx80h/3mbicLW7o8qLsH5+RaLR2t+OHM3D0JlWGODQKQ4cxbK7WlvmUxpcj6Kgu6EKqjrGFe3QQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/Wombosvideo"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
8
package.json
Normal file
8
package.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"type": "module",
|
||||||
|
"dependencies": {
|
||||||
|
"@tailwindcss/cli": "^4.1.18",
|
||||||
|
"tailwindcss": "^4.1.18",
|
||||||
|
"tw-animate-css": "^1.4.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
2
ui_config.toml
Normal file
2
ui_config.toml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
base_color = "neutral"
|
||||||
|
base_path_components = "backend/src/components"
|
||||||
Reference in New Issue
Block a user