improve sdr failure message display, closes #19

This commit is contained in:
Jakob Ketterl 2019-12-21 23:46:05 +01:00
parent 4d0d316fdd
commit 6f9ba6c290
3 changed files with 24 additions and 5 deletions

View File

@ -656,8 +656,7 @@ img.openwebrx-mirror-img
font-family: 'expletus-sans-medium';
}
#openwebrx-autoplay-overlay
{
.openwebrx-overlay {
position: fixed;
width: 100%;
height: 100%;
@ -671,6 +670,10 @@ img.openwebrx-mirror-img
color: white;
font-weight: bold;
font-size: 20pt;
}
#openwebrx-autoplay-overlay
{
cursor: pointer;
transition: opacity 0.3s linear;
}
@ -680,7 +683,7 @@ img.openwebrx-mirror-img
width: 150px;
}
#openwebrx-autoplay-overlay .overlay-content {
.openwebrx-overlay .overlay-content {
position: absolute;
left: 50%;
top: 50%;
@ -688,6 +691,12 @@ img.openwebrx-mirror-img
text-align: center;
}
#openwebrx-error-overlay .overlay-content {
background-color: #000;
padding: 50px;
border-radius: 20px;
}
#openwebrx-digimode-canvas-container
{
/*margin: -10px -10px 10px -10px;*/

View File

@ -219,12 +219,19 @@
</div>
</div>
</div>
<div id="openwebrx-autoplay-overlay" style="display:none;">
<div id="openwebrx-autoplay-overlay" class="openwebrx-overlay" style="display:none;">
<div class="overlay-content">
<img id="openwebrx-play-button" src="static/gfx/openwebrx-play-button.png" />
<div>Start OpenWebRX</div>
</div>
</div>
<div id="openwebrx-error-overlay" class="openwebrx-overlay" style="display:none;">
<div class="overlay-content">
<div>This receiver is currently unavailable due to technical issues.</div>
<div>Error Message:</div>
<div class="errormessage"></div>
</div>
</div>
<div id="openwebrx-dialog-bookmark" class="openwebrx-dialog" style="display:none;">
<form>
<div class="form-field">

View File

@ -1135,7 +1135,9 @@ function on_ws_recv(evt) {
bookmarks.replace_bookmarks(json['value'], "server");
break;
case "sdr_error":
divlog(json['value'], true);
var $overlay = $('#openwebrx-error-overlay');
$overlay.find('.errormessage').text(json['value']);
$overlay.show();
break;
case 'secondary_demod':
secondary_demod_push_data(json['value']);
@ -1407,6 +1409,7 @@ function waterfall_measure_minmax_do(what) {
}
function on_ws_opened() {
$('#openwebrx-error-overlay').hide();
ws.send("SERVER DE CLIENT client=openwebrx.js type=receiver");
divlog("WebSocket opened to " + ws.url);
if (!networkSpeedMeasurement) {