mirror of
https://github.com/Dahlgren/arma-server-web-admin.git
synced 2024-08-30 17:22:10 +00:00
Fixed inconsistent progress state
This commit is contained in:
@ -32,7 +32,8 @@ Mods.prototype.download = function (mod, cb) {
|
||||
|
||||
playwithsix.downloadMod(this.config.path, mod, {lite: this.liteMods}, function(err, mods) {
|
||||
if (currentDownloadMod) {
|
||||
delete currentDownloadMod.progress;
|
||||
currentDownloadMod.progress = null;
|
||||
self.emit('mods', self.mods);
|
||||
}
|
||||
self.updateMods();
|
||||
cb(err, mods);
|
||||
@ -54,7 +55,7 @@ Mods.prototype.download = function (mod, cb) {
|
||||
outdated: false,
|
||||
playWithSix: true,
|
||||
};
|
||||
self.mods = self.mods.push(currentDownloadMod);
|
||||
self.mods.push(currentDownloadMod);
|
||||
}
|
||||
}
|
||||
|
||||
@ -85,6 +86,7 @@ Mods.prototype.updateMods = function () {
|
||||
cb(null, {
|
||||
name: mod,
|
||||
outdated: outdatedMods && outdatedMods.indexOf(mod) >= 0,
|
||||
progress: null,
|
||||
playWithSix: isPlayWithSixMod,
|
||||
});
|
||||
});
|
||||
|
@ -6,7 +6,7 @@
|
||||
<% } %>
|
||||
</td>
|
||||
<td>
|
||||
<% if (typeof progress !== 'undefined') { %>
|
||||
<% if (progress) { %>
|
||||
<div class="progress" style="margin-bottom: 0;">
|
||||
<div class="progress-bar" role="progressbar" aria-valuenow="<%-progress%>" aria-valuemin="0" aria-valuemax="100" style="width: <%-progress%>%; min-width: 2em;">
|
||||
<%-progress%>%
|
||||
|
Reference in New Issue
Block a user