MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / folderLabelFor

Function folderLabelFor

packages/app-core/src/lib/cm-wikilinks.ts:30–37  ·  view source on GitHub ↗
(note: NoteMeta)

Source from the content-addressed store, hash-verified

28}
29
30function folderLabelFor(note: NoteMeta): string {
31 const vaultSettings = useStore.getState().vaultSettings
32 const subpath = noteFolderSubpath(note, vaultSettings)
33 if (note.folder === 'inbox' && isPrimaryNotesAtRoot(vaultSettings)) {
34 return subpath ? `${subpath}/` : ''
35 }
36 return subpath ? `${subpath}/` : `${note.folder}/`
37}
38
39function folderLabelForAsset(asset: AssetMeta): string {
40 const parent = asset.path.split('/').slice(0, -1).join('/')

Callers 1

wikilinkSourceFunction · 0.85

Calls 2

noteFolderSubpathFunction · 0.90
isPrimaryNotesAtRootFunction · 0.90

Tested by

no test coverage detected