1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-25 01:05:12 +03:00

Display a modal during reboot

This commit is contained in:
Pawel Spychalski (DzikuVx) 2019-02-04 14:19:38 +01:00
parent 3c19c15782
commit 5c4b2806ad
3 changed files with 27 additions and 0 deletions

View file

@ -22,8 +22,19 @@ $(document).ready(function () {
GUI.handleReconnect = function ($tabElement) {
let modal;
if (BOARD.hasVcp(CONFIG.boardIdentifier)) { // VCP-based flight controls may crash old drivers, we catch and reconnect
modal = new jBox('Modal', {
width: 400,
height: 100,
animation: false,
closeOnClick: false,
closeOnEsc: false,
content: $('#modal-reconnect')
}).open();
/*
Disconnect
*/
@ -35,6 +46,7 @@ $(document).ready(function () {
Connect again
*/
setTimeout(function start_connection() {
modal.close();
$('a.connect').click();
/*

View file

@ -2076,3 +2076,13 @@ select {
padding: 1em;
clear: both;
}
#modal-reconnect {
/* width: 100%; */
height: 90px;
background: url(../images/loading-bars.svg) no-repeat center 100%;
}
#modal-reconnect div {
text-align: center;
}

View file

@ -259,5 +259,10 @@
</div>
</div>
</div>
<div id="modal-reconnect" class="is-hidden">
<!-- <div class="data-loading"> -->
<div data-i18n="deviceRebooting"></div>
<!-- </div> -->
</div>
</body>
</html>