Fix ITS theme folder overview style bug

This commit is contained in:
Lost Paul 2023-12-30 18:27:05 +01:00
parent 2917ff57e0
commit d34e181da8
2 changed files with 7 additions and 1 deletions

View file

@ -233,6 +233,7 @@ export class FolderOverview {
if (folderNote) { this.pathBlacklist.push(folderNote.path); }
}
});
if (tFolder instanceof TFolder) {
this.addFiles(tFolder.children, root);
} else if (yaml.folderPath.trim() === '/') {
@ -244,6 +245,7 @@ export class FolderOverview {
});
this.addFiles(rootFiles, root);
}
newFolderElement.querySelectorAll('div.tree-item-icon').forEach((el) => {
if (el instanceof HTMLElement) {
el.onclick = () => {
@ -287,7 +289,7 @@ export class FolderOverview {
if (folderNote && child.children.length === 1 && this.yaml.disableCollapseIcon) { folderTitle.classList.add('fn-has-no-files') }
const collapseIcon = folderTitle.createDiv({
cls: 'tree-item-icon collapse-icon nav-folder-collapse-indicator',
cls: 'tree-item-icon collapse-icon nav-folder-collapse-indicator fn-folder-overview-collapse-icon',
});
if (child.collapsed) {

View file

@ -113,6 +113,10 @@ body:not(.is-grabbing) .tree-item-self.fn-is-active:hover,
/* Folder overview */
.fn-folder-overview-collapse-icon {
display: block !important;
}
.fn-has-no-files .collapse-icon {
display: none !important;
}