From 39488720428756e44fb00189876bae86cd6a5dc2 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sat, 21 Mar 2026 13:32:41 +0300 Subject: [PATCH] pinakes-ui: playlists view and settings updates Signed-off-by: NotAShelf Change-Id: I7f39eca04360e78cd76c7cb43c2ad2776a6a6964 --- crates/pinakes-ui/src/app.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/crates/pinakes-ui/src/app.rs b/crates/pinakes-ui/src/app.rs index 43699d2..5f59a29 100644 --- a/crates/pinakes-ui/src/app.rs +++ b/crates/pinakes-ui/src/app.rs @@ -22,6 +22,7 @@ use dioxus_free_icons::{ FaDownload, FaGear, FaLayerGroup, + FaList, FaMagnifyingGlass, FaTags, }, @@ -53,6 +54,7 @@ use crate::{ import, library, media_player::PlayQueue, + playlists, search, settings, statistics, @@ -77,6 +79,7 @@ enum View { Detail, Tags, Collections, + Playlists, Books, Audit, Import, @@ -100,6 +103,7 @@ impl View { Self::Detail => "Detail", Self::Tags => "Tags", Self::Collections => "Collections", + Self::Playlists => "Playlists", Self::Books => "Books", Self::Audit => "Audit Log", Self::Import => "Import", @@ -128,6 +132,7 @@ fn parse_plugin_route(route: &str) -> View { ["settings"] => View::Settings, ["tags"] => View::Tags, ["collections"] => View::Collections, + ["playlists"] => View::Playlists, ["books"] => View::Books, ["audit"] => View::Audit, ["import"] => View::Import, @@ -682,6 +687,14 @@ pub fn App() -> Element { span { class: "nav-item-text", "Collections" } span { class: "nav-badge", "{collections_list.read().len()}" } } + button { + class: if *current_view.read() == View::Playlists { "nav-item active" } else { "nav-item" }, + onclick: move |_| current_view.set(View::Playlists), + span { class: "nav-icon", + NavIcon { icon: FaList } + } + span { class: "nav-item-text", "Playlists" } + } button { class: if *current_view.read() == View::Books { "nav-item active" } else { "nav-item" }, onclick: { @@ -1851,6 +1864,9 @@ pub fn App() -> Element { }, } }, + View::Playlists => rsx! { + playlists::Playlists { client } + }, View::Audit => { let page_size = *audit_page_size.read(); let total = *audit_total_count.read(); @@ -2658,6 +2674,8 @@ pub fn App() -> Element { } settings::Settings { config: cfg.clone(), + client: Some(client.read().clone()), + current_user_role: current_user.read().as_ref().map(|u| u.role.clone()), on_add_root: { let client = client.read().clone(); move |path: String| {