mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 03:53:43 +08:00
chore: Adjust Profile Style
This commit is contained in:
parent
8ec19e058f
commit
20a9775dc6
@ -57,6 +57,7 @@ export const ProfileItem = (props: Props) => {
|
||||
|
||||
const { upload = 0, download = 0, total = 0 } = extra ?? {};
|
||||
const from = parseUrl(itemData.url);
|
||||
const description = itemData.desc;
|
||||
const expire = parseExpire(extra?.expire);
|
||||
const progress = Math.round(((download + upload) * 100) / (total + 0.1));
|
||||
|
||||
@ -275,27 +276,32 @@ export const ProfileItem = (props: Props) => {
|
||||
</Box>
|
||||
{/* the second line show url's info or description */}
|
||||
<Box sx={boxStyle}>
|
||||
{hasUrl ? (
|
||||
{
|
||||
<>
|
||||
<Typography noWrap title={`From: ${from}`}>
|
||||
{from}
|
||||
</Typography>
|
||||
|
||||
<Typography
|
||||
noWrap
|
||||
flex="1 0 auto"
|
||||
fontSize={14}
|
||||
textAlign="right"
|
||||
title={`Updated Time: ${parseExpire(updated)}`}
|
||||
>
|
||||
{updated > 0 ? dayjs(updated * 1000).fromNow() : ""}
|
||||
</Typography>
|
||||
{description ? (
|
||||
<Typography noWrap title={description}>
|
||||
{description}
|
||||
</Typography>
|
||||
) : (
|
||||
hasUrl && (
|
||||
<Typography noWrap title={`From ${from}`}>
|
||||
{from}
|
||||
</Typography>
|
||||
)
|
||||
)}
|
||||
{hasUrl && (
|
||||
<Typography
|
||||
noWrap
|
||||
flex="1 0 auto"
|
||||
fontSize={14}
|
||||
textAlign="right"
|
||||
title={`Updated Time: ${parseExpire(updated)}`}
|
||||
>
|
||||
{updated > 0 ? dayjs(updated * 1000).fromNow() : ""}
|
||||
</Typography>
|
||||
)}
|
||||
</>
|
||||
) : (
|
||||
<Typography noWrap title={itemData.desc}>
|
||||
{itemData.desc}
|
||||
</Typography>
|
||||
)}
|
||||
}
|
||||
</Box>
|
||||
{/* the third line show extra info or last updated time */}
|
||||
{hasExtra ? (
|
||||
|
@ -178,17 +178,6 @@ export const ProfileMore = (props: Props) => {
|
||||
{itemData.desc}
|
||||
</Typography>
|
||||
)}
|
||||
|
||||
<Typography
|
||||
noWrap
|
||||
component="span"
|
||||
title={`Updated Time: ${parseExpire(itemData.updated)}`}
|
||||
style={{ fontSize: 14 }}
|
||||
>
|
||||
{!!itemData.updated
|
||||
? dayjs(itemData.updated! * 1000).fromNow()
|
||||
: ""}
|
||||
</Typography>
|
||||
</Box>
|
||||
</ProfileBox>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user