add prefix "_" to "named" IDs

This commit is contained in:
zadam
2022-12-21 16:11:00 +01:00
parent 1b24276a4a
commit 724f99f17c
49 changed files with 215 additions and 192 deletions

View File

@@ -18,7 +18,7 @@ const TPL = `
export default class SharedInfoWidget extends NoteContextAwareWidget {
isEnabled() {
return super.isEnabled() && this.noteId !== 'share' && this.note.hasAncestor('share');
return super.isEnabled() && this.noteId !== '_share' && this.note.hasAncestor('_share');
}
doRender() {
@@ -55,7 +55,7 @@ export default class SharedInfoWidget extends NoteContextAwareWidget {
}
entitiesReloadedEvent({loadResults}) {
if (loadResults.getAttributes().find(attr => attr.name.startsWith("share") && attributeService.isAffecting(attr, this.note))) {
if (loadResults.getAttributes().find(attr => attr.name.startsWith('_share') && attributeService.isAffecting(attr, this.note))) {
this.refresh();
}
else if (loadResults.getBranches().find(branch => branch.noteId === this.noteId)) {