mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 13:26:01 +01:00
created a specific widget for search result to add "no results" message
This commit is contained in:
@@ -23,11 +23,9 @@ const TPL = `
|
||||
export default class NoteListWidget extends TabAwareWidget {
|
||||
isEnabled() {
|
||||
return super.isEnabled()
|
||||
&& ['book', 'text', 'code'].includes(this.note.type)
|
||||
&& this.note.mime !== 'text/x-sqlite;schema=trilium'
|
||||
&& (
|
||||
['book', 'search', 'code'].includes(this.note.type)
|
||||
|| (this.note.type === 'text' && this.note.hasChildren())
|
||||
)
|
||||
&& this.note.hasChildren()
|
||||
&& !this.note.hasLabel('hideChildrenOverview');
|
||||
}
|
||||
|
||||
@@ -89,17 +87,6 @@ export default class NoteListWidget extends TabAwareWidget {
|
||||
setTimeout(() => this.checkRenderStatus(), 100);
|
||||
}
|
||||
|
||||
searchRefreshedEvent({tabId}) {
|
||||
if (!this.isTab(tabId)) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.noteIdRefreshed = this.noteId;
|
||||
this.shownNoteId = null;
|
||||
|
||||
this.checkRenderStatus();
|
||||
}
|
||||
|
||||
notesReloadedEvent({noteIds}) {
|
||||
if (noteIds.includes(this.noteId)) {
|
||||
this.refresh();
|
||||
|
||||
Reference in New Issue
Block a user