sync indicator

This commit is contained in:
Jakob Ketterl 2019-06-15 12:30:04 +02:00
parent 3a89f52028
commit adf62bc2ca
4 changed files with 18 additions and 7 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

@ -182,14 +182,14 @@
<div class="openwebrx-panel openwebrx-meta-panel" id="openwebrx-panel-metadata-dmr" data-panel-name="metadata-dmr" data-panel-pos="left" data-panel-order="2" data-panel-size="300,220">
<div class="openwebrx-meta-frame">
<div class="openwebrx-meta-slot openwebrx-dmr-timeslot-panel">
<div>Timeslot 1</div>
<div class="openwebrx-dmr-slot">Timeslot 1</div>
<div class="openwebrx-meta-user-image"></div>
<div class="openwebrx-dmr-id openwebrx-meta-autoclear"></div>
<div class="openwebrx-dmr-name openwebrx-meta-autoclear"></div>
<div class="openwebrx-dmr-target openwebrx-meta-autoclear"></div>
</div>
<div class="openwebrx-meta-slot openwebrx-dmr-timeslot-panel">
<div>Timeslot 2</div>
<div class="openwebrx-dmr-slot">Timeslot 2</div>
<div class="openwebrx-meta-user-image"></div>
<div class="openwebrx-dmr-id openwebrx-meta-autoclear"></div>
<div class="openwebrx-dmr-name openwebrx-meta-autoclear"></div>

View File

@ -963,6 +963,17 @@ img.openwebrx-mirror-img
background-color: #95bbdf;
}
.openwebrx-meta-slot.sync .openwebrx-dmr-slot:before {
content:"";
display: inline-block;
margin: 0 5px;
width: 12px;
height: 12px;
background-color: #ABFF00;
border-radius: 50%;
box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 7px 1px, inset #304701 0 -1px 9px, #89FF00 0 2px 12px;
}
.openwebrx-meta-slot:last-child {
margin-right: 0;
}

View File

@ -1319,7 +1319,8 @@ function update_metadata(meta) {
var name = "";
var target = "";
var group = false;
if (meta.type && meta.type != "data") {
$(el)[meta.sync ? "addClass" : "removeClass"]("sync");
if (meta.sync && meta.sync == "voice") {
id = (meta.additional && meta.additional.callsign) || meta.source || "";
name = (meta.additional && meta.additional.fname) || "";
if (meta.type == "group") {
@ -1338,7 +1339,7 @@ function update_metadata(meta) {
$(el).find(".openwebrx-meta-user-image")[group ? "addClass" : "removeClass"]("group");
} else {
$(".openwebrx-meta-panel .openwebrx-meta-autoclear").text("");
$(".openwebrx-meta-panel").removeClass("active");
$(".openwebrx-meta-panel").removeClass("active").removeClass("sync");
}
break;
case 'YSF':
@ -1365,7 +1366,7 @@ function update_metadata(meta) {
break;
} else {
$(".openwebrx-meta-panel .openwebrx-meta-autoclear").text("");
$(".openwebrx-meta-panel").removeClass("active");
$(".openwebrx-meta-panel").removeClass("active").removeClass("sync");
}
}
@ -1374,8 +1375,7 @@ function clear_metadata() {
$(".openwebrx-meta-panel").each(function(_, p){
toggle_panel(p.id, false);
});
$(".openwebrx-meta-panel .openwebrx-meta-autoclear").text("");
$(".openwebrx-meta-panel").removeClass("active");
update_metadata({});
}
function add_problem(what)