diff --git a/dashboard/src/api/types.ts b/dashboard/src/api/types.ts index 8ca724b5..02bf220d 100644 --- a/dashboard/src/api/types.ts +++ b/dashboard/src/api/types.ts @@ -19,6 +19,7 @@ export interface System { created?: string; privacy?: SystemPrivacy; color?: string; + pronouns?: string; } export interface Config { diff --git a/dashboard/src/lib/system/Body.svelte b/dashboard/src/lib/system/Body.svelte index eb593d22..eb39cf64 100644 --- a/dashboard/src/lib/system/Body.svelte +++ b/dashboard/src/lib/system/Body.svelte @@ -14,6 +14,8 @@ let htmlDescription: string; let htmlName: string; + let htmlPronouns: string; + if (user.description) { htmlDescription = toHTML(parseTimestamps(user.description), {embed: true}); } else { @@ -24,6 +26,10 @@ htmlName = toHTML(user.name); } + if (user.pronouns) { + htmlPronouns = toHTML(user.pronouns); + } + let created = moment(user.created).format("MMM D, YYYY"); let bannerOpen = false; @@ -33,11 +39,13 @@ let descriptionElement: any; let nameElement: any; let tagElement: any; + let pronounElement: any; $: if (settings && settings.appearance.twemoji) { if (descriptionElement) twemoji.parse(descriptionElement); if (nameElement) twemoji.parse(nameElement); if (tagElement) twemoji.parse(tagElement); + if (pronounElement) twemoji.parse(pronounElement); } @@ -58,6 +66,11 @@ Tag: {user.tag} {/if} + {#if user.pronouns} + + Pronouns: {@html htmlPronouns} + + {/if} {#if user.created && !isPublic} Created: {created} diff --git a/dashboard/src/lib/system/Edit.svelte b/dashboard/src/lib/system/Edit.svelte index 2f0b845e..56f1294d 100644 --- a/dashboard/src/lib/system/Edit.svelte +++ b/dashboard/src/lib/system/Edit.svelte @@ -72,6 +72,10 @@ + + + +