mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-22 00:10:37 +00:00
UBERF-5914 Highlight current wiki document in navigator (#4899)
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
parent
9ef5b8f172
commit
0abd2e39d5
@ -53,7 +53,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
let selected: Ref<Document> | undefined
|
let selected: Ref<Document> | undefined
|
||||||
// TODO find a better way than parsing current fragment
|
|
||||||
$: selected = getDocumentIdFromFragment(currentFragment ?? '')
|
$: selected = getDocumentIdFromFragment(currentFragment ?? '')
|
||||||
|
|
||||||
// TODO expand tree until the selected document ?
|
// TODO expand tree until the selected document ?
|
||||||
|
@ -101,8 +101,9 @@ export async function generateLocation (loc: Location, id: Ref<Document>): Promi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getDocumentIdFromFragment (fragment: string): Ref<Document> {
|
export function getDocumentIdFromFragment (fragment: string): Ref<Document> | undefined {
|
||||||
return fragment as Ref<Document>
|
const [, _id] = decodeURIComponent(fragment).split('|')
|
||||||
|
return _id as Ref<Document>
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getDocumentUrl (doc: Document): string {
|
export function getDocumentUrl (doc: Document): string {
|
||||||
|
Loading…
Reference in New Issue
Block a user