mirror of
https://github.com/zadam/trilium.git
synced 2025-12-20 22:34:23 +01:00
feat(breadcrumb): allow creating notes from separator menu
This commit is contained in:
parent
5449d033bf
commit
3a4cff6529
@ -2148,7 +2148,8 @@
|
|||||||
"hoisted_badge": "Hoisted",
|
"hoisted_badge": "Hoisted",
|
||||||
"hoisted_badge_title": "Unhoist",
|
"hoisted_badge_title": "Unhoist",
|
||||||
"workspace_badge": "Workspace",
|
"workspace_badge": "Workspace",
|
||||||
"scroll_to_top_title": "Jump to the beginning of the note"
|
"scroll_to_top_title": "Jump to the beginning of the note",
|
||||||
|
"create_new_note": "Create new child note"
|
||||||
},
|
},
|
||||||
"breadcrumb_badges": {
|
"breadcrumb_badges": {
|
||||||
"read_only_explicit": "Read-only",
|
"read_only_explicit": "Read-only",
|
||||||
|
|||||||
@ -23,7 +23,7 @@ import tree from "../../services/tree";
|
|||||||
import ActionButton from "../react/ActionButton";
|
import ActionButton from "../react/ActionButton";
|
||||||
import { Badge } from "../react/Badge";
|
import { Badge } from "../react/Badge";
|
||||||
import Dropdown from "../react/Dropdown";
|
import Dropdown from "../react/Dropdown";
|
||||||
import { FormListItem } from "../react/FormList";
|
import { FormDropdownDivider, FormListItem } from "../react/FormList";
|
||||||
import { useActiveNoteContext, useChildNotes, useNote, useNoteColorClass, useNoteIcon, useNoteLabel, useNoteLabelBoolean, useNoteProperty, useStaticTooltip } from "../react/hooks";
|
import { useActiveNoteContext, useChildNotes, useNote, useNoteColorClass, useNoteIcon, useNoteLabel, useNoteLabelBoolean, useNoteProperty, useStaticTooltip } from "../react/hooks";
|
||||||
import Icon from "../react/Icon";
|
import Icon from "../react/Icon";
|
||||||
import { NewNoteLink } from "../react/NoteLink";
|
import { NewNoteLink } from "../react/NoteLink";
|
||||||
@ -208,6 +208,12 @@ function BreadcrumbSeparatorDropdownContent({ notePath, noteContext, activeNoteP
|
|||||||
</FormListItem>
|
</FormListItem>
|
||||||
</li>;
|
</li>;
|
||||||
})}
|
})}
|
||||||
|
|
||||||
|
<FormDropdownDivider />
|
||||||
|
<FormListItem
|
||||||
|
icon="bx bx-plus"
|
||||||
|
onClick={() => note_create.createNote(notePath, { activate: true })}
|
||||||
|
>{t("breadcrumb.create_new_note")}</FormListItem>
|
||||||
</ul>
|
</ul>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user