feat: add guest picture

also add contributor badge
This commit is contained in:
trafficlunar 2025-05-08 22:08:43 +01:00
parent b2fcf64f58
commit 3a302c87c3
4 changed files with 13 additions and 4 deletions

View file

@ -1,9 +1,11 @@
DATABASE_URL="postgresql://frieren:frieren@localhost:5432/tomodachi-share?schema=public"
# Used for rate limiting
REDIS_URL="redis://localhost:6379/0"
BASE_URL=https://tomodachi-share.trafficlunar.net
NEXTAUTH_URL=https://tomodachi-share.trafficlunar.net # This should be the same as BASE_URL
# Check Auth.js docs for information
AUTH_URL=https://tomodachi-share.trafficlunar.net # This should be the same as BASE_URL
AUTH_TRUST_HOST=true
AUTH_SECRET=XXXXXXXXXXXXXXXX
AUTH_DISCORD_ID=XXXXXXXXXXXXXXXX
@ -11,4 +13,6 @@ AUTH_DISCORD_SECRET=XXXXXXXXXXXXXXXX
AUTH_GITHUB_ID=XXXXXXXXXXXXXXXX
AUTH_GITHUB_SECRET=XXXXXXXXXXXXXXXX
NEXT_PUBLIC_ADMIN_USER_ID=1
NEXT_PUBLIC_ADMIN_USER_ID=1
# Separated by commas
NEXT_PUBLIC_CONTRIBUTORS_USER_IDS=176

BIN
public/guest.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -25,7 +25,7 @@ export default async function ProfileInformation({ user: userData, createdAt, in
<div className="flex w-full gap-4 overflow-x-scroll">
{/* Profile picture */}
<Image
src={user?.image ?? "/missing.svg"}
src={user?.image ?? "/guest.webp"}
alt="profile picture"
width={128}
height={128}
@ -40,6 +40,11 @@ export default async function ProfileInformation({ user: userData, createdAt, in
<Icon icon="mdi:shield-moon" />
</div>
)}
{process.env.NEXT_PUBLIC_CONTRIBUTORS_USER_IDS?.split(",").includes(id.toString()) && (
<div data-tooltip="Contributor" className="font-normal text-orange-400">
<Icon icon="mingcute:group-fill" />
</div>
)}
</h1>
<h2 className="text-lg font-semibold break-words">@{user?.username}</h2>

View file

@ -9,7 +9,7 @@ export default async function ProfileOverview() {
<li title="Your profile">
<Link href={`/profile/${session?.user.id}`} className="pill button !gap-2 !p-0 h-full max-w-64" data-tooltip="Your Profile">
<Image
src={session?.user?.image ?? "/missing.svg"}
src={session?.user?.image ?? "/guest.webp"}
alt="profile picture"
width={40}
height={40}