zero merge
This commit is contained in:
@@ -56,13 +56,15 @@ sub startup {
|
|||||||
$logged_in->get('/radio')->to('home#radio');
|
$logged_in->get('/radio')->to('home#radio');
|
||||||
# ===================
|
# ===================
|
||||||
|
|
||||||
# login user grulla =
|
# login any temp pass=
|
||||||
|
my $usert = $r->under('/')->to('users#is_tmp');
|
||||||
# common grulla user
|
# common grulla user
|
||||||
my $user = $r->under('/')->to('users#is_grulla');
|
my $user = $r->under('/')->to('users#is_grulla');
|
||||||
$user->any('/ccast')->to('home#bcast');
|
$user->any('/ccast')->to('home#bcast');
|
||||||
# personal
|
# personal
|
||||||
my $guest = $r->under('/')->to('users#is_grulla_tmp');
|
my $guest = $r->under('/')->to('users#is_grulla_tmp');
|
||||||
$guest->any('/bcast')->to('home#bcast');
|
$guest->any('/bcast')->to('home#bcast');
|
||||||
|
$guest->any('/radiop')->to('home#radiop');
|
||||||
# ===================
|
# ===================
|
||||||
|
|
||||||
# admin =======================================================================
|
# admin =======================================================================
|
||||||
|
|||||||
@@ -115,6 +115,13 @@ sub radio{
|
|||||||
$c->stash($c->dbv->mod);
|
$c->stash($c->dbv->mod);
|
||||||
$c->stash(nick=>$c->session("nick"));
|
$c->stash(nick=>$c->session("nick"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub radiop{
|
||||||
|
my $c=shift;
|
||||||
|
$c->stash(layout=> "defaultContact");
|
||||||
|
$c->stash($c->dbv->mod);
|
||||||
|
$c->stash(nick=>$c->session("nick"));
|
||||||
|
}
|
||||||
|
|
||||||
sub candy{
|
sub candy{
|
||||||
my $c=shift;
|
my $c=shift;
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ sub is_admin {
|
|||||||
$self->redirect_to('login');
|
$self->redirect_to('login');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub is_grulla {
|
sub is_grulla {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
return 1 if (($self->session('pmid')//0)>=2);
|
return 1 if (($self->session('pmid')//0)>=2);
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ window.onload = function(){
|
|||||||
else if (d.icestats.source.listenurl == radio_listen_url){
|
else if (d.icestats.source.listenurl == radio_listen_url){
|
||||||
console.log("transmitiendo radio");
|
console.log("transmitiendo radio");
|
||||||
onliner(d); }
|
onliner(d); }
|
||||||
|
else if (d.icestats.source.listenurl == radiop_listen_url){
|
||||||
|
console.log("transmitiendo radio");
|
||||||
|
onlinerp(d); }
|
||||||
else {
|
else {
|
||||||
console.warn("otro canal");
|
console.warn("otro canal");
|
||||||
offline(); }}
|
offline(); }}
|
||||||
@@ -55,11 +58,11 @@ window.onload = function(){
|
|||||||
.on("click",function(){window.location="bcast";});
|
.on("click",function(){window.location="bcast";});
|
||||||
dataUpdate();
|
dataUpdate();
|
||||||
}
|
}
|
||||||
function onliner(d){
|
function onlinerp(d){
|
||||||
d3.selectAll(".broadcast")
|
d3.selectAll(".broadcast")
|
||||||
.style("display","block");
|
.style("display","block");
|
||||||
d3.selectAll("article.broadcast,p.broadcast")
|
d3.selectAll("article.broadcast,p.broadcast")
|
||||||
.on("click",function(){window.location="radio";});
|
.on("click",function(){window.location="radiop";});
|
||||||
dataUpdate();
|
dataUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
46
templates/home/radiop.html.ep
Executable file
46
templates/home/radiop.html.ep
Executable file
@@ -0,0 +1,46 @@
|
|||||||
|
% stash css=>["/home/radio/radio.css"];
|
||||||
|
% stash js=>["/home/radio/link.js","/home/radio/radio.js"];
|
||||||
|
<section class="flex title">
|
||||||
|
<article class="title"> <p>Radio Vuelo de grulla</p> </article>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="flex uname">
|
||||||
|
<article class="uname"><p> <%= $nick %></p></article>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="flex rmod">
|
||||||
|
<article><p id="rmod"> <%= $rmod %></p> </article>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="flex logout"> <article class="logout">
|
||||||
|
<a href=" logout "><p id="logout"> Salir </p></a>
|
||||||
|
</article> </section>
|
||||||
|
|
||||||
|
<section class="flex info">
|
||||||
|
<article class="online">
|
||||||
|
<p>Estás escuchando a</p>
|
||||||
|
<p id="prof"></p>
|
||||||
|
</article>
|
||||||
|
<article class="offline">
|
||||||
|
<p>Todavía no comenzamos</p>
|
||||||
|
<p>Por favor espera unos minutos</p>
|
||||||
|
</article>
|
||||||
|
<article class="spot">
|
||||||
|
<div class="spot" id="spot"></div>
|
||||||
|
<div id="clink" class="chat">Entra al Chat</div>
|
||||||
|
</article>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="flex radio"><article class="radio">
|
||||||
|
<p id="now"></p>
|
||||||
|
<audio id="ra" controls="controls" preload="none" ></audio>
|
||||||
|
</article> </section>
|
||||||
|
|
||||||
|
<section class="flex chat"><article>
|
||||||
|
</section></article> </section>
|
||||||
|
<script>
|
||||||
|
const nick="<%= $nick %>";
|
||||||
|
const radio_server="<%= $config->{radio_server} %>";
|
||||||
|
const listen_url="<%= $config->{radiop_server_name} %>";
|
||||||
|
const channel="<%= $config->{radiop_channel} %>";
|
||||||
|
</script>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
%stash css=>["/users/login/formu.css"];
|
%stash css=>["/users/login/formt.css"];
|
||||||
<section class="hero">
|
<section class="hero">
|
||||||
<article class="login">
|
<article class="login">
|
||||||
<p>Bienvenido</p>
|
<p>Bienvenido</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user