mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 11:56:01 +01:00
refactoring of note detail API
This commit is contained in:
@@ -4,6 +4,7 @@ import protectedSessionHolder from "../services/protected_session_holder.js";
|
||||
import treeCache from "../services/tree_cache.js";
|
||||
import server from "../services/server.js";
|
||||
import SpacedUpdate from "../services/spaced_update.js";
|
||||
import appContext from "../services/app_context.js";
|
||||
|
||||
const TPL = `
|
||||
<div class="note-title-container">
|
||||
@@ -107,4 +108,18 @@ export default class NoteTitleWidget extends TabAwareWidget {
|
||||
await this.spacedUpdate.updateNowIfNecessary();
|
||||
}
|
||||
}
|
||||
|
||||
focusOnTitleListener() {
|
||||
if (this.tabContext && this.tabContext.isActive()) {
|
||||
this.$noteTitle.trigger('focus');
|
||||
}
|
||||
}
|
||||
|
||||
focusAndSelectTitleListener() {
|
||||
if (this.tabContext && this.tabContext.isActive()) {
|
||||
this.$noteTitle
|
||||
.trigger('focus')
|
||||
.trigger('select');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user