1
0
mirror of https://github.com/SuperBFG7/ympd synced 2024-11-24 22:07:18 +00:00

Enable volume slider again

Add volume number
Move love button to song info box
This commit is contained in:
SuperBFG7 2021-06-17 09:55:45 +02:00
parent 86586fbcee
commit 28844275e6
3 changed files with 36 additions and 18 deletions

View File

@ -9,6 +9,7 @@ body {
#volumeslider {
width: 150px;
float: left;
}
#volumeslider .progress {
@ -25,6 +26,20 @@ button {
margin-top: 2px;
}
#volume-number {
float: right;
margin-top: 2px;
margin-left: 10px;
}
#love {
float: right;
}
#love > button > span {
color: red;
}
#breadcrump {
display: block;
overflow: auto;
@ -169,5 +184,6 @@ button {
.sticky {
position: sticky;
top: 55px;
z-index: 99;
}
}

View File

@ -94,24 +94,6 @@
<span class="glyphicon glyphicon-forward"></span>
</button>
</div>
<div class="btn-group">
<button
id="btnlove"
type="button"
class="btn btn-default"
onclick="clickLove();"
>
<span class="glyphicon glyphicon-heart"></span>
</button>
</div>
<!--
<div class="btn-group">
<div class="btn btn-toolbar btn-default">
<span id="volume-icon" class="glyphicon glyphicon-volume-up"></span>
<div id="volumeslider"></div>
</div>
</div>
-->
<div class="btn-group" role="group">
<button
type="button"
@ -125,6 +107,16 @@
></span>
</button>
</div>
<div class="btn-group" role="group">
<div class="btn btn-toolbar btn-default">
<span
id="volume-icon"
class="glyphicon glyphicon-volume-up"
></span>
<div id="volumeslider"></div>
<span id="volume-number"></span>
</div>
</div>
</div>
<form id="search" class="navbar-form navbar-right" role="search">
@ -156,6 +148,15 @@
class="glyphicon glyphicon-play"
></span>
<span id="currenttrack"></span>
<span id="love">
<button
id="btnlove"
type="button"
class="btn btn-default"
onclick="clickLove();"
>
<span class="glyphicon glyphicon-heart"></span></button
></span>
</h1>
<h4>
<span id="artist" class="text"></span>

View File

@ -736,6 +736,7 @@ function webSocketConnect() {
obj.data.elapsedTime - elapsed_minutes * 60;
$('#volumeslider').slider(obj.data.volume);
$('#volume-number').text(obj.data.volume + '%');
var progress = Math.floor(
(100 * obj.data.elapsedTime) / obj.data.totalTime
);