fix(navigation): back button on host detail returns to application when coming from there
- application_detail: host links now include ?back=/applications/:id - host_detail: back_label handles /applications/ prefix → "← Application" Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -178,7 +178,7 @@ pub fn ApplicationDetailPage() -> impl IntoView {
|
|||||||
view! {
|
view! {
|
||||||
<div class="app-row">
|
<div class="app-row">
|
||||||
<a class="table-link"
|
<a class="table-link"
|
||||||
href=format!("/hosts/{}", host.id)>
|
href=format!("/hosts/{}?back=/applications/{}", host.id, id)>
|
||||||
{host.name}
|
{host.name}
|
||||||
</a>
|
</a>
|
||||||
<span class="cell-mono">{host.ip}</span>
|
<span class="cell-mono">{host.ip}</span>
|
||||||
|
|||||||
@@ -232,7 +232,9 @@ pub fn HostDetailPage() -> impl IntoView {
|
|||||||
.unwrap_or_else(|| "/hosts".to_string())
|
.unwrap_or_else(|| "/hosts".to_string())
|
||||||
};
|
};
|
||||||
let back_label = move || {
|
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::<UpdateHost>::new();
|
let update_action = ServerAction::<UpdateHost>::new();
|
||||||
|
|||||||
Reference in New Issue
Block a user