mirror of
https://github.com/zadam/trilium.git
synced 2025-11-08 22:35:50 +01:00
improvements in mobile layout for launchbar
This commit is contained in:
@@ -9,6 +9,7 @@ import BasicWidget from "../basic_widget.js";
|
||||
import NoteLauncher from "../buttons/launcher/note_launcher.js";
|
||||
import ScriptLauncher from "../buttons/launcher/script_launcher.js";
|
||||
import CommandButtonWidget from "../buttons/command_button.js";
|
||||
import utils from "../../services/utils.js";
|
||||
|
||||
export default class LauncherWidget extends BasicWidget {
|
||||
constructor() {
|
||||
@@ -30,6 +31,10 @@ export default class LauncherWidget extends BasicWidget {
|
||||
throw new Error(`Note '${note.noteId}' '${note.title}' is not a launcher even though it's in the launcher subtree`);
|
||||
}
|
||||
|
||||
if (!utils.isDesktop() && note.hasLabel('desktopOnly')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const launcherType = note.getLabelValue("launcherType");
|
||||
|
||||
if (launcherType === 'command') {
|
||||
@@ -54,6 +59,8 @@ export default class LauncherWidget extends BasicWidget {
|
||||
}
|
||||
|
||||
this.child(this.innerWidget);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
initCommandLauncherWidget(note) {
|
||||
|
||||
Reference in New Issue
Block a user