From b1e267cb29d6a5e561079561f04ddbbeb569de20 Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 30 Mar 2023 23:10:13 +0200 Subject: [PATCH] feat: differentiate okay/avoid preferences more --- frontend/src/lib/components/FieldCard.svelte | 4 ++-- frontend/src/lib/components/PronounLink.svelte | 2 +- frontend/src/lib/components/StatusLine.svelte | 14 ++++++++++++++ frontend/src/routes/@[username]/+page.svelte | 10 ++++------ .../routes/@[username]/[memberName]/+page.svelte | 8 +++----- 5 files changed, 24 insertions(+), 14 deletions(-) create mode 100644 frontend/src/lib/components/StatusLine.svelte diff --git a/frontend/src/lib/components/FieldCard.svelte b/frontend/src/lib/components/FieldCard.svelte index a8af4d6..9d2a9f5 100644 --- a/frontend/src/lib/components/FieldCard.svelte +++ b/frontend/src/lib/components/FieldCard.svelte @@ -1,7 +1,7 @@ @@ -10,7 +10,7 @@

{field.name}

diff --git a/frontend/src/lib/components/PronounLink.svelte b/frontend/src/lib/components/PronounLink.svelte index 30431fe..317dc19 100644 --- a/frontend/src/lib/components/PronounLink.svelte +++ b/frontend/src/lib/components/PronounLink.svelte @@ -26,7 +26,7 @@ {#if shouldLink} - {pronounText} + {pronounText} {:else} {pronounText} {/if} diff --git a/frontend/src/lib/components/StatusLine.svelte b/frontend/src/lib/components/StatusLine.svelte new file mode 100644 index 0000000..ada28f6 --- /dev/null +++ b/frontend/src/lib/components/StatusLine.svelte @@ -0,0 +1,14 @@ + + +{#if status === WordStatus.Favourite} + +{:else if status === WordStatus.Avoid} + +{:else} + +{/if} diff --git a/frontend/src/routes/@[username]/+page.svelte b/frontend/src/routes/@[username]/+page.svelte index 0e9c5c4..5235b7d 100644 --- a/frontend/src/routes/@[username]/+page.svelte +++ b/frontend/src/routes/@[username]/+page.svelte @@ -33,7 +33,8 @@ import renderMarkdown from "$lib/api/markdown"; import ReportButton from "./ReportButton.svelte"; import ProfileLink from "./ProfileLink.svelte"; - import { memberNameRegex } from "$lib/api/regex"; + import { memberNameRegex } from "$lib/api/regex"; + import StatusLine from "$lib/components/StatusLine.svelte"; export let data: PageData; @@ -146,7 +147,7 @@

Names

    {#each data.names as name} -
  • {name.value}
  • +
  • {name.value}
  • {/each}
@@ -156,10 +157,7 @@

Pronouns

    {#each data.pronouns as pronouns} -
  • - - -
  • +
  • {/each}
diff --git a/frontend/src/routes/@[username]/[memberName]/+page.svelte b/frontend/src/routes/@[username]/[memberName]/+page.svelte index 388e086..f71fc5f 100644 --- a/frontend/src/routes/@[username]/[memberName]/+page.svelte +++ b/frontend/src/routes/@[username]/[memberName]/+page.svelte @@ -12,6 +12,7 @@ import renderMarkdown from "$lib/api/markdown"; import ReportButton from "../ReportButton.svelte"; import ProfileLink from "../ProfileLink.svelte"; + import StatusLine from "$lib/components/StatusLine.svelte"; export let data: PageData; @@ -80,7 +81,7 @@

Names

    {#each data.names as name} -
  • {name.value}
  • +
  • {name.value}
  • {/each}
@@ -90,10 +91,7 @@

Pronouns

    {#each data.pronouns as pronouns} -
  • - - -
  • +
  • {/each}