Update
This commit is contained in:
rodič
715f2a6379
revize
665576dbb8
|
@ -17,12 +17,34 @@
|
|||
let uds = null;
|
||||
|
||||
let int1 = null;
|
||||
let apiLoadRetry = 0;
|
||||
let apiOffline = false;
|
||||
|
||||
async function apiLoad() {
|
||||
try {
|
||||
await loadApiStatus();
|
||||
await loadOrders($userData);
|
||||
} catch (e) {
|
||||
if (apiLoadRetry > 5) {
|
||||
console.log("Too much retries, shutdown..");
|
||||
apiOffline = true;
|
||||
return null;
|
||||
}
|
||||
console.log(`API cannot be accessed .. retrying [#${apiLoadRetry}] ..`);
|
||||
apiLoadRetry = apiLoadRetry + 1;
|
||||
setTimeout(() => apiLoad(), 250);
|
||||
return null;
|
||||
}
|
||||
|
||||
apiLoadRetry = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
async function baseLoad() {
|
||||
api.loadBundle($page.url.hostname === "localhost");
|
||||
await apiLoad();
|
||||
|
||||
await loadApiStatus();
|
||||
loadOrders($userData);
|
||||
return true;
|
||||
}
|
||||
|
||||
onMount(async () => {
|
||||
|
|
|
@ -137,6 +137,7 @@
|
|||
function findEvent(bundle, eventId) {
|
||||
const ev = bundle.spec.events.find((ev) => ev.id === eventId);
|
||||
if (!ev) {
|
||||
console.log(`Event not found: ${eventId}`);
|
||||
return null;
|
||||
}
|
||||
switch (ev.type) {
|
||||
|
|
|
@ -182,6 +182,8 @@
|
|||
</div>
|
||||
{/if}
|
||||
{claim.linkInfo.title}
|
||||
{#if !claim.linkInfo.title}{claim.link.type}:{claim.link
|
||||
.id}{/if}
|
||||
{#if claim.linkInfo.suffix} ({claim.linkInfo
|
||||
.suffix}){/if}
|
||||
</a>
|
||||
|
|
Načítá se…
Odkázat v novém úkolu