hotfix: hard-coded URL for chat in dashboard (#15)
All checks were successful
CI / Format (push) Successful in 3s
CI / Clippy (push) Successful in 2m53s
CI / Security Audit (push) Successful in 1m42s
CI / Tests (push) Successful in 4m11s
CI / Deploy (push) Successful in 3s

Co-authored-by: Sharang Parnerkar <parnerkarsharang@gmail.com>
Reviewed-on: #15
This commit was merged in pull request #15.
This commit is contained in:
2026-02-24 11:52:59 +00:00
parent 208450e618
commit 9085da9fae
5 changed files with 20 additions and 11 deletions

View File

@@ -65,6 +65,7 @@ pub fn AppShell() -> Element {
email: info.email,
name: info.name,
avatar_url: info.avatar_url,
librechat_url: info.librechat_url,
class: sidebar_cls,
on_nav: move |_| mobile_menu_open.set(false),
}

View File

@@ -13,7 +13,7 @@ enum NavTarget {
/// Internal Dioxus route (rendered as `Link { to: route }`).
Internal(Route),
/// External URL opened in a new tab (rendered as `<a href>`).
External(&'static str),
External(String),
}
/// Navigation entry for the sidebar.
@@ -43,6 +43,7 @@ pub fn Sidebar(
name: String,
email: String,
avatar_url: String,
#[props(default = "http://localhost:3080".to_string())] librechat_url: String,
#[props(default = "sidebar".to_string())] class: String,
#[props(default)] on_nav: EventHandler<()>,
) -> Element {
@@ -66,7 +67,7 @@ pub fn Sidebar(
key: "chat",
label: t(locale_val, "nav.chat"),
// Opens LibreChat in a new tab; SSO via shared Keycloak realm.
target: NavTarget::External("http://localhost:3080"),
target: NavTarget::External(librechat_url.clone()),
icon: rsx! { Icon { icon: BsChatDots, width: 18, height: 18 } },
},
NavItem {
@@ -124,7 +125,7 @@ pub fn Sidebar(
}
}
NavTarget::External(url) => {
let url = *url;
let url = url.clone();
rsx! {
a {
href: url,