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">
|
<script lang="ts">
|
||||||
|
import { goto } from '$app/navigation'
|
||||||
import { page } from '$app/stores'
|
import { page } from '$app/stores'
|
||||||
import { Button } from 'mono-svelte'
|
import { Button } from 'mono-svelte'
|
||||||
|
import { Icon, XMark } from 'svelte-hero-icons'
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex flex-col mx-auto gap-4 justify-center items-center h-full">
|
<div
|
||||||
<h1 class="font-black text-5xl">{$page.status}</h1>
|
class="flex flex-col gap-2 mx-auto my-auto items-center h-full justify-center"
|
||||||
<p>Failed to fetch that page.</p>
|
>
|
||||||
|
<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>
|
<code>{$page.error?.message}</code>
|
||||||
<Button href={$page.url.toString()}>Retry</Button>
|
<Button on:click={() => goto($page.url)}>Retry</Button>
|
||||||
</div>
|
</div>
|
||||||
@@ -57,8 +57,8 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if data.community_blocks.length > 0 || data.person_blocks.length > 0}
|
{#if data.community_blocks?.length > 0 || data.person_blocks?.length > 0}
|
||||||
{#if data.person_blocks.length > 0}
|
{#if data.person_blocks?.length > 0}
|
||||||
<div>
|
<div>
|
||||||
<SectionTitle>Users</SectionTitle>
|
<SectionTitle>Users</SectionTitle>
|
||||||
<EditableList let:action on:action={(i) => unblockUser(i.detail)}>
|
<EditableList let:action on:action={(i) => unblockUser(i.detail)}>
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if data.community_blocks.length > 0}
|
{#if data.community_blocks?.length > 0}
|
||||||
<div>
|
<div>
|
||||||
<SectionTitle>Communities</SectionTitle>
|
<SectionTitle>Communities</SectionTitle>
|
||||||
<EditableList let:action on:action={(i) => unblockCommunity(i.detail)}>
|
<EditableList let:action on:action={(i) => unblockCommunity(i.detail)}>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
'/profile/blocks',
|
'/profile/blocks',
|
||||||
'/profile/password',
|
'/profile/password',
|
||||||
]}
|
]}
|
||||||
optionNames={['User', 'Settings', 'Blocks', 'Password']}
|
optionNames={['User', 'Settings', 'Blocks', 'Login']}
|
||||||
selected={$page.url.pathname}
|
selected={$page.url.pathname}
|
||||||
on:select={(e) => {
|
on:select={(e) => {
|
||||||
goto(e.detail)
|
goto(e.detail)
|
||||||
|
|||||||
Reference in new issue
Block a user