fix(frontend): use display name for members if possible
This commit is contained in:
parent
b50bed296a
commit
bfc9e6f5c0
2 changed files with 10 additions and 5 deletions
|
@ -25,7 +25,8 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{#if $userStore && $userStore.id === data.user.id}
|
{#if $userStore && $userStore.id === data.user.id}
|
||||||
<Alert color="secondary" fade={false}>
|
<Alert color="secondary" fade={false}>
|
||||||
You are currently viewing the <strong>public</strong> profile of {data.name}.
|
You are currently viewing the <strong>public</strong> profile of {data.display_name ??
|
||||||
|
data.name}.
|
||||||
<br /><a href="/edit/member/{data.id}">Edit profile</a>
|
<br /><a href="/edit/member/{data.id}">Edit profile</a>
|
||||||
</Alert>
|
</Alert>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -252,22 +252,26 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>Edit profile - pronouns.cc</title>
|
<title>Edit member profile - pronouns.cc</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<h1>
|
<h1>
|
||||||
Edit profile
|
Edit member profile
|
||||||
<ButtonGroup>
|
<ButtonGroup>
|
||||||
{#if modified}
|
{#if modified}
|
||||||
<Button color="success" on:click={() => updateMember()}>Save changes</Button>
|
<Button color="success" on:click={() => updateMember()}>Save changes</Button>
|
||||||
{/if}
|
{/if}
|
||||||
<Button color="danger" on:click={toggleDeleteOpen}>Delete {data.member.name}</Button>
|
<Button color="danger" on:click={toggleDeleteOpen}
|
||||||
|
>Delete {data.member.display_name ?? data.member.name}</Button
|
||||||
|
>
|
||||||
</ButtonGroup>
|
</ButtonGroup>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<Modal header="Delete member" isOpen={deleteOpen} toggle={toggleDeleteOpen}>
|
<Modal header="Delete member" isOpen={deleteOpen} toggle={toggleDeleteOpen}>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<p>If you want to delete this member, type their name below:</p>
|
<p>
|
||||||
|
If you want to delete this member, type their name (<code>{data.member.name}</code>) below:
|
||||||
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<input type="text" class="form-control" bind:value={deleteName} />
|
<input type="text" class="form-control" bind:value={deleteName} />
|
||||||
</p>
|
</p>
|
||||||
|
|
Loading…
Reference in a new issue