diff --git a/docs/Release Notes/Release Notes/v0.92.8-beta.md b/docs/Release Notes/Release Notes/v0.92.8-beta.md index ab68394b8..03300cb7a 100644 --- a/docs/Release Notes/Release Notes/v0.92.8-beta.md +++ b/docs/Release Notes/Release Notes/v0.92.8-beta.md @@ -20,7 +20,7 @@ * Document structure is now precalculated, so start-up time should be slightly increased. * Optimized the content in order to reduce the size on disk. * Mobile improvements: - * The following dialogs are now accessible: bulk actions, branch prefix, include note, add link, sort child notes, note type selector. + * The following dialogs are now accessible: bulk actions, branch prefix, include note, add link, sort child notes, note type selector, move/clone to * Modals now have a safe margin on their bottom and are scrollable. ## 🌍 Internationalization diff --git a/src/public/app/components/main_tree_executors.ts b/src/public/app/components/main_tree_executors.ts index b5473ffe4..984da0656 100644 --- a/src/public/app/components/main_tree_executors.ts +++ b/src/public/app/components/main_tree_executors.ts @@ -10,23 +10,18 @@ import Component from "./component.js"; * must be at the root of the component tree. */ export default class MainTreeExecutors extends Component { + /** + * On mobile it will be `undefined`. + */ get tree() { return appContext.noteTreeWidget; } async cloneNotesToCommand({ selectedOrActiveNoteIds }: EventData<"cloneNotesTo">) { - if (!this.tree) { - return; - } - this.triggerCommand("cloneNoteIdsTo", { noteIds: selectedOrActiveNoteIds }); } async moveNotesToCommand({ selectedOrActiveBranchIds }: EventData<"moveNotesTo">) { - if (!this.tree) { - return; - } - this.triggerCommand("moveBranchIdsTo", { branchIds: selectedOrActiveBranchIds }); } diff --git a/src/public/app/layouts/desktop_layout.ts b/src/public/app/layouts/desktop_layout.ts index deaea53b9..1579da4e6 100644 --- a/src/public/app/layouts/desktop_layout.ts +++ b/src/public/app/layouts/desktop_layout.ts @@ -255,8 +255,6 @@ export default class DesktopLayout { // Remove once modals are all merged .child(new PasswordNoteSetDialog()) - .child(new CloneToDialog()) - .child(new MoveToDialog()) .child(new ImportDialog()) .child(new ExportDialog()) .child(new UploadAttachmentsDialog()) diff --git a/src/public/app/layouts/layout_commons.ts b/src/public/app/layouts/layout_commons.ts index 6ad8f0efe..0a0eb1fa7 100644 --- a/src/public/app/layouts/layout_commons.ts +++ b/src/public/app/layouts/layout_commons.ts @@ -11,6 +11,8 @@ import BulkActionsDialog from "../widgets/dialogs/bulk_actions.js"; import BranchPrefixDialog from "../widgets/dialogs/branch_prefix.js"; import SortChildNotesDialog from "../widgets/dialogs/sort_child_notes.js"; import NoteTypeChooserDialog from "../widgets/dialogs/note_type_chooser.js"; +import MoveToDialog from "../widgets/dialogs/move_to.js"; +import CloneToDialog from "../widgets/dialogs/clone_to.js"; export function applyModals(rootContainer: RootContainer) { rootContainer @@ -24,8 +26,8 @@ export function applyModals(rootContainer: RootContainer) { .child(new NoteTypeChooserDialog()) .child(new JumpToNoteDialog()) .child(new AddLinkDialog()) - // .child(new CloneToDialog()) - // .child(new MoveToDialog()) + .child(new CloneToDialog()) + .child(new MoveToDialog()) // .child(new ImportDialog()) // .child(new ExportDialog()) // .child(new UploadAttachmentsDialog())