Toggle play queue with a button (#1539)

This commit is contained in:
François-Xavier Thomas
2020-03-16 11:26:49 +00:00
committed by GitHub
parent e635055bf6
commit 3f38c52754
7 changed files with 21 additions and 0 deletions
@@ -64,3 +64,5 @@ viewAsListImage = icons/default_dark/view_as_list.png
volumeImage = icons/default_dark/volume.png
alertImage = icons/default_dark/alert.svg
checkImage = icons/default_dark/check.svg
playQueueShow = icons/default_dark/chevrons-up.svg
playQueueHide = icons/default_dark/chevrons-down.svg
@@ -64,3 +64,5 @@ viewAsListImage = icons/default_light/view_as_list.svg
volumeImage = icons/default_light/volume.svg
alertImage = icons/default_light/alert.svg
checkImage = icons/default_light/check.svg
playQueueShow = icons/default_light/chevrons-up.svg
playQueueHide = icons/default_light/chevrons-down.svg
@@ -139,6 +139,8 @@
function onHidePlayQueue() {
setFrameHeight(50);
isVisible = false;
$(".playqueue-shown").hide();
$(".playqueue-hidden").show();
}
function onShowPlayQueue() {
@@ -146,6 +148,8 @@
height = Math.min(height, window.top.innerHeight * 0.8);
setFrameHeight(height);
isVisible = true;
$(".playqueue-shown").show();
$(".playqueue-hidden").hide();
}
function onTogglePlayQueue() {
@@ -959,6 +963,15 @@
</select>
</td>
<c:if test="${not model.autoHide}">
<td style="white-space:nowrap; text-align:right; width:100%; padding-right:1.5em">
<a href="javascript:onTogglePlayQueue()">
<img class="playqueue-shown" src="<spring:theme code='playQueueHide'/>" alt="Hide play queue" title="Hide play queue" style="cursor:pointer; height:18px;"/>
<img class="playqueue-hidden" src="<spring:theme code='playQueueShow'/>" alt="Show play queue" title="Show play queue" style="cursor:pointer; height:18px; display: none;"/>
</a>
</td>
</c:if>
</tr></table>
</div>
</c:otherwise>
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#cdcdcd" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevrons-down"><polyline points="7 13 12 18 17 13"></polyline><polyline points="7 6 12 11 17 6"></polyline></svg>

After

Width:  |  Height:  |  Size: 312 B

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#cdcdcd" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevrons-up"><polyline points="17 11 12 6 7 11"></polyline><polyline points="17 18 12 13 7 18"></polyline></svg>

After

Width:  |  Height:  |  Size: 311 B

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#696969" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevrons-down"><polyline points="7 13 12 18 17 13"></polyline><polyline points="7 6 12 11 17 6"></polyline></svg>

After

Width:  |  Height:  |  Size: 312 B

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#696969" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevrons-up"><polyline points="17 11 12 6 7 11"></polyline><polyline points="17 18 12 13 7 18"></polyline></svg>

After

Width:  |  Height:  |  Size: 311 B