cleanup of createTopLevelNote

This commit is contained in:
zadam 2021-03-03 22:27:57 +01:00
parent 73514a63d8
commit 8192b51b8a
3 changed files with 1 additions and 10 deletions

View File

@ -182,8 +182,6 @@ export default class Entrypoints extends Component {
utils.reloadApp();
}
createTopLevelNoteCommand() { noteCreateService.createNewTopLevelNote(); }
async openInWindowCommand({notePath, hoistedNoteId}) {
if (!hoistedNoteId) {
hoistedNoteId = 'root';

View File

@ -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
};

View File

@ -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>