1
0
mirror of https://github.com/danbee/mpd-client synced 2025-03-04 08:39:09 +00:00

Make scrubber appear only when playing or paused.

This commit is contained in:
Dan Barber 2013-12-09 17:50:52 +00:00
parent 361933e1bb
commit 6f91cd5ad3

View File

@ -1,11 +1,11 @@
<% if (status.attr('time')) { %>
<div class="scrubber">
<% if (status.attr('state') == 'play' || status.attr('state') == 'pause') { %>
<div class="scrubber">
<div class="time elapsed"><%= formatLength(status.attr('time')[0]) %></div>
<div class="time total"><%= formatLength(status.attr('time')[1]) %></div>
<div class="time total">-<%= formatLength(status.attr('time')[1] - status.attr('time')[0]) %></div>
<div class="track">
<div class="marker" style="left: <%= (status.attr('time')[0] / status.attr('time')[1]) * 100 %>%"></div>
</div>
</div>
</div>
<% } %>
<nav class="controls">
<button data-command="previous">previous</button>