Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change the behaviour of the SLS #803

Open
wants to merge 1 commit into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/welle-cli/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 7pt;
font-size: 12pt;
border-radius: 4px;
}
canvas {
Expand All @@ -64,7 +64,7 @@
height: 100%;
overflow: auto;
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.9);
background-color: rgba(0,0,0,0.1);
}
.slide-modal-content {
margin: auto;
Expand All @@ -79,7 +79,8 @@
text-align: center;
color: #ccc;
padding: 10px 0;
height: 150px;
height: 15px;
background-color: rgba(0,0,0,0.4);
}
.slideclose {
position: absolute;
Expand Down
16 changes: 14 additions & 2 deletions src/welle-cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ var png_chevron_right = "iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQ

var png_chevron_down = "iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAB0SURBVEiJ7Y87CoAwEAVHD2khqIUgCF5HUPBzUL9NgiGoSKKN7MAW4cEMAUEQnlAAycUWA6WPPAcWdZm1RcAErEDlGmiATd3M8ZNYvfXWuQYCoLUijSXvgdA1oCO1ITRv8JXfRV6Tn0XGt+VmJP1KLgh/ZQd6AiOdJgUioQAAAABJRU5ErkJggg=="

var show=0;

window.onload = function() {
var chevron_right = '<img width=24 height=24 src="data:image/png;base64,' +
png_chevron_right + '" />';
Expand Down Expand Up @@ -210,7 +212,7 @@ function playerLoad() {
}

function setPlayerSource(sid) {
document.getElementById("player").src = "/stream/" + sid;
document.getElementById("player").src = "/mp3/" + sid;
playerLoad();
}

Expand All @@ -228,13 +230,18 @@ function showSlide(sid, last_update_time) {
var last_update = new Date(last_update_time * 1000);
slidecaption.innerHTML = last_update;
slide_modal.style.display = "block";
show=last_update_time;
console.log(slideimg.src)
}

var slideclose = document.getElementsByClassName("slideclose")[0];
slideclose.onclick = function() {
slide_modal.style.display = "none";
show=0;
}



function parseTemplate(template, data) {
return template.replace(/\$\{(\w+)\}/gi, function(match, parensMatch) {
if (data[parensMatch] !== undefined) {
Expand Down Expand Up @@ -359,6 +366,12 @@ function populateEnsembleinfo() {

s["dls"] = "";

global_service_mot_time=service.mot.time;
if (service.mot.time>show && show ) {
var tempo = service.mot.time;
showSlide(parseInt(service.sid), service.mot.time);
}

if (service.mot && service.mot.time > 0) {
s["dls"] += '<button type=button onclick="showSlide(';
s["dls"] += service.sid + ', ' + service.mot.time;
Expand Down Expand Up @@ -580,4 +593,3 @@ function populateConstellation() {
r.send(null);
}