diff --git a/frontend/src/routes/@[username]/[memberName]/edit/+layout.ts b/frontend/src/routes/@[username]/[memberName]/edit/+layout.ts
index 1520af7..faa5c7a 100644
--- a/frontend/src/routes/@[username]/[memberName]/edit/+layout.ts
+++ b/frontend/src/routes/@[username]/[memberName]/edit/+layout.ts
@@ -1,4 +1,11 @@
-import type { PrideFlag, MeUser, APIError, Member, PronounsJson } from "$lib/api/entities";
+import {
+ type PrideFlag,
+ type MeUser,
+ type APIError,
+ type Member,
+ type PronounsJson,
+ ErrorCode,
+} from "$lib/api/entities";
import { apiFetchClient } from "$lib/api/fetch";
import { error, redirect } from "@sveltejs/kit";
@@ -11,11 +18,21 @@ export const ssr = false;
export const load = (async ({ params }) => {
try {
const user = await apiFetchClient(`/users/@me`);
- const member = await apiFetchClient(`/users/@me/members/${params.memberName}`);
+ const member = await apiFetchClient(
+ `/users/${params.username}/members/${params.memberName}`,
+ );
const flags = await apiFetchClient("/users/@me/flags");
- if (user.name !== params.username || member.user.name !== params.username || member.name !== params.memberName) {
- throw redirect(303, `/@${user.name}/${member.name}`);
+ if (user.id !== member.user.id) {
+ throw { code: ErrorCode.NotOwnMember, message: "Can only edit your own members" } as APIError;
+ }
+
+ if (
+ user.name !== params.username ||
+ member.user.name !== params.username ||
+ member.name !== params.memberName
+ ) {
+ throw redirect(303, `/@${user.name}/${member.name}`);
}
return {
diff --git a/frontend/src/routes/@[username]/[memberName]/edit/bio/+page.svelte b/frontend/src/routes/@[username]/[memberName]/edit/bio/+page.svelte
new file mode 100644
index 0000000..76eb78b
--- /dev/null
+++ b/frontend/src/routes/@[username]/[memberName]/edit/bio/+page.svelte
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+ Using {charCount($member.bio || "")}/{MAX_DESCRIPTION_LENGTH} characters
+
+
+
+
+{#if $member.bio}
+
+
+ Preview
+
+ {@html renderMarkdown($member.bio)}
+
+
+{/if}
diff --git a/frontend/src/routes/@[username]/[memberName]/edit/fields/+page.svelte b/frontend/src/routes/@[username]/[memberName]/edit/fields/+page.svelte
new file mode 100644
index 0000000..1134a3c
--- /dev/null
+++ b/frontend/src/routes/@[username]/[memberName]/edit/fields/+page.svelte
@@ -0,0 +1,53 @@
+
+
+{#if $member.fields.length === 0}
+
+ Fields are extra categories you can add separate from names and pronouns.
+ For example, you could use them for gender terms, honorifics, or compliments.
+
+{/if}
+
+ {#each filteredFlags as flag (flag.id)}
+ addFlag(flag)} />
+ {:else}
+ {#if data.flags.length === 0}
+ You haven't uploaded any flags yet.
+ {:else}
+ There are no flags matching your search {flagSearch}.
+ {/if}
+ {/each}
+
+
+
+
+ {#if data.flags.length === 0}
+
Why can't I see any flags?
+
+ There are thousands of pride flags, and it would be impossible to bundle all of them by
+ default. Many labels also have multiple different flags that are favoured by different
+ people. Because of this, there are no flags available by default--instead, you can upload
+ flags in your settings. Your main profile and your member
+ profiles can all have different flags.
+
+ {:else}
+ To upload and delete flags, go to your settings.
+ {/if}
+
+
+
diff --git a/frontend/src/routes/@[username]/[memberName]/edit/links/+page.svelte b/frontend/src/routes/@[username]/[memberName]/edit/links/+page.svelte
new file mode 100644
index 0000000..17c9662
--- /dev/null
+++ b/frontend/src/routes/@[username]/[memberName]/edit/links/+page.svelte
@@ -0,0 +1,63 @@
+
+
+{#each $member.links as _, index}
+
+ {#if data.user.list_private}
+
+ Your member list is currently hidden, so this setting has no effect. If you
+ want to make your member list visible again,
+ edit your user profile.
+
+ {/if}
+
+ This only hides this member from your member list.
+
+ This member will still be visible to anyone at
+ pronouns.cc/@{$member.user.name}/{$member.name}.
+
+
+
+ {#if PUBLIC_SHORT_BASE}
+
+
+ Current short ID: {$member.sid}
+
+
+
+
+
+
+
+ This ID is used in prns.cc links. You can reroll one short ID every hour (shared
+ between your main profile and all members) by pressing the button above.
+
+