mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-25 19:58:30 +03: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
|
||||
// TODO find a better way than parsing current fragment
|
||||
$: selected = getDocumentIdFromFragment(currentFragment ?? '')
|
||||
|
||||
// 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> {
|
||||
return fragment as Ref<Document>
|
||||
export function getDocumentIdFromFragment (fragment: string): Ref<Document> | undefined {
|
||||
const [, _id] = decodeURIComponent(fragment).split('|')
|
||||
return _id as Ref<Document>
|
||||
}
|
||||
|
||||
export function getDocumentUrl (doc: Document): string {
|
||||
|
Loading…
Reference in New Issue
Block a user