wip
This commit is contained in:
parent
9a164b984a
commit
5c2842c995
8 changed files with 330 additions and 26 deletions
|
|
@ -8,6 +8,7 @@ import htm from 'htm'
|
|||
import 'preact/debug'
|
||||
import 'preact/devtools'
|
||||
{{- end }}
|
||||
import { NodeStore } from 'node_store'
|
||||
import { Notes2 } from "/js/{{ .VERSION }}/app.mjs"
|
||||
import { API } from 'api'
|
||||
|
||||
|
|
@ -15,8 +16,15 @@ if (!API.hasAuthenticationToken()) {
|
|||
location.href = '/login'
|
||||
} else {
|
||||
const html = htm.bind(h)
|
||||
window._notes2 = createRef()
|
||||
render(html`<${Notes2} ref=${window._notes2} />`, document.getElementById('app'))
|
||||
try {
|
||||
window.nodeStore = new NodeStore()
|
||||
window.nodeStore.initializeDB().then(() => {
|
||||
window._notes2 = createRef()
|
||||
render(html`<${Notes2} ref=${window._notes2} />`, document.getElementById('app'))
|
||||
})
|
||||
} catch (e) {
|
||||
alert(e)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue