mirror of
https://github.com/zadam/trilium.git
synced 2026-02-27 00:53:35 +01:00
fix(mobile): note paths dialog doesn't trigger clone note to location
This commit is contained in:
parent
0f3f49915e
commit
e38df0c731
@ -1,7 +1,7 @@
|
|||||||
import "./NotePathsTab.css";
|
import "./NotePathsTab.css";
|
||||||
|
|
||||||
import clsx from "clsx";
|
import clsx from "clsx";
|
||||||
import { useEffect, useMemo, useState } from "preact/hooks";
|
import { useContext, useEffect, useMemo, useState } from "preact/hooks";
|
||||||
|
|
||||||
import FNote, { NotePathRecord } from "../../entities/fnote";
|
import FNote, { NotePathRecord } from "../../entities/fnote";
|
||||||
import { t } from "../../services/i18n";
|
import { t } from "../../services/i18n";
|
||||||
@ -9,7 +9,7 @@ import { NOTE_PATH_TITLE_SEPARATOR } from "../../services/tree";
|
|||||||
import { useTriliumEvent } from "../react/hooks";
|
import { useTriliumEvent } from "../react/hooks";
|
||||||
import LinkButton from "../react/LinkButton";
|
import LinkButton from "../react/LinkButton";
|
||||||
import NoteLink from "../react/NoteLink";
|
import NoteLink from "../react/NoteLink";
|
||||||
import { joinElements } from "../react/react_utils";
|
import { joinElements, ParentComponent } from "../react/react_utils";
|
||||||
import { TabContext } from "./ribbon-interface";
|
import { TabContext } from "./ribbon-interface";
|
||||||
|
|
||||||
export default function NotePathsTab({ note, hoistedNoteId, notePath }: TabContext) {
|
export default function NotePathsTab({ note, hoistedNoteId, notePath }: TabContext) {
|
||||||
@ -21,6 +21,7 @@ export function NotePathsWidget({ sortedNotePaths, currentNotePath }: {
|
|||||||
sortedNotePaths: NotePathRecord[] | undefined;
|
sortedNotePaths: NotePathRecord[] | undefined;
|
||||||
currentNotePath?: string | null | undefined;
|
currentNotePath?: string | null | undefined;
|
||||||
}) {
|
}) {
|
||||||
|
const parentComponent = useContext(ParentComponent);
|
||||||
return (
|
return (
|
||||||
<div class="note-paths-widget">
|
<div class="note-paths-widget">
|
||||||
<>
|
<>
|
||||||
@ -40,7 +41,7 @@ export function NotePathsWidget({ sortedNotePaths, currentNotePath }: {
|
|||||||
|
|
||||||
<LinkButton
|
<LinkButton
|
||||||
text={t("note_paths.clone_button")}
|
text={t("note_paths.clone_button")}
|
||||||
triggerCommand="cloneNoteIdsTo"
|
onClick={() => parentComponent?.triggerCommand("cloneNoteIdsTo")}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user