1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #52 from Bond-009/progress

Fix progress color
This commit is contained in:
Joshua M. Boniface 2019-01-21 13:23:44 -05:00 committed by GitHub
commit e2fbc429e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 4 deletions

View file

@ -391,7 +391,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
html += '<progress max="100" value="' + progress + '" title="' + progress + '%">';
html += progress + "%";
html += "</progress>";
html += "<span style='color:#009F00;margin-left:5px;margin-right:5px;'>" + progress + "%</span>";
html += "<span style='color:#00a4dc;margin-left:5px;margin-right:5px;'>" + progress + "%</span>";
html += '<button type="button" is="paper-icon-button-light" title="' + globalize.translate("ButtonStop") + '" onclick="DashboardPage.stopTask(this, \'' + task.Id + '\');" class="autoSize"><i class="md-icon">cancel</i></button>';
} else if (task.State === "Cancelling") {
html += '<span style="color:#cc0000;">' + globalize.translate("LabelStopping") + "</span>";

View file

@ -37,8 +37,16 @@ define(["jQuery", "loading", "events", "globalize", "serverNotifications", "huma
if ("Idle" == task.State) task.LastExecutionResult && (html += globalize.translate("LabelScheduledTaskLastRan").replace("{0}", humane_date(task.LastExecutionResult.EndTimeUtc)).replace("{1}", humane_elapsed(task.LastExecutionResult.StartTimeUtc, task.LastExecutionResult.EndTimeUtc)), "Failed" == task.LastExecutionResult.Status ? html += " <span style='color:#FF0000;'>(" + globalize.translate("LabelFailed") + ")</span>" : "Cancelled" == task.LastExecutionResult.Status ? html += " <span style='color:#0026FF;'>(" + globalize.translate("LabelCancelled") + ")</span>" : "Aborted" == task.LastExecutionResult.Status && (html += " <span style='color:#FF0000;'>" + globalize.translate("LabelAbortedByServerShutdown") + "</span>"));
else if ("Running" == task.State) {
var progress = (task.CurrentProgressPercentage || 0).toFixed(1);
html += '<div style="display:flex;align-items:center;">', html += '<div class="taskProgressOuter" title="' + progress + '%" style="flex-grow:1;">', html += '<div class="taskProgressInner" style="width:' + progress + '%;">', html += "</div>", html += "</div>", html += "<span style='color:#009F00;margin-left:5px;'>" + progress + "%</span>", html += "</div>"
} else html += "<span style='color:#FF0000;'>" + globalize.translate("LabelStopping") + "</span>";
html += '<div style="display:flex;align-items:center;">';
html += '<div class="taskProgressOuter" title="' + progress + '%" style="flex-grow:1;">';
html += '<div class="taskProgressInner" style="width:' + progress + '%;">';
html += "</div>";
html += "</div>";
html += "<span style='color:#00a4dc;margin-left:5px;'>" + progress + "%</span>";
html += "</div>";
} else {
html += "<span style='color:#FF0000;'>" + globalize.translate("LabelStopping") + "</span>";
}
return html
}
@ -88,4 +96,4 @@ define(["jQuery", "loading", "events", "globalize", "serverNotifications", "huma
loading.show(), startInterval(), reloadList(view), events.on(serverNotifications, "ScheduledTasksInfo", onScheduledTasksUpdate)
})
}
});
});