账户总览页优化手机端适配问题

This commit is contained in:
Eamon-meng
2025-06-10 12:51:35 +08:00
parent 0f34b938e5
commit 87d638c3fe
3 changed files with 79 additions and 94 deletions

View File

@@ -1,5 +1,5 @@
import Image from 'next/image'
import {Card, CardContent, CardHeader, CardTitle} from '@/components/ui/card'
import {Card, CardContent} from '@/components/ui/card'
import {getProfile} from '@/actions/auth'
import {format} from 'date-fns'
import {CheckCircleIcon, CircleAlertIcon} from 'lucide-react'
@@ -23,21 +23,21 @@ async function UserCenter() {
const profile = resp.data
return (
<Card className="col-start-4 row-start-1 row-span-2">
<CardContent className="flex-auto flex flex-col justify-between">
<Card className="h-full">
<CardContent className="flex-auto flex flex-col justify-between gap-4">
<div className="flex flex-col gap-1">
<p>{profile.phone}</p>
<p className="text-sm text-weak">{`最后登录:${format(profile.last_login, 'yyyy-MM-dd HH:mm')}`}</p>
</div>
<div className={merge(
`flex justify-between p-2 rounded-md`,
`flex justify-between p-2 rounded-md`,
profile.id_token ? `bg-done-muted` : `bg-warn-muted`,
)}
>
{profile.id_token
? (
<>
<div className="flex gap-2 items-center">
<div className="flex gap-2 items-center ">
<CheckCircleIcon size={20} className="text-done"/>
<span></span>
</div>