diff --git a/assets/js/common.ts b/assets/js/common.ts index 17510ac..5c06b08 100644 --- a/assets/js/common.ts +++ b/assets/js/common.ts @@ -66,11 +66,12 @@ function poll() { function createSid(): string { const arr = new Uint32Array(2) crypto.getRandomValues(arr) + //return arr.map((x) => x.toString(36)).join('') return arr[0].toString(36) + arr[1].toString(36) } function getSid(): string { - sid = localStorage.getItem('api.sessionid') + let sid = localStorage.getItem('api.sessionid') if (!sid) { sid = createSid() localStorage.setItem('api.sessionid', sid) @@ -79,6 +80,7 @@ function getSid(): string { } console.log("sid: ", getSid()) +// TODO: clear sid - when? async function dopoll(app: typeof appdata) { while (true) { diff --git a/assets/js/settings.ts b/assets/js/settings.ts index 9ca03f5..cc71291 100644 --- a/assets/js/settings.ts +++ b/assets/js/settings.ts @@ -4,9 +4,9 @@ export const api = { export const polling = null // suppress polling -/*export const polling = { +export const xpolling = { msgbase: ['system', 'poll', 'service', 'pclt-0001'] //msgbase: ['system', 'poll', 'session'] //msgbase: ['system', 'poll', 'interaction'] -}*/ +} diff --git a/exampleSite/content/app/test1.md b/exampleSite/content/app/test1.md index 66b485a..29316f7 100644 --- a/exampleSite/content/app/test1.md +++ b/exampleSite/content/app/test1.md @@ -22,9 +22,12 @@ cyberscopes example site - use petite-vue in Hugo-generated sites. {{< pv/display expr="`${data.firstname} ${data.lastname}`.trim() || '???'" >}} + {{< pv/display name="email" >}} {{< /pv/fieldset >}} {{< pv/debug >}} +[click here](?id=10127-180017)