This commit is contained in:
Magnus Åhall 2024-12-03 06:53:31 +01:00
parent 42b66714aa
commit ac8b334eee
35 changed files with 541 additions and 675 deletions

View file

@ -24,6 +24,7 @@
"htm": "/js/{{ .VERSION }}/lib/htm/htm.mjs",
"api": "/js/{{ .VERSION }}/api.mjs",
"sync": "/js/{{ .VERSION }}/sync.mjs",
"key": "/js/{{ .VERSION }}/key.mjs",
"checklist": "/js/{{ .VERSION }}/checklist.mjs",
"crypto": "/js/{{ .VERSION }}/crypto.mjs",

View file

@ -1,4 +1,5 @@
{{ define "page" }}
<div id="notes2"></div>
<link rel="stylesheet" type="text/css" href="/css/{{ .VERSION }}/notes2.css">
<script type="module">
@ -20,7 +21,7 @@ if (!API.hasAuthenticationToken()) {
window.nodeStore = new NodeStore()
window.nodeStore.initializeDB().then(() => {
window._notes2 = createRef()
render(html`<${Notes2} ref=${window._notes2} />`, document.getElementById('app'))
render(html`<${Notes2} ref=${window._notes2} />`, document.getElementById('notes2'))
})
} catch (e) {
alert(e)

13
views/pages/sync.gotmpl Normal file
View file

@ -0,0 +1,13 @@
{{ define "page" }}
<div style="margin: 32px">
<h1>Sync</h1>
<script type="module">
import { NodeStore } from 'node_store'
import { Sync } from 'sync'
window.nodeStore = new NodeStore()
window.nodeStore.initializeDB().then(()=>{
Sync.tree()
})
</script>
</div>
{{ end }}