mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-12-08 20:48:48 +00:00
Added function for disabling remote
This commit is contained in:
@@ -109,12 +109,22 @@
|
|||||||
<div class="collapsible-body">
|
<div class="collapsible-body">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
|
<span class="switch-text">
|
||||||
|
Enable Remote
|
||||||
|
</span>
|
||||||
|
<div class="switch"><label>
|
||||||
|
Disabled
|
||||||
|
<input name="remote_switch" type="checkbox" class="remote_switch_class" checked /><span class="lever"></span>
|
||||||
|
Enabled
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
<a id="code-link" target="_blank">
|
<a id="code-link" target="_blank">
|
||||||
<img id="code-qr" alt="QR code for control" title="Link to control this Zöff player" src="https://chart.googleapis.com/chart?chs=221x221&cht=qr&choe=UTF-8&chld=L%7C1&chl=http://zoff.no" />
|
<img id="code-qr" alt="QR code for control" title="Link to control this Zöff player" src="https://chart.googleapis.com/chart?chs=221x221&cht=qr&choe=UTF-8&chld=L%7C1&chl=http://zoff.no" />
|
||||||
<h4 id="code-text">ABBADUR</h4>
|
<h4 id="code-text">ABBADUR</h4>
|
||||||
</a>
|
</a>
|
||||||
<a>
|
<a>
|
||||||
You can control this Zöff instance from another device by going to <b>http://zoff.no/remote</b>
|
You can control this Zöff instance from another device by going to <b>http://zoff.no/remote</b>
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -126,7 +136,7 @@
|
|||||||
<li class="no-padding remote-panel">
|
<li class="no-padding remote-panel">
|
||||||
<ul class="collapsible collapsible-accordion">
|
<ul class="collapsible collapsible-accordion">
|
||||||
<li>
|
<li>
|
||||||
<a class="collapsible-header bold waves-effect">Import Playlist
|
<a class="collapsible-header bold waves-effect import-a">Import Playlist
|
||||||
<i class="mdi-communication-import-export"></i>
|
<i class="mdi-communication-import-export"></i>
|
||||||
</a>
|
</a>
|
||||||
<div class="collapsible-body">
|
<div class="collapsible-body">
|
||||||
|
|||||||
@@ -129,6 +129,10 @@ nav .brand-logo{
|
|||||||
background-color:rgba(45,45,45,1);
|
background-color:rgba(45,45,45,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.import-a{
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
|
|
||||||
#nav-mobile .green:hover{
|
#nav-mobile .green:hover{
|
||||||
background-color: #38803C !important;
|
background-color: #38803C !important;
|
||||||
}
|
}
|
||||||
|
|||||||
2
static/dist/main.min.js
vendored
2
static/dist/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,8 +1,10 @@
|
|||||||
var Hostcontroller = {
|
var Hostcontroller = {
|
||||||
|
|
||||||
|
|
||||||
host_listener: function() {
|
host_listener: function() {
|
||||||
|
|
||||||
var old_id;
|
var old_id;
|
||||||
|
var enabled = true;
|
||||||
|
|
||||||
socket.on("id", function(id)
|
socket.on("id", function(id)
|
||||||
{
|
{
|
||||||
@@ -22,14 +24,13 @@ var Hostcontroller = {
|
|||||||
began = true;
|
began = true;
|
||||||
socket.on(id, function(arr)
|
socket.on(id, function(arr)
|
||||||
{
|
{
|
||||||
if(arr[0] == "volume")
|
if(enabled){
|
||||||
{
|
if(arr[0] == "volume"){
|
||||||
$("#volume").slider("value", arr[1]);
|
$("#volume").slider("value", arr[1]);
|
||||||
ytplayer.setVolume(arr[1]);
|
ytplayer.setVolume(arr[1]);
|
||||||
localStorage.setItem("volume", arr[1]);
|
localStorage.setItem("volume", arr[1]);
|
||||||
Playercontrols.choose_button(arr[1], false);
|
Playercontrols.choose_button(arr[1], false);
|
||||||
}else if(arr[0] == "channel")
|
}else if(arr[0] == "channel"){
|
||||||
{
|
|
||||||
socket.emit("change_channel");
|
socket.emit("change_channel");
|
||||||
|
|
||||||
chan = arr[1].toLowerCase();
|
chan = arr[1].toLowerCase();
|
||||||
@@ -38,8 +39,7 @@ var Hostcontroller = {
|
|||||||
w_p = true;
|
w_p = true;
|
||||||
socket.emit("list", chan.toLowerCase());
|
socket.emit("list", chan.toLowerCase());
|
||||||
|
|
||||||
if(localStorage[chan.toLowerCase()])
|
if(localStorage[chan.toLowerCase()]){
|
||||||
{
|
|
||||||
//localStorage.removeItem(chan.toLowerCase());
|
//localStorage.removeItem(chan.toLowerCase());
|
||||||
if(localStorage[chan.toLowerCase()].length != 64)
|
if(localStorage[chan.toLowerCase()].length != 64)
|
||||||
localStorage.removeItem(chan.toLowerCase());
|
localStorage.removeItem(chan.toLowerCase());
|
||||||
@@ -54,8 +54,15 @@ var Hostcontroller = {
|
|||||||
ytplayer.playVideo();
|
ytplayer.playVideo();
|
||||||
else if(arr[0] == "skip")
|
else if(arr[0] == "skip")
|
||||||
List.skip();
|
List.skip();
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$('input[class=remote_switch_class]').change(function()
|
||||||
|
{
|
||||||
|
enabled = document.getElementsByName("remote_switch")[0].checked;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user