-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make error page return correct error code
- Loading branch information
1 parent
548f775
commit a6770d7
Showing
5 changed files
with
40 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
<script lang="ts"> | ||
import { page } from "$app/stores"; | ||
import { codeToMessage } from "$lib/utils/codeToMessage"; | ||
import * as m from "$paraglide/messages"; | ||
</script> | ||
|
||
<main class="gap flex flex-1 flex-col items-center gap-2 pt-20"> | ||
<main class="gap mx-auto flex flex-1 flex-col items-center gap-2 pt-20"> | ||
<h1 class="text-6xl font-bold">{$page.status}</h1> | ||
<h3> | ||
{($page.error?.statusDescription ?? $page.status in codeToMessage) | ||
|
@@ -13,4 +14,30 @@ | |
{#if $page.error?.message} | ||
<h2 class="mt-4 text-center text-xl">{$page.error.message}</h2> | ||
{/if} | ||
|
||
<div class="flex flex-row gap-5 pt-10"> | ||
<a href="/" class="btn btn-primary text-lg"> | ||
{m.home()} <span class="i-mdi-house" /> | ||
</a> | ||
|
||
<button class="btn btn-secondary text-lg" on:click={() => history.back()}> | ||
{m.back()} <span class="i-mdi-keyboard-backspace" /> | ||
</button> | ||
</div> | ||
<div class="pt-16 text-center text-lg"> | ||
<div class="pb-2">{m.error_should_not_happen()}</div> | ||
<div class="flex flex-row items-center gap-3"> | ||
<a | ||
href="https://github.com/Dsek-LTH/web/issues/new" | ||
class="btn btn-ghost text-lg" | ||
> | ||
{m.error_create_issue()} <span class="i-mdi-bug" /> | ||
</a> | ||
|
||
<span class="text-xl font-extrabold">{m.error_or()}</span> | ||
<a href="mailto:[email protected]" class="btn btn-ghost text-lg" | ||
>{m.error_contact()} <span class="i-mdi-email" /></a | ||
> | ||
</div> | ||
</div> | ||
</main> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters