implemented "search in subtree"

This commit is contained in:
zadam
2020-12-05 23:00:28 +01:00
parent b0e5ab7533
commit 90d33f56c3
13 changed files with 98 additions and 82 deletions

View File

@@ -176,21 +176,6 @@ export default class Entrypoints extends Component {
}
}
async searchForResultsCommand({searchText}) {
const response = await server.get('search/' + encodeURIComponent(searchText) + '?includeNoteContent=true&excludeArchived=true&fuzzyAttributeSearch=false');
if (!response.success) {
toastService.showError("Search failed: " + response.message, 10000);
// even in this case we'll show the results
}
this.triggerEvent('searchResults', {results: response.results});
// have at least some feedback which is good especially in situations
// when the result list does not change with a query
toastService.showMessage("Search finished successfully.");
}
async switchToDesktopVersionCommand() {
utils.setCookie('trilium-device', 'desktop');