[upd] plankton

This commit is contained in:
fenris 2025-10-07 09:33:10 +02:00
parent f5963c3553
commit 8163a12a68
2 changed files with 15 additions and 1 deletions

View file

@ -586,6 +586,10 @@ declare namespace lib_plankton.call {
* @author fenris * @author fenris
*/ */
export function timeout(procedure: (() => void), delay_in_seconds: float): int; export function timeout(procedure: (() => void), delay_in_seconds: float): int;
/**
* @author fenris
*/
export function loop(procedure: (() => void), delay_in_seconds: float): int;
/** /**
* Promise version of "setTimeout" * Promise version of "setTimeout"
* *
@ -4591,6 +4595,7 @@ declare namespace lib_plankton.auth.oidc {
*/ */
type type_userinfo = { type type_userinfo = {
name: (null | string); name: (null | string);
label: (null | string);
email: (null | string); email: (null | string);
}; };
/** /**

View file

@ -1331,6 +1331,14 @@ var lib_plankton;
/*window.*/ setTimeout(procedure, Math.floor(delay_in_seconds * 1000))); /*window.*/ setTimeout(procedure, Math.floor(delay_in_seconds * 1000)));
} }
call.timeout = timeout; call.timeout = timeout;
/**
* @author fenris
*/
function loop(procedure, delay_in_seconds) {
return (
/*window.*/ setInterval(procedure, Math.floor(delay_in_seconds * 1000)));
}
call.loop = loop;
/** /**
* Promise version of "setTimeout" * Promise version of "setTimeout"
* *
@ -16154,7 +16162,8 @@ var lib_plankton;
}); });
const data = lib_plankton.json.decode(http_response.body.toString()); const data = lib_plankton.json.decode(http_response.body.toString());
return Promise.resolve({ return Promise.resolve({
"name": (data["name"] ?? null), "name": (data["preferred_username"] ?? null),
"label": (data["name"] ?? null),
"email": (data["email"] ?? null), "email": (data["email"] ?? null),
}); });
} }