This commit is contained in:
freedakgmail
2025-11-30 10:52:36 +08:00
parent aaae24c68b
commit 72a59b62a0
165 changed files with 705 additions and 655 deletions
+43
View File
@@ -86,6 +86,10 @@ const MemberCard = memo(function MemberCard({
: null
const spouseName = spouse ? spouse.fullName : null
// 获取父母信息
const father = member.fatherId ? allMembers.find(m => m.id === member.fatherId) : null
const mother = member.motherId ? allMembers.find(m => m.id === member.motherId) : null
return (
<div className="relative group">
<Link href={`/members/${member.id}${typeof window !== 'undefined' ? window.location.search : ''}`}>
@@ -118,6 +122,45 @@ const MemberCard = memo(function MemberCard({
</span>
)}
</h3>
{/* 父母信息 - 放在姓名右侧 */}
{(father || mother) && (
<div className="flex items-center gap-1 text-xs text-muted-foreground flex-shrink-0">
<span className="text-muted-foreground/70">:</span>
{father && (
<span
className="hover:text-primary hover:underline cursor-pointer"
onClick={(e) => {
e.preventDefault()
e.stopPropagation()
window.location.href = `/members/${father.id}${window.location.search}`
}}
>
<MemberNameWithStatus
name={father.fullName}
isDead={!!father.deathDate}
dotPosition="top-left"
/>
</span>
)}
{father && mother && <span className="text-muted-foreground/50">·</span>}
{mother && (
<span
className="hover:text-primary hover:underline cursor-pointer"
onClick={(e) => {
e.preventDefault()
e.stopPropagation()
window.location.href = `/members/${mother.id}${window.location.search}`
}}
>
<MemberNameWithStatus
name={mother.fullName}
isDead={!!mother.deathDate}
dotPosition="top-left"
/>
</span>
)}
</div>
)}
</div>
{isFounder ? (
<p className="text-xs text-amber-700 font-semibold mt-0.5 truncate">