Bugfix:
- Update to @tabler/icons-svelte-runes for a more 'Svente 5' experience. - Adjust error handling in load functions, plain error thrown for handling in the error handler. - Fix the warning regarding a click handler attached to an <img> on the About page - Re-organise component directory - Remove unused font declarations from global.css Features: - Add service-worker caching of FilterData API response to allow for filtering to work fully offline -
This commit is contained in:
@@ -3,17 +3,22 @@
|
||||
|
||||
import stopErr from '$lib/assets/img/stop-error.svg';
|
||||
import noResult from '$lib/assets/img/no-data.svg';
|
||||
import Button from '$lib/components/ui/Button.svelte';
|
||||
import Button from '$lib/components/ui/form-elements/Button.svelte';
|
||||
</script>
|
||||
|
||||
<!-- Will need to check error type, using the upstream code combined with response code -->
|
||||
|
||||
<div class="error-wrapper">
|
||||
{#if page.status == 404}
|
||||
<!-- Warning no data image -->
|
||||
<img class="err-img" src={noResult} alt="" role="presentation" width="200" height="200" />
|
||||
{:else if page.status == 499}
|
||||
{:else if page.status == 503}
|
||||
<!-- Change to a GSM-R X Sign?? -->
|
||||
<span>OFFLINE!</span>
|
||||
<img class="err-img" src={stopErr} alt="" role="presentation" width="150" height="210" />
|
||||
{:else if page.status == 403}
|
||||
<span>UNAUTH</span>
|
||||
<img class="err-img" src={stopErr} alt="" role="presentation" width="150" height="210" />
|
||||
{:else}
|
||||
<!-- STOP Error image -->
|
||||
<img class="err-img" src={stopErr} alt="" role="presentation" width="150" height="210" />
|
||||
@@ -24,9 +29,12 @@
|
||||
{page.error?.message ?? 'An unexpected derailment occurred.'}
|
||||
</p>
|
||||
|
||||
{#if page.error?.owlCode}
|
||||
{#if page.error?.owlCode == 'NETWORK_DISCONNECTED'}
|
||||
<p>THISISANETWORKERR</p>
|
||||
<p>Operational data is unavaliable when offline</p>
|
||||
{:else}
|
||||
<div class="debug-info">
|
||||
<code>Ref: {page.error.owlCode}</code>
|
||||
<code>Ref: {page.error?.owlCode}</code>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user