作者主页

This commit is contained in:
2025-11-29 21:56:38 +08:00
parent 63ed49e762
commit 674c202264
11 changed files with 279 additions and 37 deletions
@@ -1,3 +1,4 @@
import Link from "next/link";
import {
ArrowDownUp,
Download,
@@ -91,9 +92,21 @@ export function MediaControls({
return (
<div className="absolute left-0 right-0 bottom-0 px-3 pb-4 pt-2 bg-gradient-to-b from-black/0 via-black/45 to-black/65 flex flex-col gap-2.5">
{/* 描述行 */}
<div className="pointer-events-none flex items-center gap-2.5 mb-1">
<img src={author.avatar_url!} alt="" className="w-8 h-8 rounded-full" />
<span className="text-[15px] leading-tight text-white/95 drop-shadow">{author.nickname}</span>
<div className="flex items-center gap-2.5 mb-1 pointer-events-none">
{author.sec_uid ? (
<Link
href={`/author/${author.sec_uid}`}
className="flex items-center gap-2.5 pointer-events-auto hover:opacity-80 transition-opacity"
>
<img src={author.avatar_url!} alt="" className="w-8 h-8 rounded-full" />
<span className="text-[15px] leading-tight text-white/95 drop-shadow font-medium">{author.nickname}</span>
</Link>
) : (
<div className="flex items-center gap-2.5">
<img src={author.avatar_url!} alt="" className="w-8 h-8 rounded-full" />
<span className="text-[15px] leading-tight text-white/95 drop-shadow">{author.nickname}</span>
</div>
)}
<span className="text-[13px] leading-tight text-white/95 drop-shadow">·</span>
<span
className="text-[11px] leading-tight text-white/95 drop-shadow"
+5 -1
View File
@@ -66,7 +66,11 @@ export default async function AwemeDetail({ params }: { params: Promise<{ awemeI
created_at: aweme!.created_at,
likesCount: Number(aweme!.digg_count),
commentsCount,
author: { nickname: aweme!.author.nickname, avatar_url: getFileUrl(aweme!.author.avatar_url || 'default-avatar.png') },
author: {
nickname: aweme!.author.nickname,
avatar_url: getFileUrl(aweme!.author.avatar_url || 'default-avatar.png'),
sec_uid: aweme!.author.sec_uid
},
...(() => {
if (isVideo) {
const aweme = video!
+1 -1
View File
@@ -1,4 +1,4 @@
export type User = { nickname: string; avatar_url: string | null };
export type User = { nickname: string; avatar_url: string | null; sec_uid?: string };
export type Comment = {
cid: string;