switches username and preferred_username

This commit is contained in:
Christian Beutel
2025-06-24 17:55:59 +02:00
parent cb4f4f8125
commit 8bf8642703
39 changed files with 175 additions and 70 deletions

View File

@@ -64,13 +64,13 @@
<img
class="rounded-full w-16 aspect-square overflow-hidden shrink-0"
src={data.profile.icon ||
`https://api.dicebear.com/7.x/initials/svg?seed=${data.profile.username}&backgroundType=gradientLinear`}
`https://api.dicebear.com/7.x/initials/svg?seed=${data.profile.preferredUsername}&backgroundType=gradientLinear`}
alt="avatar"
/>
<div>
<h4 class="text-2xl font-semibold col-start-2">
{data.profile.preferredUsername ??
data.profile.username}
{data.profile.username ??
"?"}
</h4>
<p class="text-sm text-gray-500 mb-4 break-all">
{data.profile.acct}

View File

@@ -69,7 +69,7 @@
<div class="space-y-4">
<h4 class="text-xl font-semibold">
{$_("about")}
{data.profile.preferredUsername}
{data.profile.username}
{#if data.isOwnProfile && data.profile.bio.length}
<a aria-label="Edit bio" class="ml-4" href="/settings/profile"
><i class="fa fa-pen text-base"></i></a

View File

@@ -64,7 +64,7 @@
<ul class="space-y-4">
{#each follows.items as follow}
<a
href="/profile/@{follow.username}{follow.isLocal
href="/profile/@{follow.preferred_username}{follow.isLocal
? ''
: '@' + follow.domain}"
>
@@ -74,15 +74,15 @@
<img
class="rounded-full w-10 aspect-square overflow-hidden"
src={follow.icon ||
`https://api.dicebear.com/7.x/initials/svg?seed=${follow.username}&backgroundType=gradientLinear`}
`https://api.dicebear.com/7.x/initials/svg?seed=${follow.preferred_username}&backgroundType=gradientLinear`}
alt="avatar"
/>
<div>
<p class="text-lg font-medium">
{follow.preferred_username}
{follow.username}
</p>
<p class="text-sm text-gray-500 break-all">
@{follow.username}@{follow.domain}
@{follow.preferred_username}@{follow.domain}
</p>
</div>
</li>