mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 04:33:45 +08:00
fix: sub usage percent fails to display when number is too small #1290
This commit is contained in:
parent
ad94f0a292
commit
24f4ab7597
@ -71,7 +71,7 @@ export const ProfileItem = (props: Props) => {
|
|||||||
const from = parseUrl(itemData.url);
|
const from = parseUrl(itemData.url);
|
||||||
const description = itemData.desc;
|
const description = itemData.desc;
|
||||||
const expire = parseExpire(extra?.expire);
|
const expire = parseExpire(extra?.expire);
|
||||||
const progress = Math.round(((download + upload) * 100) / (total + 0.1));
|
const progress = Math.round(((download + upload) * 100) / (total + 0.01) + 1);
|
||||||
|
|
||||||
const loading = loadingCache[itemData.uid] ?? false;
|
const loading = loadingCache[itemData.uid] ?? false;
|
||||||
|
|
||||||
@ -429,7 +429,7 @@ export const ProfileItem = (props: Props) => {
|
|||||||
<LinearProgress
|
<LinearProgress
|
||||||
variant="determinate"
|
variant="determinate"
|
||||||
value={progress}
|
value={progress}
|
||||||
style={{ opacity: progress > 0 ? 1 : 0 }}
|
style={{ opacity: total > 0 ? 1 : 0 }}
|
||||||
/>
|
/>
|
||||||
</ProfileBox>
|
</ProfileBox>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user