Fix download progress display
This commit is contained in:
parent
50f62fd8b3
commit
117fe87282
|
@ -842,7 +842,7 @@ main form select {
|
||||||
height: 4px;
|
height: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.file-card .progress-bar {
|
.progress-bar {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: var(--progress-fg-color);
|
background-color: var(--progress-fg-color);
|
||||||
transition: width 0.5s linear;
|
transition: width 0.5s linear;
|
||||||
|
@ -1056,6 +1056,14 @@ dialog .actions {
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.download-card .progress-container {
|
||||||
|
width: 100%;
|
||||||
|
margin: 0 4px;
|
||||||
|
background-color: var(--progress-bg-color);
|
||||||
|
border-radius: 4px;
|
||||||
|
height: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
/** Download Card --- End */
|
/** Download Card --- End */
|
||||||
/** Download --- End */
|
/** Download --- End */
|
||||||
|
|
||||||
|
|
|
@ -102,11 +102,14 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||||
|
|
||||||
warnOnReload();
|
warnOnReload();
|
||||||
job.onProgress(() => {
|
job.onProgress(() => {
|
||||||
const percent = Math.round(
|
const percent =
|
||||||
(job.lufiFile.chunksReady * 100) / job.lufiFile.totalChunks
|
Math.round(
|
||||||
);
|
(job.lufiFile.chunksReady * 100) / job.lufiFile.totalChunks
|
||||||
|
) + "%";
|
||||||
|
|
||||||
cardDOM.querySelector(".progress-bar").style.width = `${percent}%`;
|
cardDOM.querySelector(".progress-bar").style.width = percent;
|
||||||
|
cardDOM.querySelector(".loading-message").innerText =
|
||||||
|
i18n.loading.replace("XX1", job.lufiFile.chunksReady);
|
||||||
});
|
});
|
||||||
|
|
||||||
document.querySelector(".action-abort").onclick = () => {
|
document.querySelector(".action-abort").onclick = () => {
|
||||||
|
|
Loading…
Reference in New Issue