mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-06-28 14:44:15 +00:00
feat: abandon webp
This commit is contained in:
parent
44be36b501
commit
22fb3a2e30
18 changed files with 34 additions and 39 deletions
|
|
@ -63,7 +63,7 @@ export default function Description({ text, className }: Props) {
|
|||
href={`/profile/${id}`}
|
||||
className="inline-flex items-center align-bottom gap-1.5 pr-2 bg-orange-100 border border-orange-400 rounded-lg mx-1 text-orange-800 text-xs"
|
||||
>
|
||||
<ProfilePicture src={linkedProfile.image || "/guest.webp"} width={24} height={24} className="bg-white rounded-lg border-r border-orange-400" />
|
||||
<ProfilePicture src={linkedProfile.image || "/guest.png"} width={24} height={24} className="bg-white rounded-lg border-r border-orange-400" />
|
||||
{linkedProfile.name}
|
||||
</Link>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ export default function Dropzone({ onDrop, options, children }: Props) {
|
|||
onDrop: handleDrop,
|
||||
maxFiles: 3,
|
||||
accept: {
|
||||
"image/*": [".png", ".jpg", ".jpeg", ".bmp", ".webp", ".heic"],
|
||||
"image/*": [".png", ".jpg", ".jpeg", ".bmp", ".png", ".heic"],
|
||||
},
|
||||
...options,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ export default async function ProfileInformation({ userId, page }: Props) {
|
|||
<div className="flex w-full gap-4 overflow-x-scroll">
|
||||
{/* Profile picture */}
|
||||
<Link href={`/profile/${user.id}`} className="size-28 aspect-square">
|
||||
<ProfilePicture src={user.image ?? "/guest.webp"} className="rounded-full bg-white border-2 border-orange-400 shadow max-md:self-center" />
|
||||
<ProfilePicture src={user.image ?? "/guest.png"} className="rounded-full bg-white border-2 border-orange-400 shadow max-md:self-center" />
|
||||
</Link>
|
||||
{/* User information */}
|
||||
<div className="flex flex-col w-full relative py-3">
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export default async function ProfileOverview() {
|
|||
<li title="Your profile">
|
||||
<Link href={`/profile/${session?.user.id}`} aria-label="Go to profile" className="pill button gap-2! p-0! h-full max-w-64" data-tooltip="Your Profile">
|
||||
<Image
|
||||
src={session?.user?.image ?? "/guest.webp"}
|
||||
src={session?.user?.image ?? "/guest.png"}
|
||||
alt="profile picture"
|
||||
width={40}
|
||||
height={40}
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ export default function ProfilePicture(props: Partial<ImageProps>) {
|
|||
const { src, ...rest } = props;
|
||||
const [imgSrc, setImgSrc] = useState(src);
|
||||
|
||||
return <Image width={128} height={128} {...rest} src={imgSrc || "/guest.webp"} alt={"profile picture"} onError={() => setImgSrc("/guest.webp")} />;
|
||||
return <Image width={128} height={128} {...rest} src={imgSrc || "/guest.png"} alt={"profile picture"} onError={() => setImgSrc("/guest.png")} />;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ export default function ProfilePictureSettings() {
|
|||
</p>
|
||||
|
||||
<Image
|
||||
src={newPicture ? URL.createObjectURL(newPicture) : "/guest.webp"}
|
||||
src={newPicture ? URL.createObjectURL(newPicture) : "/guest.png"}
|
||||
alt="new profile picture"
|
||||
width={96}
|
||||
height={96}
|
||||
|
|
@ -93,7 +93,7 @@ export default function ProfilePictureSettings() {
|
|||
<div className="bg-orange-100 rounded-xl border-2 border-amber-500 mt-4 px-2 py-1 flex items-center">
|
||||
<p className="font-semibold mb-2">New profile picture:</p>
|
||||
<Image
|
||||
src={newPicture ? URL.createObjectURL(newPicture) : "/guest.webp"}
|
||||
src={newPicture ? URL.createObjectURL(newPicture) : "/guest.png"}
|
||||
alt="new profile picture"
|
||||
width={128}
|
||||
height={128}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ export default function ReportUserForm({ user }: Props) {
|
|||
<hr className="border-zinc-300" />
|
||||
|
||||
<div className="bg-orange-100 rounded-xl border-2 border-orange-400 flex p-4 gap-4">
|
||||
<ProfilePicture src={user.image ?? "/guest.webp"} width={96} height={96} className="aspect-square rounded-full border-2 border-orange-400" />
|
||||
<ProfilePicture src={user.image ?? "/guest.png"} width={96} height={96} className="aspect-square rounded-full border-2 border-orange-400" />
|
||||
<div className="flex flex-col justify-center">
|
||||
<p className="text-xl font-bold overflow-hidden text-ellipsis">{user.name}</p>
|
||||
<p className="text-sm font-bold overflow-hidden text-ellipsis">@{user.username}</p>
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ export default function EditForm({ mii, likes }: Props) {
|
|||
const response = await fetch(path);
|
||||
const blob = await response.blob();
|
||||
|
||||
return Object.assign(new File([blob], `image${index}.webp`, { type: "image/webp" }), { path });
|
||||
return Object.assign(new File([blob], `image${index}.png`, { type: "image/png" }), { path });
|
||||
}),
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue