This commit is contained in:
tree 2022-05-20 17:16:44 +02:00
rodič 715f2a6379
revize 665576dbb8
3 změnil soubory, kde provedl 27 přidání a 2 odebrání

Zobrazit soubor

@ -17,12 +17,34 @@
let uds = null; let uds = null;
let int1 = 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() { async function baseLoad() {
api.loadBundle($page.url.hostname === "localhost"); api.loadBundle($page.url.hostname === "localhost");
await apiLoad();
await loadApiStatus(); return true;
loadOrders($userData);
} }
onMount(async () => { onMount(async () => {

Zobrazit soubor

@ -137,6 +137,7 @@
function findEvent(bundle, eventId) { function findEvent(bundle, eventId) {
const ev = bundle.spec.events.find((ev) => ev.id === eventId); const ev = bundle.spec.events.find((ev) => ev.id === eventId);
if (!ev) { if (!ev) {
console.log(`Event not found: ${eventId}`);
return null; return null;
} }
switch (ev.type) { switch (ev.type) {

Zobrazit soubor

@ -182,6 +182,8 @@
</div> </div>
{/if} {/if}
{claim.linkInfo.title} {claim.linkInfo.title}
{#if !claim.linkInfo.title}{claim.link.type}:{claim.link
.id}{/if}
{#if claim.linkInfo.suffix}&nbsp;({claim.linkInfo {#if claim.linkInfo.suffix}&nbsp;({claim.linkInfo
.suffix}){/if} .suffix}){/if}
</a> </a>