Skip to content

Commit 4ef5cbc

Browse files
Show installation progress in the DownloadMonitor correclty
1 parent ce1827d commit 4ef5cbc

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

Diff for: src/pages/DownloadMonitor.vue

+22-8
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,28 @@
1919
<div class="border-at-bottom pad pad--sides">
2020
<div class="card is-shadowless">
2121
<p><strong>{{ downloadObject.initialMods.join(", ") }}</strong></p>
22-
<p v-if="downloadObject.progress < 100">Downloading: {{ downloadObject.modName }}</p>
23-
<p>{{Math.min(Math.floor(downloadObject.progress), 100)}}% complete</p>
24-
<Progress v-if="!downloadObject.failed"
25-
:max='100'
26-
:value='downloadObject.progress'
27-
:className="['is-info']"
28-
/>
29-
<Progress v-else-if="downloadObject.failed"
22+
23+
<div v-if="downloadObject.downloadProgress < 100">
24+
<p>Downloading: {{ downloadObject.modName }}</p>
25+
<p>{{(downloadObject.failed ? "Failed at " : "") + Math.min(Math.floor(downloadObject.downloadProgress), 100)}}% complete</p>
26+
<Progress v-if="!downloadObject.failed"
27+
:max='100'
28+
:value='downloadObject.downloadProgress'
29+
:className="['is-info']"
30+
/>
31+
</div>
32+
33+
<div v-else>
34+
<p v-if="downloadObject.installationProgress < 100">Installing: {{ downloadObject.modName }}</p>
35+
<p>{{(downloadObject.failed ? "Failed at " : "") + Math.min(Math.floor(downloadObject.installationProgress), 100)}}% complete</p>
36+
<Progress v-if="!downloadObject.failed"
37+
:max='100'
38+
:value='downloadObject.installationProgress'
39+
:className="['is-info']"
40+
/>
41+
</div>
42+
43+
<Progress v-if="downloadObject.failed"
3044
:max='100'
3145
:value='100'
3246
:className="['is-danger']"

0 commit comments

Comments
 (0)