diff --git a/frontend/src/routes/edit/member/[id]/+page.svelte b/frontend/src/routes/edit/member/[id]/+page.svelte index 6958857..8e18f1f 100644 --- a/frontend/src/routes/edit/member/[id]/+page.svelte +++ b/frontend/src/routes/edit/member/[id]/+page.svelte @@ -11,9 +11,7 @@ type Pronoun, } from "$lib/api/entities"; import FallbackImage from "$lib/components/FallbackImage.svelte"; - import { userStore } from "$lib/store"; import { - Alert, Button, ButtonGroup, FormGroup, @@ -38,7 +36,8 @@ export let data: PageData; - if (!$userStore || $userStore.id !== data.member.user.id) { + if (data.user.id !== data.member.user.id) { + addToast({ header: "Not your member", body: "You cannot edit another user's member." }); goto(`/@${data.member.user.name}/${data.member.name}`); } @@ -307,161 +306,157 @@ {/if} -{#if !$userStore} - Error: No user object -{:else} -
-
-
-

Avatar

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

Avatar

+
+
+ {#if avatar === ""} + + {:else if avatar} + New avatar -

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

- (avatar = "")}>Remove avatar -
-
-
-
-
- - - - {#if !memberNameValid} -

That member name is not valid.

+ {:else} + {/if}
-
- - - -
-
- -