diff --git a/frontend/src/routes/+error.svelte b/frontend/src/routes/+error.svelte index 9d7d887..4b46c30 100644 --- a/frontend/src/routes/+error.svelte +++ b/frontend/src/routes/+error.svelte @@ -1,8 +1,12 @@ + + Error - pronouns.cc + +

An error occurred ({$page.status})

{#if $page.error?.code === ErrorCode.NotFound} diff --git a/frontend/src/routes/@[username]/+error.svelte b/frontend/src/routes/@[username]/+error.svelte index 611f443..8ff04db 100644 --- a/frontend/src/routes/@[username]/+error.svelte +++ b/frontend/src/routes/@[username]/+error.svelte @@ -3,6 +3,10 @@ import { ErrorCode } from "$lib/api/entities"; + + Error - pronouns.cc + + {#if $page.error?.code === ErrorCode.Forbidden || $page.error?.code === ErrorCode.InvalidToken}

Not logged in

diff --git a/frontend/src/routes/edit/+error.svelte b/frontend/src/routes/edit/+error.svelte new file mode 100644 index 0000000..8ff04db --- /dev/null +++ b/frontend/src/routes/edit/+error.svelte @@ -0,0 +1,39 @@ + + + + Error - pronouns.cc + + +{#if $page.error?.code === ErrorCode.Forbidden || $page.error?.code === ErrorCode.InvalidToken} +

Not logged in

+

+ Either you aren't logged in, or your login has expired. Please log in again. +

+{:else if $page.error?.code === ErrorCode.NotOwnMember} +

Not your member

+

You can only edit your own members.

+{:else} +

An error occurred ({$page.status})

+ + {#if $page.status === 404} +

The user you were looking for couldn't be found. Please check for any typos.

+ {:else if $page.status === 429} +

You've exceeded a rate limit, please try again later.

+ {:else if $page.status === 500} +

An internal error occurred. Please try again later.

+

+ If this error keeps happening, please file a bug report with an explanation of what you did to cause the error. +

+ {/if} + +

Error message: {$page.error?.message}

+{/if} diff --git a/frontend/src/routes/edit/member/[id]/+page.svelte b/frontend/src/routes/edit/member/[id]/+page.svelte deleted file mode 100644 index 3799a7d..0000000 --- a/frontend/src/routes/edit/member/[id]/+page.svelte +++ /dev/null @@ -1,808 +0,0 @@ - - - - Edit member profile - pronouns.cc - - -

- Edit member profile - - - {#if modified} - - {/if} - - -

- - - -

- If you want to delete this member, type {deleteModalPronoun} name ({data.member.name}) below: -

-

- -

- {#if deleteError} - - {/if} -
- - - - -
- -{#if error} - -{/if} - - - -
-
-
-
- {#if avatar === ""} - - {:else if avatar} - New avatar - {:else} - - {/if} -
-
- -

- Only PNG, JPEG, GIF, and WebP images can be - used as avatars. Avatars cannot be larger than 1 MB, and animated avatars will be made - static. -

-

- - (avatar = "")}>Remove avatar -

-
-
-
-
- - -

- - The member name is only used as part of the link to their profile page. -

-
- {#if !memberNameValid} -

That member name is not valid.

- {/if} - - - -

- - Your display name is used in page titles and as a header. -

-
-
-
-

Names

- {#each names as _, index} - moveName(index, true)} - moveDown={() => moveName(index, false)} - remove={() => removeName(index)} - /> - {/each} -
- - - -
-
- -
-
-