mirror of
https://github.com/zadam/trilium.git
synced 2025-06-05 01:18:44 +02:00
Merge remote-tracking branch 'origin/stable'
This commit is contained in:
commit
b452d7e5c5
@ -38,12 +38,6 @@ export default class MainTreeExecutors extends Component {
|
||||
isProtected: activeNote.isProtected,
|
||||
saveSelection: false
|
||||
});
|
||||
|
||||
await ws.waitForMaxKnownSyncId();
|
||||
|
||||
appContext.tabManager.getActiveTabContext().setNote(note.noteId);
|
||||
|
||||
appContext.triggerCommand('focusAndSelectTitle');
|
||||
}
|
||||
|
||||
async createNoteAfterCommand() {
|
||||
@ -55,17 +49,11 @@ export default class MainTreeExecutors extends Component {
|
||||
return;
|
||||
}
|
||||
|
||||
const {note} = await noteCreateService.createNote(parentNoteId, {
|
||||
await noteCreateService.createNote(parentNoteId, {
|
||||
target: 'after',
|
||||
targetBranchId: node.data.branchId,
|
||||
isProtected: isProtected,
|
||||
saveSelection: false
|
||||
});
|
||||
|
||||
await ws.waitForMaxKnownSyncId();
|
||||
|
||||
appContext.tabManager.getActiveTabContext().setNote(note.noteId);
|
||||
|
||||
appContext.triggerCommand('focusAndSelectTitle');
|
||||
}
|
||||
}
|
@ -48,8 +48,12 @@ async function createNote(parentNoteId, options = {}) {
|
||||
}
|
||||
|
||||
if (options.activate) {
|
||||
await ws.waitForMaxKnownSyncId();
|
||||
|
||||
const activeTabContext = appContext.tabManager.getActiveTabContext();
|
||||
activeTabContext.setNote(note.noteId);
|
||||
await activeTabContext.setNote(note.noteId);
|
||||
|
||||
appContext.triggerCommand('focusAndSelectTitle');
|
||||
}
|
||||
|
||||
return {note, branch};
|
||||
|
@ -23,4 +23,10 @@ export default class RunScriptButtonsWidget extends TabAwareWidget {
|
||||
this.$renderButton.toggle(note.type === 'render');
|
||||
this.$executeScriptButton.toggle(note.mime.startsWith('application/javascript'));
|
||||
}
|
||||
|
||||
async entitiesReloadedEvent({loadResults}) {
|
||||
if (loadResults.isNoteReloaded(this.noteId)) {
|
||||
this.refresh();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user