Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(launch_bar): cannot create new items in mobile launch bar (fixes #8054)
Elian Dorandc01b787c1cd
diff --git a/apps/client/src/menus/launcher_context_menu.ts b/apps/client/src/menus/launcher_context_menu.tsindex 717180690a..f4ae7a148f 100644--- a/apps/client/src/menus/launcher_context_menu.ts+++ b/apps/client/src/menus/launcher_context_menu.ts@@ -1,12 +1,12 @@-import treeService from "../services/tree.js";-import froca from "../services/froca.js";-import contextMenu, { type MenuCommandItem, type MenuItem } from "./context_menu.js";+import type { ContextMenuCommandData,FilteredCommandNames } from "../components/app_context.js";+import type { SelectMenuItemEventListener } from "../components/events.js";import dialogService from "../services/dialog.js";-import server from "../services/server.js";+import froca from "../services/froca.js";import { t } from "../services/i18n.js";-import type { SelectMenuItemEventListener } from "../components/events.js";+import server from "../services/server.js";+import treeService from "../services/tree.js";import type NoteTreeWidget from "../widgets/note_tree.js";-import type { FilteredCommandNames, ContextMenuCommandData } from "../components/app_context.js";+import contextMenu, { type MenuCommandItem, type MenuItem } from "./context_menu.js";type LauncherCommandNames = FilteredCommandNames<ContextMenuCommandData>;@@ -32,8 +32,8 @@ export default class LauncherContextMenu implements SelectMenuItemEventListener<const note = this.node.data.noteId ? await froca.getNote(this.node.data.noteId) : null;const parentNoteId = this.node.getParent().data.noteId;- const isVisibleRoot = note?.noteId === "_lbVisibleLaunchers";- const isAvailableRoot = note?.noteId === "_lbAvailableLaunchers";+ const isVisibleRoot = note?.noteId === "_lbVisibleLaunchers" || note?.noteId === "_lbMobileVisibleLaunchers";+ const isAvailableRoot = note?.noteId === "_lbAvailableLaunchers" || note?.noteId === "_lbMobileAvailableLaunchers";const isVisibleItem = parentNoteId === "_lbVisibleLaunchers" || parentNoteId === "_lbMobileVisibleLaunchers";const isAvailableItem = parentNoteId === "_lbAvailableLaunchers" || parentNoteId === "_lbMobileAvailableLaunchers";const isItem = isVisibleItem || isAvailableItem;