mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 08:15:52 +01:00
refactor(client): use different hiding mechanism for quick search
This commit is contained in:
@@ -11,8 +11,19 @@ import QuickSearchWidget from "./quick_search.js";
|
||||
*/
|
||||
export default class QuickSearchLauncherWidget extends QuickSearchWidget {
|
||||
|
||||
constructor(isHorizontalLayout) {
|
||||
super();
|
||||
this.isHorizontalLayout = isHorizontalLayout;
|
||||
}
|
||||
|
||||
isEnabled() {
|
||||
if (!this.isHorizontalLayout) {
|
||||
// The quick search widget is added somewhere else on the vertical layout.
|
||||
return false;
|
||||
}
|
||||
|
||||
if (utils.isMobile()) {
|
||||
// The widget takes too much spaces to be included in the mobile layout.
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user