diff --git a/docs_v1.0/doc_wasm/index.html b/docs_v1.0/doc_wasm/index.html index 0b751c3..3456887 100644 --- a/docs_v1.0/doc_wasm/index.html +++ b/docs_v1.0/doc_wasm/index.html @@ -33,7 +33,7 @@ html, body { height: 100%; }
Loading WASM...
'; await initWasm(); @@ -159,6 +187,8 @@ async function init() { loObs.observe(document.body, {childList: true, subtree: true}); } + document.getElementById('sidebar').style.display = 'flex'; + document.getElementById('logout-btn').onclick = async function(e) { e.preventDefault(); e.stopPropagation(); @@ -168,6 +198,8 @@ async function init() { el.innerHTML = 'Logged out. Session cleared.
'; document.getElementById('logout-btn').style.display = 'none'; }; + + // Load initial module from hash or default var hash = location.hash.slice(1); await loadDoc(hash || '01_auth'); } catch(e) { @@ -175,6 +207,16 @@ async function init() { } } +async function init() { + // Hide sidebar until authenticated + document.getElementById('sidebar').style.display = 'none'; + if (await loginUser('demo', 'demo')) { + initApp(); + } else { + showLoginForm(); + } +} + init();