mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-09-17 09:02:19 +02:00
Addressed feedback
This commit is contained in:
parent
835f6a0d61
commit
26e0b4390b
@ -147,7 +147,7 @@ export default ((userOpts?: Partial<Options>) => {
|
||||
<polyline points="6 9 12 15 18 9"></polyline>
|
||||
</svg>
|
||||
</button>
|
||||
<div id="explorer-content" class="">
|
||||
<div id="explorer-content">
|
||||
<ul class="overflow" id="explorer-ul">
|
||||
<ExplorerNode node={fileTree} opts={opts} fileData={fileData} />
|
||||
<li id="explorer-end" />
|
||||
|
@ -134,8 +134,11 @@ export class FileNode {
|
||||
const traverse = (node: FileNode, currentPath: string) => {
|
||||
if (!node.file) {
|
||||
const folderPath = joinSegments(currentPath, node.name)
|
||||
const collapseState = !currentFile.includes(
|
||||
folderPath.replace("'", "-").replaceAll("../", ""),
|
||||
)
|
||||
if (folderPath !== "") {
|
||||
folderPaths.push({ path: folderPath, collapsed })
|
||||
folderPaths.push({ path: folderPath, collapsed: collapseState || collapsed })
|
||||
}
|
||||
|
||||
node.children.forEach((child) => traverse(child, folderPath))
|
||||
|
Loading…
x
Reference in New Issue
Block a user