mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
cleanup of createTopLevelNote
This commit is contained in:
parent
73514a63d8
commit
8192b51b8a
@ -182,8 +182,6 @@ export default class Entrypoints extends Component {
|
||||
utils.reloadApp();
|
||||
}
|
||||
|
||||
createTopLevelNoteCommand() { noteCreateService.createNewTopLevelNote(); }
|
||||
|
||||
async openInWindowCommand({notePath, hoistedNoteId}) {
|
||||
if (!hoistedNoteId) {
|
||||
hoistedNoteId = 'root';
|
||||
|
@ -7,12 +7,6 @@ import ws from "./ws.js";
|
||||
import treeCache from "./tree_cache.js";
|
||||
import toastService from "./toast.js";
|
||||
|
||||
async function createNewTopLevelNote() {
|
||||
const hoistedNoteId = hoistedNoteService.getHoistedNoteId();
|
||||
|
||||
await createNote(hoistedNoteId);
|
||||
}
|
||||
|
||||
async function createNote(parentNoteId, options = {}) {
|
||||
options = Object.assign({
|
||||
activate: true,
|
||||
@ -101,6 +95,5 @@ async function duplicateSubtree(noteId, parentNoteId) {
|
||||
|
||||
export default {
|
||||
createNote,
|
||||
createNewTopLevelNote,
|
||||
duplicateSubtree
|
||||
};
|
||||
|
@ -13,7 +13,7 @@ const WIDGET_TPL = `
|
||||
}
|
||||
</style>
|
||||
|
||||
<a data-trigger-command="createTopLevelNote" title="Create new top level note" class="icon-action bx bx-folder-plus"></a>
|
||||
<a data-trigger-command="createNoteIntoInbox" title="New note" class="icon-action bx bx-folder-plus"></a>
|
||||
|
||||
<a data-trigger-command="collapseTree" title="Collapse note tree" class="icon-action bx bx-layer-minus"></a>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user