Clearing Issues and General Fixes (#592)

* Upgrade link fix

* Fix on-page nav highlighting
This commit is contained in:
Brandon Hopkins
2026-02-17 03:50:06 -08:00
committed by GitHub
parent 5fe0de4379
commit f007175574
2 changed files with 12 additions and 9 deletions

View File

@@ -92,7 +92,7 @@ function useTableOfContents(tableOfContents) {
.flatMap((node) => [node.id, ...node.children.map((child) => child.id)])
.map((id) => {
let el = document.getElementById(id)
if (!el) return
if (!el) return null
let style = window.getComputedStyle(el)
let scrollMt = parseFloat(style.scrollMarginTop)
@@ -100,20 +100,23 @@ function useTableOfContents(tableOfContents) {
let top = window.scrollY + el.getBoundingClientRect().top - scrollMt
return { id, top }
})
.filter(Boolean)
}, [])
useEffect(() => {
if (tableOfContents.length === 0) return
let headings = getHeadings(tableOfContents)
function onScroll() {
let headings = getHeadings(tableOfContents)
if (headings.length === 0) return
let scrollTop = window.scrollY
setShowJumpToTop(scrollTop > 400)
let top = scrollTop + 10;
let current = headings[0]?.id
let top = scrollTop + 10
let current = headings[0].id
for (let heading of headings) {
if (top >= heading?.top) {
current = heading?.id
if (top >= heading.top) {
current = heading.id
} else {
break
}

View File

@@ -42,7 +42,7 @@ Management, Signal, and Relay are all part of the same repository and share the
To upgrade NetBird to the latest version:
1. Run the backup steps described in the [backup](#backup) section.
1. Run the backup steps described in the [backup](/selfhosted/maintenance/backup) section.
2. Review the release notes (see above) for any breaking changes.
3. Pull the latest NetBird docker images:
```bash
@@ -54,7 +54,7 @@ To upgrade NetBird to the latest version:
```
<Note>
For upgrades from older versions (pre-v0.26.0), see the [Legacy upgrade notes](#legacy-self-hosting-with-zitadel-idp).
For upgrades from older versions (pre-v0.26.0), see the [Legacy upgrade notes](#legacy-self-hosting-with-zitadel-idp) below.
</Note>
### Legacy Setup (Separate Containers)