create dashboard/search toggle.
modified: Cargo.lock modified: Cargo.toml modified: src/app.rs modified: src/components.rs new file: src/components/search.rs modified: src/components/sidebar.rs modified: src/pages/signup.rs modified: style/dashboard.scss modified: style/main.scss new file: style/search.scss modified: style/sidebar.scss
This commit is contained in:
18
src/app.rs
18
src/app.rs
@ -6,8 +6,7 @@ use leptos_meta::*;
|
||||
use leptos_router::*;
|
||||
use crate::pages::login::*;
|
||||
use crate::pages::signup::*;
|
||||
use crate::components::sidebar::*;
|
||||
use crate::components::dashboard::*;
|
||||
|
||||
|
||||
#[component]
|
||||
pub fn App() -> impl IntoView {
|
||||
@ -36,16 +35,27 @@ pub fn App() -> impl IntoView {
|
||||
}
|
||||
}
|
||||
|
||||
use crate::components::sidebar::*;
|
||||
use crate::components::dashboard::*;
|
||||
use crate::components::search::*;
|
||||
|
||||
/// Renders the home page of your application.
|
||||
#[component]
|
||||
fn HomePage() -> impl IntoView {
|
||||
let mut play_status = PlayStatus::default();
|
||||
let play_status = create_rw_signal(play_status);
|
||||
|
||||
let (dashboard_open, set_dashboard_open) = create_signal(true);
|
||||
|
||||
view! {
|
||||
<div class="home-container">
|
||||
<Sidebar />
|
||||
<Dashboard />
|
||||
<Sidebar setter=set_dashboard_open />
|
||||
<Show
|
||||
when=move || {dashboard_open() == true}
|
||||
fallback=move || view! { <Search /> }
|
||||
>
|
||||
<Dashboard />
|
||||
</Show>
|
||||
<PlayBar status=play_status/>
|
||||
<Queue status=play_status/>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user