diff --git a/site/src/routes/_error.svelte b/site/src/routes/_error.svelte index 45dfbaef97..0071e3cea7 100644 --- a/site/src/routes/_error.svelte +++ b/site/src/routes/_error.svelte @@ -1,33 +1,71 @@ - - - {status} - -

{status}

- -

{error.message}

- -{#if dev && error.stack} -
{error.stack}
-{/if} + // we don't want to use here, + // because we only care about the online state when + // the page first loads + let online = typeof navigator !== 'undefined' + ? navigator.onLine + : true; + \ No newline at end of file + + /* @media (min-width: 480px) { + h1 { font-size: 4em } + } */ + + + + {status} + + +
+ {#if online} +

Yikes!

+ + {#if error.message} +

{status}: {error.message}

+ {:else} +

Encountered a {status} error

+ {/if} + + {#if dev && error.stack} +
{error.stack}
+ {:else} + {#if status >= 500} +

Please try reloading the page.

+ {/if} + +

If the error persists, please drop by Discord chatroom and let us know, or raise an issue on GitHub. Thanks!

+ {/if} + {:else} +

It looks like you're offline

+ +

Reload the page once you've found the internet.

+ {/if} +
\ No newline at end of file