Sync progress bar somewhat working

This commit is contained in:
Magnus Åhall 2025-01-21 18:20:50 +01:00
parent f33e5d54af
commit 3453dffb53
8 changed files with 250 additions and 42 deletions

View file

@ -2,6 +2,7 @@ import { h, Component, createRef } from 'preact'
import htm from 'htm'
import { signal } from 'preact/signals'
import { ROOT_NODE } from 'node_store'
import { SyncProgress } from 'sync'
const html = htm.bind(h)
export class NodeUI extends Component {
@ -15,6 +16,7 @@ export class NodeUI extends Component {
this.keys = signal([])
this.page = signal('node')
this.crumbs = []
this.syncProgress = createRef()
window.addEventListener('popstate', evt => {
if (evt.state?.hasOwnProperty('nodeUUID'))
_notes2.current.goToNode(evt.state.nodeUUID, true)
@ -52,6 +54,7 @@ export class NodeUI extends Component {
${crumbDivs}
</div>
</div>
<${SyncProgress} ref=${this.syncProgress} />
<div id="name">${node.get('Name')}</div>
<${NodeContent} key=${node.UUID} node=${node} ref=${this.nodeContent} />
<div id="blank"></div>