0.0.5.5
This commit is contained in:
+12
-18
@@ -191,12 +191,6 @@ export default function DashboardPage() {
|
||||
{session && currentTree?.ownerId === session.user?.id && (
|
||||
<CollaboratorDialog />
|
||||
)}
|
||||
<Link href="/relationship">
|
||||
<Button variant="outline" className="gap-2 bg-transparent">
|
||||
<Calculator className="h-4 w-4" />
|
||||
计算器
|
||||
</Button>
|
||||
</Link>
|
||||
{(currentTree?.currentUserRole === "OWNER" || currentTree?.currentUserRole === "EDITOR") && (
|
||||
<Link href="/members/new">
|
||||
<Button className="gap-2 bg-primary text-primary-foreground hover:bg-primary/90">
|
||||
@@ -249,11 +243,11 @@ export default function DashboardPage() {
|
||||
</div>
|
||||
<div className="flex flex-col space-y-4">
|
||||
<div className="flex items-center justify-center gap-3 py-2">
|
||||
<span className="text-5xl font-serif font-bold text-blue-600 dark:text-blue-400 tracking-wider">
|
||||
<span className="text-5xl font-serif font-bold text-primary tracking-wider">
|
||||
1
|
||||
</span>
|
||||
<span className="text-4xl font-bold text-muted-foreground">:</span>
|
||||
<span className="text-5xl font-serif font-bold text-pink-600 dark:text-pink-400 tracking-wider">
|
||||
<span className="text-5xl font-serif font-bold text-primary tracking-wider">
|
||||
{stats.maleCount > 0 ? (stats.femaleCount / stats.maleCount).toFixed(2) : '0'}
|
||||
</span>
|
||||
</div>
|
||||
@@ -264,32 +258,32 @@ export default function DashboardPage() {
|
||||
{/* 双色进度条 */}
|
||||
<div className="space-y-2">
|
||||
<div className="flex items-center justify-between text-xs">
|
||||
<span className="text-blue-600 dark:text-blue-400 font-medium flex items-center gap-1">
|
||||
<span className="w-2 h-2 rounded-full bg-blue-500"></span>
|
||||
<span className="text-primary/80 font-medium flex items-center gap-1">
|
||||
<span className="w-2 h-2 rounded-full bg-primary/60"></span>
|
||||
男性 {stats.maleCount}
|
||||
</span>
|
||||
<span className="text-pink-600 dark:text-pink-400 font-medium flex items-center gap-1">
|
||||
<span className="text-primary/80 font-medium flex items-center gap-1">
|
||||
女性 {stats.femaleCount}
|
||||
<span className="w-2 h-2 rounded-full bg-pink-500"></span>
|
||||
<span className="w-2 h-2 rounded-full bg-primary/60"></span>
|
||||
</span>
|
||||
</div>
|
||||
<div className="h-3 bg-muted rounded-full overflow-hidden flex">
|
||||
<div className="h-3 bg-background/60 border border-border/50 rounded-full overflow-hidden flex">
|
||||
<div
|
||||
className="h-full bg-gradient-to-r from-blue-600 to-blue-500 transition-all duration-500 flex items-center justify-center"
|
||||
className="h-full bg-primary/70 transition-all duration-500 flex items-center justify-center"
|
||||
style={{ width: `${stats.totalMembers > 0 ? (stats.maleCount / stats.totalMembers * 100) : 0}%` }}
|
||||
>
|
||||
{stats.totalMembers > 0 && stats.maleCount > 0 && (
|
||||
<span className="text-[10px] text-white font-bold px-1">
|
||||
<span className="text-[10px] text-primary-foreground font-bold px-1">
|
||||
{Math.round(stats.maleCount / stats.totalMembers * 100)}%
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
<div
|
||||
className="h-full bg-gradient-to-r from-pink-500 to-pink-600 transition-all duration-500 flex items-center justify-center"
|
||||
className="h-full bg-primary/40 transition-all duration-500 flex items-center justify-center"
|
||||
style={{ width: `${stats.totalMembers > 0 ? (stats.femaleCount / stats.totalMembers * 100) : 0}%` }}
|
||||
>
|
||||
{stats.totalMembers > 0 && stats.femaleCount > 0 && (
|
||||
<span className="text-[10px] text-white font-bold px-1">
|
||||
<span className="text-[10px] text-primary-foreground font-bold px-1">
|
||||
{Math.round(stats.femaleCount / stats.totalMembers * 100)}%
|
||||
</span>
|
||||
)}
|
||||
@@ -298,7 +292,7 @@ export default function DashboardPage() {
|
||||
</div>
|
||||
</div>
|
||||
</CardContent>
|
||||
<div className="absolute bottom-0 left-0 right-0 h-1 bg-gradient-to-r from-blue-500 via-purple-500 to-pink-500 opacity-0 group-hover:opacity-100 transition-opacity" />
|
||||
<div className="absolute bottom-0 left-0 right-0 h-1 bg-gradient-to-r from-primary/50 via-primary to-primary/50 opacity-0 group-hover:opacity-100 transition-opacity" />
|
||||
</Card>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user