Show radio CAT status above QSO panel if available

这个提交包含在:
phl0 2023-05-03 16:11:19 +02:00
父节点 fd450673db
当前提交 642135e88d
找不到此签名对应的密钥
GPG 密钥 ID: 48EA1E640798CA9A

查看文件

@ -1247,13 +1247,32 @@ $(document).on('keypress',function(e) {
var minutes = Math.floor(<?php echo $this->optionslib->get_option('cat_timeout_interval'); ?> / 60);
if(data.updated_minutes_ago > minutes) {
$(".radio_cat_state" ).remove();
if($('.radio_timeout_error').length == 0) {
$('.qso_panel').prepend('<div class="alert alert-danger radio_timeout_error" role="alert">Radio connection timed-out: ' + $('select.radios option:selected').text() + ' data is ' + data.updated_minutes_ago + ' minutes old.</div>');
$('.qso_panel').prepend('<div class="alert alert-danger radio_timeout_error" role="alert"><i class="fas fa-broadcast-tower"></i> Radio connection timed-out: ' + $('select.radios option:selected').text() + ' data is ' + data.updated_minutes_ago + ' minutes old.</div>');
} else {
$('.radio_timeout_error').text('Radio connection timed-out: ' + $('select.radios option:selected').text() + ' data is ' + data.updated_minutes_ago + ' minutes old.');
$('.radio_timeout_error').html('Radio connection timed-out: ' + $('select.radios option:selected').text() + ' data is ' + data.updated_minutes_ago + ' minutes old.');
}
} else {
$(".radio_timeout_error" ).remove();
text = '<i class="fas fa-broadcast-tower"></i><span style="margin-left:10px;"></span><b>TX:</b> '+parseInt(data.frequency)/1000/1000+' MHz';
if(data.power != null && data.power != 0) {
text = text+'<span style="margin-left:10px"></span>'+data.power+'W';
}
if(data.prop_mode != null && data.prop_mode != '') {
text = text+'<span style="margin-left:10px"></span>('+data.prop_mode;
if (data.prop_mode == 'SAT') {
text = text+' '+data.satname;
}
}
if(data.frequency_rx != null && data.frequency_rx != 0) {
text = text+'<span style="margin-left:10px"></span><b>RX:</b> '+parseInt(data.frequency_rx)/1000/1000+' MHz)';
}
if (! $('#radio_cat_state').length) {
$('.qso_panel').prepend('<div id="radio_cat_state" class="alert alert-success radio_cat_state" role="alert">'+text+'</div>');
} else {
$('#radio_cat_state').html(text);
}
}
});