chore: adding opened icon
This commit is contained in:
@ -548,8 +548,17 @@ const CustomIconMap = {
|
|||||||
</svg>
|
</svg>
|
||||||
),
|
),
|
||||||
folderOpen: (
|
folderOpen: (
|
||||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg
|
||||||
<path d="M15.543 16H4.04297L6.54297 8H18.043L15.543 16ZM5.40234 15H14.8086L16.6836 9H7.27734L5.40234 15ZM7.70996 5H14.998L15.041 5.45215L15.1406 6.5H14.1357L14.0879 6H7.37598L5.37598 4.5H3.08594L3.70312 11.9102L2.92188 14.5674L2.04492 4.04199L2 3.5H5.70996L7.70996 5Z" fill="currentColor"/>
|
width="20"
|
||||||
|
height="20"
|
||||||
|
viewBox="0 0 20 20"
|
||||||
|
fill="none"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M15.543 16H4.04297L6.54297 8H18.043L15.543 16ZM5.40234 15H14.8086L16.6836 9H7.27734L5.40234 15ZM7.70996 5H14.998L15.041 5.45215L15.1406 6.5H14.1357L14.0879 6H7.37598L5.37598 4.5H3.08594L3.70312 11.9102L2.92188 14.5674L2.04492 4.04199L2 3.5H5.70996L7.70996 5Z"
|
||||||
|
fill="currentColor"
|
||||||
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
),
|
),
|
||||||
gear: (
|
gear: (
|
||||||
|
|||||||
@ -179,7 +179,6 @@ export const FileExplorer = ({
|
|||||||
const isFile = child.children === null
|
const isFile = child.children === null
|
||||||
const isKCLFile = isFile && child.name?.endsWith(FILE_EXT)
|
const isKCLFile = isFile && child.name?.endsWith(FILE_EXT)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If any parent is closed, keep the history of open children
|
* If any parent is closed, keep the history of open children
|
||||||
*/
|
*/
|
||||||
@ -192,10 +191,13 @@ export const FileExplorer = ({
|
|||||||
pathIterator.pop()
|
pathIterator.pop()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const amIOpen =
|
||||||
const amIOpen = openedRows[constructPath({parentPath: child.parentPath, name: child.name})]
|
openedRows[
|
||||||
const isOpen = (openedRows[child.parentPath] ||
|
constructPath({ parentPath: child.parentPath, name: child.name })
|
||||||
parentProject.name === child.parentPath) &&
|
]
|
||||||
|
const isOpen =
|
||||||
|
(openedRows[child.parentPath] ||
|
||||||
|
parentProject.name === child.parentPath) &&
|
||||||
!isAnyParentClosed
|
!isAnyParentClosed
|
||||||
|
|
||||||
let icon: CustomIconName = 'file'
|
let icon: CustomIconName = 'file'
|
||||||
@ -203,7 +205,7 @@ export const FileExplorer = ({
|
|||||||
icon = 'kcl'
|
icon = 'kcl'
|
||||||
} else if (!isFile && !amIOpen) {
|
} else if (!isFile && !amIOpen) {
|
||||||
icon = 'folder'
|
icon = 'folder'
|
||||||
} else if(!isFile && amIOpen) {
|
} else if (!isFile && amIOpen) {
|
||||||
icon = 'folderOpen'
|
icon = 'folderOpen'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user