Work on special pages

This commit is contained in:
Magnus Åhall 2026-06-15 19:13:27 +02:00
parent d9adfd3a91
commit da7999fb24
7 changed files with 185 additions and 95 deletions

View file

@ -46,7 +46,10 @@ export class N2PageNodeUI extends CustomHTMLElement {
_mbus.subscribe('NODE_UI_OPEN', event => {
this.node = event.detail.data
this.showMarkdown(true)
if (!this.node.isSpecial())
this.showMarkdown(true)
this.render()
})
@ -437,6 +440,9 @@ export class Node {
isFirstSibling() {//{{{
return this._sibling_before === null
}//}}}
isSpecial() {// {{{
return this.data.Special
}// }}}
content() {//{{{
/* TODO - implement crypto
if (this.CryptoKeyID != 0 && !this._decrypted)
@ -506,16 +512,15 @@ export class Node {
}
class N2Menu extends CustomHTMLElement {
static {
static {// {{{
this.tmpl = document.createElement('template')
this.tmpl.innerHTML = `
<div id="node-menu" popover>Popover content</div>
`
}
constructor() {
}// }}}
constructor() {// {{{
super()
}
}// }}}
}
customElements.define('n2-menu', N2Menu)