majestrate / XD

meme bittorrent client
https://xd-torrent.github.io/
MIT License
233 stars 25 forks source link

Progress bar in webui is blue instead of white when torrent at 0% #115

Open Elcoid opened 2 months ago

Elcoid commented 2 months ago

info

git revision / version: v0.4.6, commit 7775d97157835c67b00974a39c89dce71f05c9bb OS: OpenBSD 7.4 Architecture: amd64

problem

Expected behaviour: When a torrent is being downloaded, the associated progress bar in the webui starts white and fills with blue, until it is completely filled, indicating that the torrent is downloaded.

Observations: This is not true when the progress is exactly 0%. In this case, the bar starts completely blue. Only when the progress increases above 0% does the expected behaviour occur.

further observations

What I found so far is that the bars behaving correctly have a value attribute in their progress tag. For example:

<progress data-bind="value: $data.Progress" max="100" value="100"></progress>

Those with a progress of 0% have no value, which seems to render the bar filled by default. For example:

<progress data-bind="value: $data.Progress" max="100"></progress>

I didn't find why this is happening.