File sync

This commit is contained in:
Magnus Åhall 2026-07-10 06:32:31 +02:00
parent b76502c034
commit 47c4c99b66
7 changed files with 174 additions and 19 deletions

View file

@ -20,9 +20,16 @@ export class N2PageStorage extends CustomHTMLElement {
padding: 4px 8px;
border-radius: 4px;
}
h2 {
margin-top: 24px;
margin-bottom: 8px;
}
</style>
<h1>Local storage</h1>
<h2>Nodes</h2>
<div class="table">
<div>Local nodes</div>
<div data-el="count-nodes"></div>
@ -34,11 +41,14 @@ export class N2PageStorage extends CustomHTMLElement {
<div data-el="count-history-nodes"></div>
</div>
<h1>Files</h1>
<h2>Files</h2>
<div class="table">
<div>Files on server</div>
<div data-el="count-files-on-server"></div>
<div>Files on device</div>
<div data-el="count-files-on-device"></div>
<div>Files to send</div>
<div data-el="count-queued-files"></div>
</div>
@ -68,6 +78,8 @@ export class N2PageStorage extends CustomHTMLElement {
this.elCountQueuedNodes.innerText = await globalThis.nodeStore.sendQueue.count()
this.elCountHistoryNodes.innerText = await globalThis.nodeStore.nodesHistory.count()
this.elCountQueuedFiles.innerText = await globalThis.nodeStore.filesMetadata.countToUpload()
this.elCountFilesOnDevice.innerText = await globalThis.nodeStore.filesMetadata.count()
}
}
customElements.define('n2-pagestorage', N2PageStorage)