From 52d53fc7f75fc5ce5f49f222e408fe5e897dd911 Mon Sep 17 00:00:00 2001 From: asepharyana Date: Fri, 3 Jul 2026 22:06:40 +0700 Subject: [PATCH] feat(leptos): Phase 4 Task 7 - LivePanel composition + app.rs wiring --- services/frontend-leptos/frontend/src/app.rs | 3 +- .../frontend/src/features/live/mod.rs | 63 ++++++++++++++++--- 2 files changed, 55 insertions(+), 11 deletions(-) diff --git a/services/frontend-leptos/frontend/src/app.rs b/services/frontend-leptos/frontend/src/app.rs index c5e9bec..5fd6570 100644 --- a/services/frontend-leptos/frontend/src/app.rs +++ b/services/frontend-leptos/frontend/src/app.rs @@ -3,6 +3,7 @@ use shared_types::ui_state::Tab; use crate::auth::AuthOverlay; use crate::ws::context::WsContext; use crate::features::messages::MessagesPanel; +use crate::features::live::LivePanel; #[derive(Clone)] pub struct AppConfig { @@ -93,7 +94,7 @@ pub fn App() -> impl IntoView {
{move || match ui.active_tab.get() { Tab::Messages => view! { }.into_any(), - Tab::Live => view! {
"Live Panel"
}.into_any(), + Tab::Live => view! { }.into_any(), Tab::Dashboard => view! {
"Dashboard Panel"
}.into_any(), }}
diff --git a/services/frontend-leptos/frontend/src/features/live/mod.rs b/services/frontend-leptos/frontend/src/features/live/mod.rs index ac2d4d8..8c5c039 100644 --- a/services/frontend-leptos/frontend/src/features/live/mod.rs +++ b/services/frontend-leptos/frontend/src/features/live/mod.rs @@ -3,20 +3,63 @@ pub mod hooks; pub mod audio; use leptos::prelude::*; -use crate::ui::card::Card; +use crate::ws::context::WsContext; +use components::{ + VoiceConnectionCard, ActiveSpeakers, AudioVisualizer, + NowPlaying, MusicSubPanel, ScreenSubPanel, RecordingsSubPanel, +}; -/// Placeholder LivePanel component for Phase 4 Task 1 -/// Will be expanded with voice connection, music player, and recordings components +/// LivePanel — Composition shell for all voice and media components #[component] pub fn LivePanel() -> impl IntoView { + let ws = use_context::(); + view! { - -
-

Live Monitoring

-

- Live panel components coming in Phase 4 -

+
+
+
+

"Voice & Media"

+

+ "Monitor voice channels, play music, share your screen, and browse recordings." +

+
- + + {/* Top row: Voice connection + speakers + visualizer */} +
+
+ +
+
+ +
+
+ + {/* Audio visualization */} +
+
+
"Audio Visualization"
+
+
+ +
+
+ + {/* Media controls: Now Playing + Music + Screen */} +
+
+ +
+
+ +
+
+ +
+
+ + {/* Recordings */} + +
} }