Skip to content

Commit

Permalink
Show installation progress in the DownloadMonitor correclty
Browse files Browse the repository at this point in the history
  • Loading branch information
VilppeRiskidev committed Jan 23, 2025
1 parent ce1827d commit 4ef5cbc
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions src/pages/DownloadMonitor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,28 @@
<div class="border-at-bottom pad pad--sides">
<div class="card is-shadowless">
<p><strong>{{ downloadObject.initialMods.join(", ") }}</strong></p>
<p v-if="downloadObject.progress < 100">Downloading: {{ downloadObject.modName }}</p>
<p>{{Math.min(Math.floor(downloadObject.progress), 100)}}% complete</p>
<Progress v-if="!downloadObject.failed"
:max='100'
:value='downloadObject.progress'
:className="['is-info']"
/>
<Progress v-else-if="downloadObject.failed"

<div v-if="downloadObject.downloadProgress < 100">
<p>Downloading: {{ downloadObject.modName }}</p>
<p>{{(downloadObject.failed ? "Failed at " : "") + Math.min(Math.floor(downloadObject.downloadProgress), 100)}}% complete</p>
<Progress v-if="!downloadObject.failed"
:max='100'
:value='downloadObject.downloadProgress'
:className="['is-info']"
/>
</div>

<div v-else>
<p v-if="downloadObject.installationProgress < 100">Installing: {{ downloadObject.modName }}</p>
<p>{{(downloadObject.failed ? "Failed at " : "") + Math.min(Math.floor(downloadObject.installationProgress), 100)}}% complete</p>
<Progress v-if="!downloadObject.failed"
:max='100'
:value='downloadObject.installationProgress'
:className="['is-info']"
/>
</div>

<Progress v-if="downloadObject.failed"
:max='100'
:value='100'
:className="['is-danger']"
Expand Down

0 comments on commit 4ef5cbc

Please sign in to comment.