Format size with bytes

This commit is contained in:
Magnus Åhall 2026-06-07 12:15:00 +02:00
parent 9c07611f95
commit b100dc868c
3 changed files with 212 additions and 3 deletions

View file

@ -51,8 +51,7 @@ export class App {
document.getElementById('node-content')?.focus()
})
// XXX - _mbus.dispatch('SHOW_PAGE', { page: 'node' })
_mbus.dispatch('SHOW_PAGE', { page: 'history' })
_mbus.dispatch('SHOW_PAGE', { page: 'node' })
window._sync = new Sync()

View file

@ -294,7 +294,7 @@ class N2PageHistoryNode extends CustomHTMLElement {
this.elIndex.innerText = this.index
this.elDate.innerText = date
this.elTime.innerText = time
this.elSize.innerText = this.node.get('Content').length
this.elSize.innerText = this.formatSize(this.node.get('Content').length)
this.elName.innerText = this.node.get('Name')
}// }}}
formatSize(s) {// {{{