mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-12-08 20:48:48 +00:00
Moved chat window and made improvements for iphone
This commit is contained in:
@@ -647,7 +647,7 @@ hide mdi-action-visibility mdi-action-visibility-off
|
||||
line-height:24px;
|
||||
}
|
||||
|
||||
.playlist-tabs .indicator{
|
||||
.playlist-tabs .indicator, .playlist-tabs-loggedIn .indicator{
|
||||
background-color:white !important;
|
||||
}
|
||||
|
||||
@@ -655,11 +655,15 @@ hide mdi-action-visibility mdi-action-visibility-off
|
||||
width:50%;
|
||||
}
|
||||
|
||||
.playlist-tabs-loggedIn .indicator{
|
||||
width:33.333%;
|
||||
}
|
||||
|
||||
.playlist-tab-links{
|
||||
color:white !important;
|
||||
}
|
||||
|
||||
.playlist-tabs{
|
||||
.playlist-tabs, .playlist-tabs-loggedIn{
|
||||
background-color:rgba(0,0,0,0) !important;
|
||||
}
|
||||
|
||||
@@ -724,12 +728,16 @@ hide mdi-action-visibility mdi-action-visibility-off
|
||||
margin:0 !important;
|
||||
}
|
||||
|
||||
#text-chat-input{
|
||||
width:95%;
|
||||
}
|
||||
|
||||
.indicator {
|
||||
background-color:black !important;
|
||||
}
|
||||
|
||||
#channelchat, #all_chat{
|
||||
height: calc(100vh - 193px);
|
||||
height: calc(100vh - 241px);
|
||||
margin: 0px 5px;
|
||||
}
|
||||
|
||||
@@ -747,12 +755,10 @@ hide mdi-action-visibility mdi-action-visibility-off
|
||||
}
|
||||
|
||||
#chat-bar{
|
||||
position: absolute;
|
||||
display: inline;
|
||||
will-change: left;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
float: left;
|
||||
background: white;
|
||||
background: white;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
#chat-btn i {
|
||||
@@ -761,7 +767,7 @@ hide mdi-action-visibility mdi-action-visibility-off
|
||||
}
|
||||
|
||||
ul #chat-log{
|
||||
padding: 0px 0px 0px 11px !important;
|
||||
/*padding: 0px 0px 0px 11px !important;*/
|
||||
}
|
||||
|
||||
#chat li{
|
||||
@@ -1292,6 +1298,10 @@ nav ul li:hover, nav ul li.active {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#all_chat, #channelchat{
|
||||
height: calc(100vh - 352px);
|
||||
}
|
||||
|
||||
#fp-nav{
|
||||
position:initial;
|
||||
width:initial;
|
||||
@@ -1386,6 +1396,11 @@ nav ul li:hover, nav ul li.active {
|
||||
.main, #main-row, .video-container, #playlist{
|
||||
height:auto !important;
|
||||
margin-bottom: -5px;
|
||||
margin-top:-6px;
|
||||
}
|
||||
|
||||
.click-through{
|
||||
pointer-events:none;
|
||||
}
|
||||
|
||||
.video-container{
|
||||
@@ -1394,7 +1409,7 @@ nav ul li:hover, nav ul li.active {
|
||||
width: 106vw !important;
|
||||
height: 200px !important;
|
||||
z-index: 2;
|
||||
bottom: 4px;
|
||||
bottom: 22px;
|
||||
}
|
||||
|
||||
.chan {
|
||||
|
||||
2
static/dist/embed.min.js
vendored
2
static/dist/embed.min.js
vendored
File diff suppressed because one or more lines are too long
106
static/dist/main.min.js
vendored
106
static/dist/main.min.js
vendored
@@ -82,11 +82,12 @@ var Admin = {
|
||||
$("#admin-lock").removeClass("mdi-action-lock");
|
||||
$("#password").val("");
|
||||
$("#password").attr("placeholder", "Change channel password")
|
||||
if(!window.mobilecheck()){
|
||||
$(".playlist-tabs").removeClass("hide");
|
||||
$("#top-button").toggleClass("top-button-with-tabs");
|
||||
$("#wrapper").toggleClass("tabs_height");
|
||||
}
|
||||
//if(!window.mobilecheck()){
|
||||
$(".playlist-tabs-loggedIn").removeClass("hide");
|
||||
$(".playlist-tabs").addClass("hide");
|
||||
//$("#top-button").toggleClass("top-button-with-tabs");
|
||||
//$("#wrapper").toggleClass("tabs_height");
|
||||
//}
|
||||
|
||||
if(!Helper.contains($("#admin-lock").attr("class").split(" "), "mdi-action-lock-open"))
|
||||
$("#admin-lock").addClass("mdi-action-lock-open clickable");
|
||||
@@ -142,8 +143,9 @@ var Admin = {
|
||||
$("#admin-lock").addClass("mdi-action-lock");
|
||||
}
|
||||
|
||||
if(!Helper.contains($(".playlist-tabs").attr("class").split(" "), "hide")){
|
||||
$(".playlist-tabs").addClass("hide");
|
||||
if(!Helper.contains($(".playlist-tabs-loggedIn").attr("class").split(" "), "hide")){
|
||||
$(".playlist-tabs-loggedIn").addClass("hide");
|
||||
$(".playlist-tabs").removeClass("hide");
|
||||
}
|
||||
|
||||
if($(".card-action").length != 0 &&
|
||||
@@ -152,10 +154,10 @@ var Admin = {
|
||||
}
|
||||
|
||||
$('ul.tabs').tabs('select_tab', 'wrapper');
|
||||
$("#wrapper").removeClass("tabs_height");
|
||||
//$("#wrapper").removeClass("tabs_height");
|
||||
$("#admin-lock").removeClass("mdi-action-lock-open clickable");
|
||||
$("#password").attr("placeholder", "Enter channel password");
|
||||
$("#top-button").removeClass("top-button-with-tabs");
|
||||
//$("#top-button").removeClass("top-button-with-tabs");
|
||||
},
|
||||
|
||||
//function used in html onlick
|
||||
@@ -174,8 +176,8 @@ var Admin = {
|
||||
if(conf_array['adminpass'] == "" || !w_p){
|
||||
hasadmin = false;
|
||||
if(!window.mobilecheck()){
|
||||
$(".playlist-tabs").removeClass("hide");
|
||||
$("#wrapper").toggleClass("tabs_height");
|
||||
//$(".playlist-tabs").removeClass("hide");
|
||||
//$("#wrapper").toggleClass("tabs_height");
|
||||
}
|
||||
}
|
||||
else hasadmin = true;
|
||||
@@ -252,7 +254,7 @@ var Chat = {
|
||||
}else if(data.value.startsWith("/removename")){
|
||||
Chat.removename();
|
||||
}
|
||||
else if($(".tab a.active").attr("href") == "#all_chat")
|
||||
else if($(".chat-tab-li a.active").attr("href") == "#all_chat")
|
||||
socket.emit("all,chat", data.value);
|
||||
else
|
||||
socket.emit("chat", data.value);
|
||||
@@ -1192,7 +1194,8 @@ function init(){
|
||||
window.location.reload(true);
|
||||
}
|
||||
|
||||
$('ul.tabs').tabs();
|
||||
$('ul.playlist-tabs').tabs();
|
||||
$('.chatTabs').tabs();
|
||||
$("#settings").sideNav({
|
||||
menuWidth: 300, // Default is 240
|
||||
edge: 'right', // Choose the horizontal origin
|
||||
@@ -1255,41 +1258,28 @@ function init(){
|
||||
Player.getTitle(song_title, viewers);
|
||||
});
|
||||
|
||||
if(/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream){
|
||||
document.getElementById("search").blur();
|
||||
Player.readyLooks();
|
||||
}else{
|
||||
Chat.setup_chat_listener(chan);
|
||||
Chat.allchat_listener();
|
||||
if(!window.mobilecheck()) Hostcontroller.host_listener();
|
||||
window.onYouTubeIframeAPIReady = Player.onYouTubeIframeAPIReady;
|
||||
Player.loadPlayer();
|
||||
Chat.setup_chat_listener(chan);
|
||||
Chat.allchat_listener();
|
||||
if(!window.mobilecheck()) Hostcontroller.host_listener();
|
||||
window.onYouTubeIframeAPIReady = Player.onYouTubeIframeAPIReady;
|
||||
Player.loadPlayer();
|
||||
|
||||
$("#chat-btn").sideNav({
|
||||
menuWidth: 272, // Default is 240
|
||||
edge: 'left', // Choose the horizontal origin
|
||||
closeOnClick: false // Closes side-nav on <a> clicks, useful for Angular/Meteor
|
||||
});
|
||||
if(!Helper.msieversion()) Notification.requestPermission();
|
||||
|
||||
git_info = $.ajax({ type: "GET",
|
||||
url: "https://api.github.com/repos/zoff-music/zoff/commits",
|
||||
async: false
|
||||
}).responseText;
|
||||
|
||||
if($(".drag-target").length > 0) $(".drag-target")[1].remove();
|
||||
git_info = $.parseJSON(git_info);
|
||||
$("#latest-commit").html("Latest Commit: <br>"
|
||||
+ git_info[0].commit.author.date.substring(0,10)
|
||||
+ ": " + git_info[0].committer.login
|
||||
+ "<br><a href='"+git_info[0].html_url+"'>"
|
||||
+ git_info[0].sha.substring(0,10) + "</a>: "
|
||||
+ git_info[0].commit.message+"<br");
|
||||
|
||||
if(!Helper.msieversion()) Notification.requestPermission();
|
||||
|
||||
git_info = $.ajax({ type: "GET",
|
||||
url: "https://api.github.com/repos/zoff-music/zoff/commits",
|
||||
async: false
|
||||
}).responseText;
|
||||
|
||||
git_info = $.parseJSON(git_info);
|
||||
$("#latest-commit").html("Latest Commit: <br>"
|
||||
+ git_info[0].commit.author.date.substring(0,10)
|
||||
+ ": " + git_info[0].committer.login
|
||||
+ "<br><a href='"+git_info[0].html_url+"'>"
|
||||
+ git_info[0].sha.substring(0,10) + "</a>: "
|
||||
+ git_info[0].commit.message+"<br");
|
||||
|
||||
Helper.sample();
|
||||
}
|
||||
Helper.sample();
|
||||
|
||||
$( "#results" ).hover( function() { $("div.result").removeClass("hoverResults"); i = 0; }, function(){ });
|
||||
$("#search").focus();
|
||||
@@ -1441,6 +1431,24 @@ $(document).on("submit", "#adminForm", function(e){
|
||||
Admin.pass_save();
|
||||
});
|
||||
|
||||
$(document).on("click", ".chat-link", function(e){
|
||||
$("#chatPlaylist").css("display", "block");
|
||||
$("#wrapper").css("display", "none");
|
||||
$("#suggestions").css("display", "none");
|
||||
});
|
||||
|
||||
$(document).on("click", ".playlist-link", function(e){
|
||||
$("#chatPlaylist").css("display", "none");
|
||||
$("#wrapper").css("display", "block");
|
||||
$("#suggestions").css("display", "none");
|
||||
});
|
||||
|
||||
$(document).on("click", ".suggested-link", function(e){
|
||||
$("#chatPlaylist").css("display", "none");
|
||||
$("#wrapper").css("display", "none");
|
||||
$("#suggestions").css("display", "block");
|
||||
});
|
||||
|
||||
$(document).on("submit", "#chatForm", function(){
|
||||
Chat.chat(document.getElementById("chatForm").input);
|
||||
});
|
||||
@@ -2401,7 +2409,7 @@ var Playercontrols = {
|
||||
|
||||
initYoutubeControls: function()
|
||||
{
|
||||
if(window.mobilecheck() && !/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream){
|
||||
if(window.mobilecheck() && !window.MSStream){
|
||||
$("#controls").appendTo("#playbar");
|
||||
}
|
||||
Playercontrols.initControls();
|
||||
@@ -2452,15 +2460,17 @@ var Playercontrols = {
|
||||
if(Player.ytplayer.getPlayerState() == 1)
|
||||
{
|
||||
Player.ytplayer.pauseVideo();
|
||||
if(window.mobilecheck() && !/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream){
|
||||
if(window.mobilecheck() && !window.MSStream){
|
||||
document.getElementById("player").style.display = "none";
|
||||
$(".video-container").toggleClass("click-through");
|
||||
$(".page-footer").toggleClass("padding-bottom-extra");
|
||||
}
|
||||
}else if(Player.ytplayer.getPlayerState() == 2 || Player.ytplayer.getPlayerState() == 0)
|
||||
{
|
||||
Player.ytplayer.playVideo();
|
||||
if(window.mobilecheck() && !/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream){
|
||||
if(window.mobilecheck() && !window.MSStream){
|
||||
document.getElementById("player").style.display = "block";
|
||||
$(".video-container").toggleClass("click-through");
|
||||
$(".page-footer").toggleClass("padding-bottom-extra");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,11 +82,12 @@ var Admin = {
|
||||
$("#admin-lock").removeClass("mdi-action-lock");
|
||||
$("#password").val("");
|
||||
$("#password").attr("placeholder", "Change channel password")
|
||||
if(!window.mobilecheck()){
|
||||
$(".playlist-tabs").removeClass("hide");
|
||||
$("#top-button").toggleClass("top-button-with-tabs");
|
||||
$("#wrapper").toggleClass("tabs_height");
|
||||
}
|
||||
//if(!window.mobilecheck()){
|
||||
$(".playlist-tabs-loggedIn").removeClass("hide");
|
||||
$(".playlist-tabs").addClass("hide");
|
||||
//$("#top-button").toggleClass("top-button-with-tabs");
|
||||
//$("#wrapper").toggleClass("tabs_height");
|
||||
//}
|
||||
|
||||
if(!Helper.contains($("#admin-lock").attr("class").split(" "), "mdi-action-lock-open"))
|
||||
$("#admin-lock").addClass("mdi-action-lock-open clickable");
|
||||
@@ -142,8 +143,9 @@ var Admin = {
|
||||
$("#admin-lock").addClass("mdi-action-lock");
|
||||
}
|
||||
|
||||
if(!Helper.contains($(".playlist-tabs").attr("class").split(" "), "hide")){
|
||||
$(".playlist-tabs").addClass("hide");
|
||||
if(!Helper.contains($(".playlist-tabs-loggedIn").attr("class").split(" "), "hide")){
|
||||
$(".playlist-tabs-loggedIn").addClass("hide");
|
||||
$(".playlist-tabs").removeClass("hide");
|
||||
}
|
||||
|
||||
if($(".card-action").length != 0 &&
|
||||
@@ -152,10 +154,10 @@ var Admin = {
|
||||
}
|
||||
|
||||
$('ul.tabs').tabs('select_tab', 'wrapper');
|
||||
$("#wrapper").removeClass("tabs_height");
|
||||
//$("#wrapper").removeClass("tabs_height");
|
||||
$("#admin-lock").removeClass("mdi-action-lock-open clickable");
|
||||
$("#password").attr("placeholder", "Enter channel password");
|
||||
$("#top-button").removeClass("top-button-with-tabs");
|
||||
//$("#top-button").removeClass("top-button-with-tabs");
|
||||
},
|
||||
|
||||
//function used in html onlick
|
||||
@@ -174,8 +176,8 @@ var Admin = {
|
||||
if(conf_array['adminpass'] == "" || !w_p){
|
||||
hasadmin = false;
|
||||
if(!window.mobilecheck()){
|
||||
$(".playlist-tabs").removeClass("hide");
|
||||
$("#wrapper").toggleClass("tabs_height");
|
||||
//$(".playlist-tabs").removeClass("hide");
|
||||
//$("#wrapper").toggleClass("tabs_height");
|
||||
}
|
||||
}
|
||||
else hasadmin = true;
|
||||
|
||||
@@ -21,7 +21,7 @@ var Chat = {
|
||||
}else if(data.value.startsWith("/removename")){
|
||||
Chat.removename();
|
||||
}
|
||||
else if($(".tab a.active").attr("href") == "#all_chat")
|
||||
else if($(".chat-tab-li a.active").attr("href") == "#all_chat")
|
||||
socket.emit("all,chat", data.value);
|
||||
else
|
||||
socket.emit("chat", data.value);
|
||||
|
||||
@@ -83,7 +83,8 @@ function init(){
|
||||
window.location.reload(true);
|
||||
}
|
||||
|
||||
$('ul.tabs').tabs();
|
||||
$('ul.playlist-tabs').tabs();
|
||||
$('.chatTabs').tabs();
|
||||
$("#settings").sideNav({
|
||||
menuWidth: 300, // Default is 240
|
||||
edge: 'right', // Choose the horizontal origin
|
||||
@@ -146,41 +147,28 @@ function init(){
|
||||
Player.getTitle(song_title, viewers);
|
||||
});
|
||||
|
||||
if(/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream){
|
||||
document.getElementById("search").blur();
|
||||
Player.readyLooks();
|
||||
}else{
|
||||
Chat.setup_chat_listener(chan);
|
||||
Chat.allchat_listener();
|
||||
if(!window.mobilecheck()) Hostcontroller.host_listener();
|
||||
window.onYouTubeIframeAPIReady = Player.onYouTubeIframeAPIReady;
|
||||
Player.loadPlayer();
|
||||
Chat.setup_chat_listener(chan);
|
||||
Chat.allchat_listener();
|
||||
if(!window.mobilecheck()) Hostcontroller.host_listener();
|
||||
window.onYouTubeIframeAPIReady = Player.onYouTubeIframeAPIReady;
|
||||
Player.loadPlayer();
|
||||
|
||||
$("#chat-btn").sideNav({
|
||||
menuWidth: 272, // Default is 240
|
||||
edge: 'left', // Choose the horizontal origin
|
||||
closeOnClick: false // Closes side-nav on <a> clicks, useful for Angular/Meteor
|
||||
});
|
||||
if(!Helper.msieversion()) Notification.requestPermission();
|
||||
|
||||
git_info = $.ajax({ type: "GET",
|
||||
url: "https://api.github.com/repos/zoff-music/zoff/commits",
|
||||
async: false
|
||||
}).responseText;
|
||||
|
||||
if($(".drag-target").length > 0) $(".drag-target")[1].remove();
|
||||
git_info = $.parseJSON(git_info);
|
||||
$("#latest-commit").html("Latest Commit: <br>"
|
||||
+ git_info[0].commit.author.date.substring(0,10)
|
||||
+ ": " + git_info[0].committer.login
|
||||
+ "<br><a href='"+git_info[0].html_url+"'>"
|
||||
+ git_info[0].sha.substring(0,10) + "</a>: "
|
||||
+ git_info[0].commit.message+"<br");
|
||||
|
||||
if(!Helper.msieversion()) Notification.requestPermission();
|
||||
|
||||
git_info = $.ajax({ type: "GET",
|
||||
url: "https://api.github.com/repos/zoff-music/zoff/commits",
|
||||
async: false
|
||||
}).responseText;
|
||||
|
||||
git_info = $.parseJSON(git_info);
|
||||
$("#latest-commit").html("Latest Commit: <br>"
|
||||
+ git_info[0].commit.author.date.substring(0,10)
|
||||
+ ": " + git_info[0].committer.login
|
||||
+ "<br><a href='"+git_info[0].html_url+"'>"
|
||||
+ git_info[0].sha.substring(0,10) + "</a>: "
|
||||
+ git_info[0].commit.message+"<br");
|
||||
|
||||
Helper.sample();
|
||||
}
|
||||
Helper.sample();
|
||||
|
||||
$( "#results" ).hover( function() { $("div.result").removeClass("hoverResults"); i = 0; }, function(){ });
|
||||
$("#search").focus();
|
||||
@@ -332,6 +320,24 @@ $(document).on("submit", "#adminForm", function(e){
|
||||
Admin.pass_save();
|
||||
});
|
||||
|
||||
$(document).on("click", ".chat-link", function(e){
|
||||
$("#chatPlaylist").css("display", "block");
|
||||
$("#wrapper").css("display", "none");
|
||||
$("#suggestions").css("display", "none");
|
||||
});
|
||||
|
||||
$(document).on("click", ".playlist-link", function(e){
|
||||
$("#chatPlaylist").css("display", "none");
|
||||
$("#wrapper").css("display", "block");
|
||||
$("#suggestions").css("display", "none");
|
||||
});
|
||||
|
||||
$(document).on("click", ".suggested-link", function(e){
|
||||
$("#chatPlaylist").css("display", "none");
|
||||
$("#wrapper").css("display", "none");
|
||||
$("#suggestions").css("display", "block");
|
||||
});
|
||||
|
||||
$(document).on("submit", "#chatForm", function(){
|
||||
Chat.chat(document.getElementById("chatForm").input);
|
||||
});
|
||||
|
||||
@@ -4,7 +4,7 @@ var Playercontrols = {
|
||||
|
||||
initYoutubeControls: function()
|
||||
{
|
||||
if(window.mobilecheck() && !/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream){
|
||||
if(window.mobilecheck() && !window.MSStream){
|
||||
$("#controls").appendTo("#playbar");
|
||||
}
|
||||
Playercontrols.initControls();
|
||||
@@ -55,15 +55,17 @@ var Playercontrols = {
|
||||
if(Player.ytplayer.getPlayerState() == 1)
|
||||
{
|
||||
Player.ytplayer.pauseVideo();
|
||||
if(window.mobilecheck() && !/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream){
|
||||
if(window.mobilecheck() && !window.MSStream){
|
||||
document.getElementById("player").style.display = "none";
|
||||
$(".video-container").toggleClass("click-through");
|
||||
$(".page-footer").toggleClass("padding-bottom-extra");
|
||||
}
|
||||
}else if(Player.ytplayer.getPlayerState() == 2 || Player.ytplayer.getPlayerState() == 0)
|
||||
{
|
||||
Player.ytplayer.playVideo();
|
||||
if(window.mobilecheck() && !/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream){
|
||||
if(window.mobilecheck() && !window.MSStream){
|
||||
document.getElementById("player").style.display = "block";
|
||||
$(".video-container").toggleClass("click-through");
|
||||
$(".page-footer").toggleClass("padding-bottom-extra");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user