improvements in mobile layout for launchbar

This commit is contained in:
zadam
2022-12-12 23:48:34 +01:00
parent d1b989ac12
commit 2957e1d78a
10 changed files with 51 additions and 18 deletions

View File

@@ -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) {