Tree render and navigation with note rendering
This commit is contained in:
parent
dd27be67b9
commit
1ce8e29e37
7 changed files with 515 additions and 62 deletions
|
|
@ -1,11 +1,18 @@
|
|||
{{ define "page" }}
|
||||
<div id="tree"></div>
|
||||
<div id="crumbs">
|
||||
<div class="crumbs">
|
||||
<div id="notes2">
|
||||
<div id="tree" tabindex=0></div>
|
||||
<div id="crumbs"></div>
|
||||
<div id="sync-progress">
|
||||
<!--
|
||||
<progress min=0 max=1 value=0></progress>
|
||||
<div class="count">0 / 1</div>
|
||||
-->
|
||||
</div>
|
||||
|
||||
<div id="note"></div>
|
||||
<!--div id="blank"></div-->
|
||||
</div>
|
||||
|
||||
<div id="notes2"></div>
|
||||
<link rel="stylesheet" type="text/css" href="/css/{{ .VERSION }}/notes2.css">
|
||||
|
||||
<script type="module">
|
||||
|
|
@ -16,7 +23,7 @@ import 'preact/debug'
|
|||
import 'preact/devtools'
|
||||
{{- end }}
|
||||
import { NodeStore } from 'node_store'
|
||||
import { Notes2 } from "/js/{{ .VERSION }}/notes2.mjs"
|
||||
import { App } from "/js/{{ .VERSION }}/app.mjs"
|
||||
import { API } from 'api'
|
||||
import { Sync } from 'sync'
|
||||
|
||||
|
|
@ -29,8 +36,7 @@ if (!API.hasAuthenticationToken()) {
|
|||
try {
|
||||
window.nodeStore = new NodeStore()
|
||||
window.nodeStore.initializeDB().then(() => {
|
||||
window._notes2 = createRef()
|
||||
render(html`<${Notes2} ref=${window._notes2} />`, document.getElementById('notes2'))
|
||||
window._app = new App()
|
||||
})
|
||||
} catch (e) {
|
||||
alert(e)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue