|
@@ -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 ? (
|