added #shareDisallowRobotIndexing label and reworked how the child-image exclusion works

This commit is contained in:
zadam
2022-03-22 23:17:47 +01:00
parent 0a95d0f6f5
commit e00fcd93a1
9 changed files with 52 additions and 32 deletions

View File

@@ -59,7 +59,10 @@ class Note extends AbstractEntity {
}
getVisibleChildNotes() {
return this.children.filter(childNote => !childNote.hasLabel('shareHiddenFromTree') && !childNote.isProtected);
return this.getChildBranches()
.filter(branch => !branch.isHidden)
.map(branch => branch.getNote())
.filter(childNote => !childNote.hasLabel('shareHiddenFromTree') && !childNote.isProtected);
}
hasChildren() {
@@ -67,7 +70,7 @@ class Note extends AbstractEntity {
}
hasVisibleChildren() {
return this.children && !!this.children.find(childNote => !childNote.hasLabel('shareHiddenFromTree') && !childNote.isProtected);
return this.getVisibleChildNotes().length > 0;
}
getChildBranches() {