From 575aa01fa5adec24c9d4100579941b7a4c376a2b Mon Sep 17 00:00:00 2001 From: sam Date: Thu, 10 Aug 2023 18:09:10 +0200 Subject: [PATCH] add fields and flags to new edit page --- .../src/routes/edit/profile-old/+page.svelte | 360 ------------------ .../routes/edit/profile/fields/+page.svelte | 51 +++ .../routes/edit/profile/flags/+page.svelte | 104 +++++ 3 files changed, 155 insertions(+), 360 deletions(-) create mode 100644 frontend/src/routes/edit/profile/fields/+page.svelte create mode 100644 frontend/src/routes/edit/profile/flags/+page.svelte diff --git a/frontend/src/routes/edit/profile-old/+page.svelte b/frontend/src/routes/edit/profile-old/+page.svelte index 8baa2d4..ea1648a 100644 --- a/frontend/src/routes/edit/profile-old/+page.svelte +++ b/frontend/src/routes/edit/profile-old/+page.svelte @@ -1,7 +1,5 @@ + +{#if $user.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 $user.fields as _, index} + removeField(index)} + moveField={(up) => moveField(index, up)} + /> + {/each} +
+
+
+ +
diff --git a/frontend/src/routes/edit/profile/flags/+page.svelte b/frontend/src/routes/edit/profile/flags/+page.svelte new file mode 100644 index 0000000..d62122a --- /dev/null +++ b/frontend/src/routes/edit/profile/flags/+page.svelte @@ -0,0 +1,104 @@ + + +
+ {#each $user.flags as _, index} + + moveFlag(index, true)} + /> + moveFlag(index, false)} + /> + removeFlag(index)} + /> + + {/each} +
+
+
+
+ +
+ {#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} +
+
+