misc: tweak error pages, fix #159
This commit is contained in:
1 parent
1b4a80ded2
commit
29fa924cb3
3 files changed
+19
-8
No files matched your search
@@ -1,11 +1,22 @@
|
||||
<script lang="ts">
|
||||
import { goto } from '$app/navigation'
|
||||
import { page } from '$app/stores'
|
||||
import { Button } from 'mono-svelte'
|
||||
import { Icon, XMark } from 'svelte-hero-icons'
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col mx-auto gap-4 justify-center items-center h-full">
|
||||
<h1 class="font-black text-5xl">{$page.status}</h1>
|
||||
<p>Failed to fetch that page.</p>
|
||||
<div
|
||||
class="flex flex-col gap-2 mx-auto my-auto items-center h-full justify-center"
|
||||
>
|
||||
<div
|
||||
class="rounded-full bg-red-200 dark:bg-red-900 text-red-600 dark:text-red-300 p-3 w-max"
|
||||
>
|
||||
<Icon src={XMark} size="32" mini />
|
||||
</div>
|
||||
<h1 class="text-red-800 dark:text-red-300 text-4xl font-black">
|
||||
{$page.status}
|
||||
</h1>
|
||||
<p class="text-red-800 dark:text-red-300">Failed to fetch that page.</p>
|
||||
<code>{$page.error?.message}</code>
|
||||
<Button href={$page.url.toString()}>Retry</Button>
|
||||
<Button on:click={() => goto($page.url)}>Retry</Button>
|
||||
</div>
|
||||
@@ -57,8 +57,8 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if data.community_blocks.length > 0 || data.person_blocks.length > 0}
|
||||
{#if data.person_blocks.length > 0}
|
||||
{#if data.community_blocks?.length > 0 || data.person_blocks?.length > 0}
|
||||
{#if data.person_blocks?.length > 0}
|
||||
<div>
|
||||
<SectionTitle>Users</SectionTitle>
|
||||
<EditableList let:action on:action={(i) => unblockUser(i.detail)}>
|
||||
@@ -85,7 +85,7 @@
|
||||
/>
|
||||
{/if}
|
||||
|
||||
{#if data.community_blocks.length > 0}
|
||||
{#if data.community_blocks?.length > 0}
|
||||
<div>
|
||||
<SectionTitle>Communities</SectionTitle>
|
||||
<EditableList let:action on:action={(i) => unblockCommunity(i.detail)}>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
'/profile/blocks',
|
||||
'/profile/password',
|
||||
]}
|
||||
optionNames={['User', 'Settings', 'Blocks', 'Password']}
|
||||
optionNames={['User', 'Settings', 'Blocks', 'Login']}
|
||||
selected={$page.url.pathname}
|
||||
on:select={(e) => {
|
||||
goto(e.detail)
|
||||
|
||||
Reference in new issue
Block a user