comments/notes, minor improvements
This commit is contained in:
parent
c76426e13f
commit
2ff0811346
3 changed files with 8 additions and 3 deletions
|
@ -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) {
|
||||
|
|
|
@ -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']
|
||||
}*/
|
||||
}
|
||||
|
||||
|
|
|
@ -22,9 +22,12 @@ cyberscopes example site - use petite-vue in Hugo-generated sites.
|
|||
|
||||
{{< pv/display expr="`${data.firstname} ${data.lastname}`.trim() || '???'" >}}
|
||||
|
||||
<!--{{< pv/input-textline type="hidden"
|
||||
name="email" default="hm@cy55.de" >}}-->
|
||||
{{< pv/display name="email" >}}
|
||||
|
||||
{{< /pv/fieldset >}}
|
||||
|
||||
{{< pv/debug >}}
|
||||
|
||||
[click here](?id=10127-180017)
|
||||
|
|
Loading…
Add table
Reference in a new issue