From 29fa924cb3ab573b64fd3df68dc5585edadd6077 Mon Sep 17 00:00:00 2001 From: Xyphyn Date: Wed, 27 Sep 2023 15:25:22 -0700 Subject: [PATCH] misc: tweak error pages, fix #159 --- src/routes/+error.svelte | 19 +++++++++++++++---- .../profile/(local_user)/blocks/+page.svelte | 6 +++--- src/routes/profile/+layout.svelte | 2 +- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/routes/+error.svelte b/src/routes/+error.svelte index 5af4e7ab..d1599637 100644 --- a/src/routes/+error.svelte +++ b/src/routes/+error.svelte @@ -1,11 +1,22 @@ -
-

{$page.status}

-

Failed to fetch that page.

+
+
+ +
+

+ {$page.status} +

+

Failed to fetch that page.

{$page.error?.message} - +
diff --git a/src/routes/profile/(local_user)/blocks/+page.svelte b/src/routes/profile/(local_user)/blocks/+page.svelte index 623fd4ee..bd0a9a05 100644 --- a/src/routes/profile/(local_user)/blocks/+page.svelte +++ b/src/routes/profile/(local_user)/blocks/+page.svelte @@ -57,8 +57,8 @@ } -{#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}
Users unblockUser(i.detail)}> @@ -85,7 +85,7 @@ /> {/if} - {#if data.community_blocks.length > 0} + {#if data.community_blocks?.length > 0}
Communities unblockCommunity(i.detail)}> diff --git a/src/routes/profile/+layout.svelte b/src/routes/profile/+layout.svelte index d37518f0..e3cc3c66 100644 --- a/src/routes/profile/+layout.svelte +++ b/src/routes/profile/+layout.svelte @@ -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)