Work on sync element, now a custom HTML element
This commit is contained in:
parent
99063d34be
commit
9fc4a14ce3
10 changed files with 190 additions and 1001 deletions
|
|
@ -2,44 +2,32 @@
|
|||
<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-->
|
||||
<n2-syncprogress></n2-syncprogress>
|
||||
<n2-nodeui id="note"></n2-nodeui>
|
||||
</div>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/css/{{ .VERSION }}/notes2.css">
|
||||
|
||||
<script type="module">
|
||||
import { h, Component, render, createRef } from 'preact'
|
||||
import htm from 'htm'
|
||||
{{ if .Data._dev -}}
|
||||
import 'preact/debug'
|
||||
import 'preact/devtools'
|
||||
{{- end }}
|
||||
import { NodeStore } from 'node_store'
|
||||
import { App } from "/js/{{ .VERSION }}/app.mjs"
|
||||
import { API } from 'api'
|
||||
import { Sync } from 'sync'
|
||||
import {NodeStore} from 'node_store'
|
||||
import {App} from "/js/{{ .VERSION }}/app.mjs"
|
||||
import {API} from 'api'
|
||||
import {Sync} from 'sync'
|
||||
|
||||
window.Sync = Sync
|
||||
window.Sync = Sync
|
||||
|
||||
if (!API.hasAuthenticationToken()) {
|
||||
location.href = '/login'
|
||||
} else {
|
||||
const html = htm.bind(h)
|
||||
try {
|
||||
window.nodeStore = new NodeStore()
|
||||
window.nodeStore.initializeDB().then(() => {
|
||||
window._app = new App()
|
||||
})
|
||||
} catch (e) {
|
||||
alert(e)
|
||||
if (!API.hasAuthenticationToken()) {
|
||||
location.href = '/login'
|
||||
} else {
|
||||
try {
|
||||
window.nodeStore = new NodeStore()
|
||||
window.nodeStore.initializeDB().then(() => {
|
||||
window._app = new App()
|
||||
})
|
||||
} catch (e) {
|
||||
alert(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
{{ end }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue