mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 05:00:30 +08:00
optimize profile card
This commit is contained in:
parent
0e129ab00f
commit
f49850ae8a
@ -261,6 +261,22 @@ const ProfileItem: React.FC<Props> = (props) => {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
</CardBody>
|
||||||
|
<CardFooter className="pt-0">
|
||||||
|
{info.type === 'remote' && !extra && (
|
||||||
|
<div
|
||||||
|
className={`w-full mt-2 flex justify-between ${isCurrent ? 'text-primary-foreground' : 'text-foreground'}`}
|
||||||
|
>
|
||||||
|
<Chip
|
||||||
|
size="sm"
|
||||||
|
variant="bordered"
|
||||||
|
className={`${isCurrent ? 'text-primary-foreground border-primary-foreground' : 'border-primary text-primary'}`}
|
||||||
|
>
|
||||||
|
远程
|
||||||
|
</Chip>
|
||||||
|
<small>{dayjs(info.updated).fromNow()}</small>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
{info.type === 'local' && (
|
{info.type === 'local' && (
|
||||||
<div
|
<div
|
||||||
className={`mt-2 flex justify-between ${isCurrent ? 'text-primary-foreground' : 'text-foreground'}`}
|
className={`mt-2 flex justify-between ${isCurrent ? 'text-primary-foreground' : 'text-foreground'}`}
|
||||||
@ -274,8 +290,6 @@ const ProfileItem: React.FC<Props> = (props) => {
|
|||||||
</Chip>
|
</Chip>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</CardBody>
|
|
||||||
<CardFooter className="pt-0">
|
|
||||||
{extra && (
|
{extra && (
|
||||||
<Progress
|
<Progress
|
||||||
className="w-full"
|
className="w-full"
|
||||||
|
|||||||
@ -130,6 +130,22 @@ const ProfileCard: React.FC = () => {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
</CardBody>
|
||||||
|
<CardFooter className="pt-0">
|
||||||
|
{info.type === 'remote' && !extra && (
|
||||||
|
<div
|
||||||
|
className={`w-full mt-2 flex justify-between ${match ? 'text-primary-foreground' : 'text-foreground'}`}
|
||||||
|
>
|
||||||
|
<Chip
|
||||||
|
size="sm"
|
||||||
|
variant="bordered"
|
||||||
|
className={`${match ? 'text-primary-foreground border-primary-foreground' : 'border-primary text-primary'}`}
|
||||||
|
>
|
||||||
|
远程
|
||||||
|
</Chip>
|
||||||
|
<small>{dayjs(info.updated).fromNow()}</small>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
{info.type === 'local' && (
|
{info.type === 'local' && (
|
||||||
<div
|
<div
|
||||||
className={`mt-2 flex justify-between ${match ? 'text-primary-foreground' : 'text-foreground'}`}
|
className={`mt-2 flex justify-between ${match ? 'text-primary-foreground' : 'text-foreground'}`}
|
||||||
@ -143,8 +159,6 @@ const ProfileCard: React.FC = () => {
|
|||||||
</Chip>
|
</Chip>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</CardBody>
|
|
||||||
<CardFooter className="pt-0">
|
|
||||||
{extra && (
|
{extra && (
|
||||||
<Progress
|
<Progress
|
||||||
className="w-full"
|
className="w-full"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user