mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #312 from dkanada/task
Always show the start task button except on errors
This commit is contained in:
commit
79e5fde63b
1 changed files with 3 additions and 5 deletions
|
@ -50,8 +50,8 @@ define(["jQuery", "loading", "events", "globalize", "serverNotifications", "huma
|
|||
html += "</div>";
|
||||
if (task.State === "Running") {
|
||||
html += '<button type="button" is="paper-icon-button-light" id="btnTask' + task.Id + '" class="btnStopTask" data-taskid="' + task.Id + '" title="' + globalize.translate("ButtonStop") + '"><i class="md-icon">stop</i></button>';
|
||||
} else {
|
||||
html += '<button type="button" is="paper-icon-button-light" id="btnTask' + task.Id + '" class="btnStartTask hide" data-taskid="' + task.Id + '" title="' + globalize.translate("ButtonStart") + '"><i class="md-icon">play_arrow</i></button>';
|
||||
} else if (task.State === "Idle") {
|
||||
html += '<button type="button" is="paper-icon-button-light" id="btnTask' + task.Id + '" class="btnStartTask" data-taskid="' + task.Id + '" title="' + globalize.translate("ButtonStart") + '"><i class="md-icon">play_arrow</i></button>';
|
||||
}
|
||||
html += "</div>";
|
||||
}
|
||||
|
@ -106,13 +106,11 @@ define(["jQuery", "loading", "events", "globalize", "serverNotifications", "huma
|
|||
if (state === "Running") {
|
||||
elem.classList.remove("btnStartTask");
|
||||
elem.classList.add("btnStopTask");
|
||||
elem.classList.remove("hide");
|
||||
elem.querySelector("i").innerHTML = "stop";
|
||||
elem.title = globalize.translate("ButtonStop");
|
||||
} else {
|
||||
} else if (state === "Idle") {
|
||||
elem.classList.add("btnStartTask");
|
||||
elem.classList.remove("btnStopTask");
|
||||
elem.classList.add("hide");
|
||||
elem.querySelector("i").innerHTML = "play_arrow";
|
||||
elem.title = globalize.translate("ButtonStart");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue