fix: email showing up in list instead of username

This commit is contained in:
Xyphyn committed 2023-08-19 19:14:38 -07:00
1 parent 8ecf656e5f
commit 10dc00080b
4 files changed
+5 -9

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "photon-lemmy", "name": "photon-lemmy",
"version": "0.9.14", "version": "0.9.15",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "vite dev", "dev": "vite dev",
+3 -1
View File
@@ -105,6 +105,8 @@ export async function setUser(jwt: string, inst: string, username: string) {
content: 'Failed to fetch your user. Is your instance down?', content: 'Failed to fetch your user. Is your instance down?',
type: 'error', type: 'error',
}) })
return
} }
instance.set(inst) instance.set(inst)
@@ -117,7 +119,7 @@ export async function setUser(jwt: string, inst: string, username: string) {
id: id, id: id,
instance: inst, instance: inst,
jwt: jwt, jwt: jwt,
username: username, username: user.user.local_user_view.person.name,
} }
profile.set({ profile.set({
+1 -1
View File
@@ -78,7 +78,7 @@
class:hidden={!$userSettings.expandSidebar} class:hidden={!$userSettings.expandSidebar}
class="flex flex-col gap-0" class="flex flex-col gap-0"
> >
{prof.username} {prof.username ?? prof.user?.local_user_view.person.name}
<span class="text-slate-500 dark:text-zinc-400 font-normal text-xs"> <span class="text-slate-500 dark:text-zinc-400 font-normal text-xs">
{prof.instance} {prof.instance}
</span> </span>
-6
View File
@@ -64,12 +64,6 @@
label="Username" label="Username"
placeholder="Example" placeholder="Example"
class="flex-1" class="flex-1"
on:input={(e) => {
if (e.detail.data == '@') {
document.getElementById('instance_url')?.focus()
data.username = data.username.replace('@', '')
}
}}
required required
/> />
{#if !LINKED_INSTANCE_URL} {#if !LINKED_INSTANCE_URL}