This commit is contained in:
Magnus Åhall 2026-06-10 17:24:13 +02:00
parent 9ebda04428
commit 8a22cf569f
2 changed files with 4 additions and 30 deletions

View file

@ -87,25 +87,15 @@ export class App {
switch (event.key.toUpperCase()) {
case 'T':
if (document.activeElement.id === 'tree-nodes') {
if (document.activeElement.id === 'tree-nodes')
this.nodeUI.takeFocus()
} else {
else
this.sidebar.focus()
}
break
case 'F':
_mbus.dispatch('op-search')
break
/*
case 'C':
this.showPage('node')
break
case 'E':
this.showPage('keys')
break
*/
case 'M':
globalThis._mbus.dispatch('MARKDOWN_TOGGLE')
@ -115,25 +105,9 @@ export class App {
this.createNode()
break
/*
case 'P':
this.showPage('node-properties')
break
*/
case 'S':
this.nodeUI.saveNode()
break
/*
case 'U':
this.showPage('upload')
break
case 'F':
this.showPage('search')
break
*/
default:
handled = false

View file

@ -100,7 +100,7 @@ export class N2PageNodeUI extends CustomHTMLElement {
} else
this.elNodeContent.focus({ preventScroll: true })
}// }}}
async renameNode() {
async renameNode() {// {{{
const name = prompt('Change title', this.node.data.Name)
if (name === null)
return
@ -123,7 +123,7 @@ export class N2PageNodeUI extends CustomHTMLElement {
console.error(err)
alert(err)
}
}
}// }}}
async saveNode() {// {{{
if (!this.node.isModified())
return