Skip to content

Commit

Permalink
Merge branch 'main' into cluster-switch
Browse files Browse the repository at this point in the history
  • Loading branch information
TristanHoladay authored Nov 4, 2024
2 parents fb247a3 + 6ae1097 commit fa3588e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions ui/src/lib/components/AnsiDisplay/component.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
const convert = new Convert({
newline: true,
stream: true,
escapeXML: true,
})
let termElement: HTMLElement | null
let scrollAnchor: Element | null | undefined
Expand Down
14 changes: 14 additions & 0 deletions ui/src/lib/features/navigation/sidebar/component.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,20 @@
return route
})
}
// If link was clicked, updating url, but path is a child route that is currently not renendered
// we need to toggle the submenu to show the child route
function updateOnLinkClicks(path: string) {
for (const route of routes) {
if (path.includes(route.path) && !toggleSubmenus[route.path]) {
toggleSubmenus[route.path] = true
}
}
}
$: if ($page.url.pathname) {
updateOnLinkClicks($page.url.pathname)
}
</script>

<aside
Expand Down

0 comments on commit fa3588e

Please sign in to comment.