feat: add guest picture
also add contributor badge
This commit is contained in:
parent
b2fcf64f58
commit
3a302c87c3
4 changed files with 13 additions and 4 deletions
|
|
@ -1,9 +1,11 @@
|
||||||
DATABASE_URL="postgresql://frieren:frieren@localhost:5432/tomodachi-share?schema=public"
|
DATABASE_URL="postgresql://frieren:frieren@localhost:5432/tomodachi-share?schema=public"
|
||||||
|
# Used for rate limiting
|
||||||
REDIS_URL="redis://localhost:6379/0"
|
REDIS_URL="redis://localhost:6379/0"
|
||||||
|
|
||||||
BASE_URL=https://tomodachi-share.trafficlunar.net
|
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_TRUST_HOST=true
|
||||||
AUTH_SECRET=XXXXXXXXXXXXXXXX
|
AUTH_SECRET=XXXXXXXXXXXXXXXX
|
||||||
AUTH_DISCORD_ID=XXXXXXXXXXXXXXXX
|
AUTH_DISCORD_ID=XXXXXXXXXXXXXXXX
|
||||||
|
|
@ -12,3 +14,5 @@ AUTH_GITHUB_ID=XXXXXXXXXXXXXXXX
|
||||||
AUTH_GITHUB_SECRET=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
BIN
public/guest.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
|
|
@ -25,7 +25,7 @@ export default async function ProfileInformation({ user: userData, createdAt, in
|
||||||
<div className="flex w-full gap-4 overflow-x-scroll">
|
<div className="flex w-full gap-4 overflow-x-scroll">
|
||||||
{/* Profile picture */}
|
{/* Profile picture */}
|
||||||
<Image
|
<Image
|
||||||
src={user?.image ?? "/missing.svg"}
|
src={user?.image ?? "/guest.webp"}
|
||||||
alt="profile picture"
|
alt="profile picture"
|
||||||
width={128}
|
width={128}
|
||||||
height={128}
|
height={128}
|
||||||
|
|
@ -40,6 +40,11 @@ export default async function ProfileInformation({ user: userData, createdAt, in
|
||||||
<Icon icon="mdi:shield-moon" />
|
<Icon icon="mdi:shield-moon" />
|
||||||
</div>
|
</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>
|
</h1>
|
||||||
<h2 className="text-lg font-semibold break-words">@{user?.username}</h2>
|
<h2 className="text-lg font-semibold break-words">@{user?.username}</h2>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ export default async function ProfileOverview() {
|
||||||
<li title="Your profile">
|
<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">
|
<Link href={`/profile/${session?.user.id}`} className="pill button !gap-2 !p-0 h-full max-w-64" data-tooltip="Your Profile">
|
||||||
<Image
|
<Image
|
||||||
src={session?.user?.image ?? "/missing.svg"}
|
src={session?.user?.image ?? "/guest.webp"}
|
||||||
alt="profile picture"
|
alt="profile picture"
|
||||||
width={40}
|
width={40}
|
||||||
height={40}
|
height={40}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue