mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-02 21:42:15 +08:00
fix(client): quick search in vertical layout
This commit is contained in:
parent
13e33549c1
commit
0f7b96f096
@ -61,7 +61,12 @@ export default class LauncherWidget extends BasicWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!this.innerWidget) {
|
if (!this.innerWidget) {
|
||||||
throw new Error(`Unknown initialization error for note '${note.noteId}', title '${note.title}'`);
|
if (launcherType === "builtinWidget") {
|
||||||
|
// This allows filtering of builtin widgets based on the layout (horizontal / vertical)
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
throw new Error(`Unknown initialization error for note '${note.noteId}', title '${note.title}'`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.child(this.innerWidget);
|
this.child(this.innerWidget);
|
||||||
@ -113,7 +118,7 @@ export default class LauncherWidget extends BasicWidget {
|
|||||||
case "todayInJournal":
|
case "todayInJournal":
|
||||||
return new TodayLauncher(note);
|
return new TodayLauncher(note);
|
||||||
case "quickSearch":
|
case "quickSearch":
|
||||||
return new QuickSearchWidget();
|
return this.isHorizontalLayout ? new QuickSearchWidget() : null;
|
||||||
default:
|
default:
|
||||||
throw new Error(`Unrecognized builtin widget ${builtinWidget} for launcher ${note.noteId} "${note.title}"`);
|
throw new Error(`Unrecognized builtin widget ${builtinWidget} for launcher ${note.noteId} "${note.title}"`);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user