mirror of
https://github.com/netbirdio/docs.git
synced 2026-04-20 01:16:36 +00:00
Clearing Issues and General Fixes (#592)
* Upgrade link fix * Fix on-page nav highlighting
This commit is contained in:
@@ -92,7 +92,7 @@ function useTableOfContents(tableOfContents) {
|
|||||||
.flatMap((node) => [node.id, ...node.children.map((child) => child.id)])
|
.flatMap((node) => [node.id, ...node.children.map((child) => child.id)])
|
||||||
.map((id) => {
|
.map((id) => {
|
||||||
let el = document.getElementById(id)
|
let el = document.getElementById(id)
|
||||||
if (!el) return
|
if (!el) return null
|
||||||
|
|
||||||
let style = window.getComputedStyle(el)
|
let style = window.getComputedStyle(el)
|
||||||
let scrollMt = parseFloat(style.scrollMarginTop)
|
let scrollMt = parseFloat(style.scrollMarginTop)
|
||||||
@@ -100,20 +100,23 @@ function useTableOfContents(tableOfContents) {
|
|||||||
let top = window.scrollY + el.getBoundingClientRect().top - scrollMt
|
let top = window.scrollY + el.getBoundingClientRect().top - scrollMt
|
||||||
return { id, top }
|
return { id, top }
|
||||||
})
|
})
|
||||||
|
.filter(Boolean)
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (tableOfContents.length === 0) return
|
if (tableOfContents.length === 0) return
|
||||||
let headings = getHeadings(tableOfContents)
|
|
||||||
function onScroll() {
|
function onScroll() {
|
||||||
|
let headings = getHeadings(tableOfContents)
|
||||||
|
if (headings.length === 0) return
|
||||||
|
|
||||||
let scrollTop = window.scrollY
|
let scrollTop = window.scrollY
|
||||||
setShowJumpToTop(scrollTop > 400)
|
setShowJumpToTop(scrollTop > 400)
|
||||||
|
|
||||||
let top = scrollTop + 10;
|
let top = scrollTop + 10
|
||||||
let current = headings[0]?.id
|
let current = headings[0].id
|
||||||
for (let heading of headings) {
|
for (let heading of headings) {
|
||||||
if (top >= heading?.top) {
|
if (top >= heading.top) {
|
||||||
current = heading?.id
|
current = heading.id
|
||||||
} else {
|
} else {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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:
|
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.
|
2. Review the release notes (see above) for any breaking changes.
|
||||||
3. Pull the latest NetBird docker images:
|
3. Pull the latest NetBird docker images:
|
||||||
```bash
|
```bash
|
||||||
@@ -54,7 +54,7 @@ To upgrade NetBird to the latest version:
|
|||||||
```
|
```
|
||||||
|
|
||||||
<Note>
|
<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>
|
</Note>
|
||||||
|
|
||||||
### Legacy Setup (Separate Containers)
|
### Legacy Setup (Separate Containers)
|
||||||
|
|||||||
Reference in New Issue
Block a user