From e68845a2ce6e6a671b96339f671ff171e3445f83 Mon Sep 17 00:00:00 2001 From: mathieu Date: Sat, 16 May 2026 23:01:05 +0200 Subject: [PATCH] fix(navigation): back button on host detail returns to application when coming from there MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - application_detail: host links now include ?back=/applications/:id - host_detail: back_label handles /applications/ prefix → "← Application" Co-Authored-By: Claude Sonnet 4.6 --- src/client/application_detail.rs | 2 +- src/client/host_detail.rs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/client/application_detail.rs b/src/client/application_detail.rs index 0e21c6a..748b795 100644 --- a/src/client/application_detail.rs +++ b/src/client/application_detail.rs @@ -178,7 +178,7 @@ pub fn ApplicationDetailPage() -> impl IntoView { view! {
+ href=format!("/hosts/{}?back=/applications/{}", host.id, id)> {host.name} {host.ip} diff --git a/src/client/host_detail.rs b/src/client/host_detail.rs index 78e1e7e..2818da7 100644 --- a/src/client/host_detail.rs +++ b/src/client/host_detail.rs @@ -232,7 +232,9 @@ pub fn HostDetailPage() -> impl IntoView { .unwrap_or_else(|| "/hosts".to_string()) }; let back_label = move || { - if back_url().starts_with("/networks/") { "← Network" } else { "← Hosts" } + if back_url().starts_with("/networks/") { "← Network" } + else if back_url().starts_with("/applications/") { "← Application" } + else { "← Hosts" } }; let update_action = ServerAction::::new();