design: update error pages
This commit is contained in:
6 files changed
+22
-60
No files matched your search
@@ -956,7 +956,8 @@
|
|||||||
"rate_limit_error": "You are performing that action too fast.",
|
"rate_limit_error": "You are performing that action too fast.",
|
||||||
"unimplemented": "That function of your account's server software is not yet supported by Photon.",
|
"unimplemented": "That function of your account's server software is not yet supported by Photon.",
|
||||||
"unsupported": "That function is not supported by your account's server software.",
|
"unsupported": "That function is not supported by your account's server software.",
|
||||||
"not_live_supported": "That server is not running supported software, or is offline."
|
"not_live_supported": "That server is not running supported software, or is offline.",
|
||||||
|
"token_not_found": "That email verification link expired, or never existed."
|
||||||
},
|
},
|
||||||
"aria": {
|
"aria": {
|
||||||
"pagination": {
|
"pagination": {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
import { page } from '$app/state'
|
import { page } from '$app/state'
|
||||||
import { errorMessage } from '$lib/app/error'
|
import { errorMessage } from '$lib/app/error'
|
||||||
import { t } from '$lib/app/i18n'
|
import { t } from '$lib/app/i18n'
|
||||||
import { Button } from 'mono-svelte'
|
import { Button, Material } from 'mono-svelte'
|
||||||
|
|
||||||
function getError(message: string): { string: string; code: boolean } {
|
function getError(message: string): { string: string; code: boolean } {
|
||||||
try {
|
try {
|
||||||
@@ -15,11 +15,10 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="flex flex-col gap-4 my-auto h-full justify-center max-w-md w-full mx-auto"
|
class="flex flex-col gap-4 my-auto h-full justify-center max-w-xl w-full mx-auto"
|
||||||
>
|
>
|
||||||
<h1
|
<Material rounding="3xl" padding="xl" color="error" class="space-y-2">
|
||||||
class="text-primary-900 dark:text-primary-100 text-6xl font-black flex items-center flex-row gap-2 font-mono"
|
<h1 class="text-4xl font-medium flex items-center flex-row gap-2 font-mono">
|
||||||
>
|
|
||||||
{page.status}
|
{page.status}
|
||||||
</h1>
|
</h1>
|
||||||
{#if page?.error?.message}
|
{#if page?.error?.message}
|
||||||
@@ -34,14 +33,12 @@
|
|||||||
</p>
|
</p>
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
<div class="flex items-center gap-2">
|
</Material>
|
||||||
<Button
|
<div class="flex items-center gap-2 px-4">
|
||||||
rounding="xl"
|
<Button size="lg" onclick={() => goto(page.url, { invalidateAll: true })}>
|
||||||
onclick={() => goto(page.url, { invalidateAll: true })}
|
|
||||||
>
|
|
||||||
{$t('message.retry')}
|
{$t('message.retry')}
|
||||||
</Button>
|
</Button>
|
||||||
<Button rounding="xl" href="/">
|
<Button href="/" size="lg">
|
||||||
{$t('nav.home')}
|
{$t('nav.home')}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import { error } from '@sveltejs/kit'
|
||||||
|
|
||||||
|
export function load() {
|
||||||
|
error(500, 'You asked for it.')
|
||||||
|
}
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
<script>
|
|
||||||
import { page } from '$app/state'
|
|
||||||
import { t } from '$lib/app/i18n'
|
|
||||||
import { Icon, XMark } from 'svelte-hero-icons/dist'
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div class="flex flex-col items-center h-max my-auto gap-2">
|
|
||||||
<div
|
|
||||||
class="rounded-full bg-red-200 dark:bg-red-900 text-red-600 dark:text-red-300 p-3"
|
|
||||||
>
|
|
||||||
<Icon src={XMark} size="32" mini />
|
|
||||||
</div>
|
|
||||||
<h1 class="text-red-800 dark:text-red-300 text-2xl font-semibold">
|
|
||||||
{$t('message.error')}
|
|
||||||
</h1>
|
|
||||||
<code>{page.error?.message}</code>
|
|
||||||
</div>
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
<script>
|
|
||||||
import { page } from '$app/state'
|
|
||||||
import { t } from '$lib/app/i18n'
|
|
||||||
import { Icon, XMark } from 'svelte-hero-icons/dist'
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div class="flex flex-col items-center h-max my-auto gap-2">
|
|
||||||
<div
|
|
||||||
class="rounded-full bg-red-200 dark:bg-red-900 text-red-600 dark:text-red-300 p-3"
|
|
||||||
>
|
|
||||||
<Icon src={XMark} size="32" mini />
|
|
||||||
</div>
|
|
||||||
<h1 class="text-red-800 dark:text-red-300 text-2xl font-semibold">
|
|
||||||
{$t('message.error')}
|
|
||||||
</h1>
|
|
||||||
<p class="text-red-800 dark:text-red-300">{$t('routes.verifyEmail.error')}</p>
|
|
||||||
<code>{page.error?.message}</code>
|
|
||||||
</div>
|
|
||||||
@@ -1,23 +1,17 @@
|
|||||||
<script>
|
<script>
|
||||||
import { t } from '$lib/app/i18n'
|
import { t } from '$lib/app/i18n'
|
||||||
import { LINKED_INSTANCE_URL } from '$lib/app/instance.svelte'
|
import { LINKED_INSTANCE_URL } from '$lib/app/instance.svelte'
|
||||||
import { CheckCircle, Icon } from 'svelte-hero-icons/dist'
|
import { Header } from '$lib/ui/layout'
|
||||||
|
import { Material } from 'mono-svelte'
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex flex-col h-max my-auto gap-2 max-w-xl mx-auto">
|
<div class="flex flex-col h-max my-auto gap-2 max-w-xl mx-auto">
|
||||||
<div
|
<Material rounding="3xl" padding="xl" color="success" class="space-y-2">
|
||||||
class="rounded-full bg-green-200 dark:bg-green-500/20 text-white p-2 w-max"
|
<Header>
|
||||||
>
|
|
||||||
<Icon src={CheckCircle} size="48" solid />
|
|
||||||
</div>
|
|
||||||
<h1
|
|
||||||
class="text-green-800 dark:text-green-200 text-2xl font-medium tracking-tight"
|
|
||||||
>
|
|
||||||
{$t('message.success')}
|
{$t('message.success')}
|
||||||
</h1>
|
</Header>
|
||||||
<p class="text-green-800 dark:text-green-200">
|
<p class="text-lg">{$t('routes.verifyEmail.message')}</p>
|
||||||
{$t('routes.verifyEmail.message')}
|
</Material>
|
||||||
</p>
|
|
||||||
{#if !LINKED_INSTANCE_URL}
|
{#if !LINKED_INSTANCE_URL}
|
||||||
<p>
|
<p>
|
||||||
You somehow got to this menu despite not being linked here by the email.
|
You somehow got to this menu despite not being linked here by the email.
|
||||||
|
|||||||
Reference in new issue
Block a user