feat(profile): implement avatar upload functionality and update profile handling

This commit is contained in:
2026-03-29 15:12:34 +02:00
parent 3b57ad4f37
commit a3964eb047
8 changed files with 131 additions and 3 deletions

View File

@@ -28,6 +28,9 @@ export function ProfileHeader({ displayName, username, bio, avatarUrl }: Profile
if (!normalizedAvatarUrl) {
return false;
}
if (normalizedAvatarUrl.startsWith("/uploads/avatars/")) {
return true;
}
try {
const url = new URL(normalizedAvatarUrl);
if (url.protocol !== "http:" && url.protocol !== "https:") {