(note: NoteMeta)
| 28 | } |
| 29 | |
| 30 | function 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 | |
| 39 | function folderLabelForAsset(asset: AssetMeta): string { |
| 40 | const parent = asset.path.split('/').slice(0, -1).join('/') |
no test coverage detected