mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Added a prettier QR-code link for joining on a channel
This commit is contained in:
@@ -58,6 +58,7 @@ var Channel = {
|
||||
$("#help").modal();
|
||||
$("#contact").modal();
|
||||
$("#embed").modal();
|
||||
$("#channel-share-modal").modal();
|
||||
$("#delete_song_alert").modal({
|
||||
dismissible: false
|
||||
});
|
||||
@@ -128,12 +129,23 @@ var Channel = {
|
||||
$("#code-link").attr("href", codeURL);
|
||||
}
|
||||
|
||||
var shareCodeUrl = window.location.protocol + "//"+window.location.hostname+"/"+chan.toLowerCase();
|
||||
$("#share-join-qr").attr("src", "https://chart.googleapis.com/chart?chs=221x221&cht=qr&choe=UTF-8&chld=L|1&chl="+shareCodeUrl);
|
||||
$("#channel-name-join").text(window.location.hostname + "/" + chan.toLowerCase());
|
||||
if(no_socket){
|
||||
var add = "";
|
||||
if(private_channel) add = Crypt.getCookie("_uI") + "_";
|
||||
socket.emit("list", {version: parseInt(localStorage.getItem("VERSION")), channel: add + chan.toLowerCase(), pass: embed ? '' : Crypt.crypt_pass(Crypt.get_userpass(chan.toLowerCase()))});
|
||||
}
|
||||
|
||||
if(!localStorage.getItem("_jSeen") || localStorage.getItem("_jSeen") != "seen") {
|
||||
$('.tap-target-join').tapTarget('open');
|
||||
tap_target_timeout = setTimeout(function() {
|
||||
$('.tap-target-join').tapTarget('close');
|
||||
}, 4000);
|
||||
localStorage.setItem("_jSeen", "seen");
|
||||
}
|
||||
|
||||
if(!Helper.mobilecheck()) {
|
||||
$("#viewers").tooltip({
|
||||
delay: 5,
|
||||
|
||||
@@ -825,7 +825,7 @@ var List = {
|
||||
show: function() {
|
||||
if(!Helper.mobilecheck())
|
||||
{
|
||||
if(showToggle){
|
||||
/*if(showToggle){
|
||||
showToggle=false;
|
||||
$("#toptitle").empty();
|
||||
$("#chan").addClass("bigChan");
|
||||
@@ -836,7 +836,7 @@ var List = {
|
||||
$("#toptitle").html("Zoff");
|
||||
$("#chan").removeClass("bigChan");
|
||||
$("#chan").html(chan);
|
||||
}
|
||||
}*/$("#channel-share-modal").modal("open");
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -848,6 +848,10 @@ $(document).on("submit", "#adminForm", function(e){
|
||||
Admin.pass_save();
|
||||
});
|
||||
|
||||
$(document).on("click", "#channel-share-modal", function(){
|
||||
$("#channel-share-modal").modal("close")
|
||||
});
|
||||
|
||||
$(document).on("click", ".chat-link", function(e){
|
||||
chat_active = true;
|
||||
unseen = false;
|
||||
|
||||
Reference in New Issue
Block a user