mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
don't display similar notes under search
This commit is contained in:
parent
75c3bd8ae3
commit
95760f1d28
@ -41,7 +41,9 @@ const TPL = `
|
|||||||
|
|
||||||
export default class SimilarNotesWidget extends TabAwareWidget {
|
export default class SimilarNotesWidget extends TabAwareWidget {
|
||||||
isEnabled() {
|
isEnabled() {
|
||||||
return super.isEnabled() && !this.note.hasLabel('similarNotesWidgetDisabled');
|
return super.isEnabled()
|
||||||
|
&& this.note.type !== 'search'
|
||||||
|
&& !this.note.hasLabel('similarNotesWidgetDisabled');
|
||||||
}
|
}
|
||||||
|
|
||||||
doRender() {
|
doRender() {
|
||||||
|
@ -566,7 +566,7 @@ class ConsistencyChecks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
runDbDiagnostics() {
|
runDbDiagnostics() {
|
||||||
function getTableCount(tableName) {
|
function getTableRowCount(tableName) {
|
||||||
const count = sql.getValue(`SELECT COUNT(1) FROM ${tableName}`);
|
const count = sql.getValue(`SELECT COUNT(1) FROM ${tableName}`);
|
||||||
|
|
||||||
return `${tableName}: ${count}`;
|
return `${tableName}: ${count}`;
|
||||||
@ -574,7 +574,7 @@ class ConsistencyChecks {
|
|||||||
|
|
||||||
const tables = [ "notes", "note_revisions", "branches", "attributes", "api_tokens" ];
|
const tables = [ "notes", "note_revisions", "branches", "attributes", "api_tokens" ];
|
||||||
|
|
||||||
log.info("Table counts: " + tables.map(tableName => getTableCount(tableName)).join(", "));
|
log.info("Table counts: " + tables.map(tableName => getTableRowCount(tableName)).join(", "));
|
||||||
}
|
}
|
||||||
|
|
||||||
async runChecks() {
|
async runChecks() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user