adding flash on connect UI, backend missing
parent
f64b566847
commit
ab4a5398b4
|
@ -33,6 +33,9 @@
|
||||||
float: left;
|
float: left;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
|
.tab-firmware_flasher .note .flash_on_connect_wrapper {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
a.load_file, a.load_remote_file {
|
a.load_file, a.load_remote_file {
|
||||||
display: block;
|
display: block;
|
||||||
float: left;
|
float: left;
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
If you are flashing board with <strong>baseflight</strong> already flashed (updating), leave this checkbox unchecked.<br />
|
If you are flashing board with <strong>baseflight</strong> already flashed (updating), leave this checkbox unchecked.<br />
|
||||||
If you are flashing "<strong>bare</strong>" board with no firmware preloaded or you have bootloader pins <strong>shorted</strong>, check this box.<br />
|
If you are flashing "<strong>bare</strong>" board with no firmware preloaded or you have bootloader pins <strong>shorted</strong>, check this box.<br />
|
||||||
</p>
|
</p>
|
||||||
<label><span style="float: left; font-weight: bold; margin-right: 6px;">No reboot sequence:</span><input class="updating" type="checkbox" /></label>
|
<label><input class="updating" type="checkbox" /><span style="font-weight: bold; margin-left: 6px;">No reboot sequence</span></label><br />
|
||||||
|
<label class="flash_on_connect_wrapper"><input class="flash_on_connet" type="checkbox" /><span style="font-weight: bold; margin-left: 6px;">Flash on connect</span></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="clear-both"></div>
|
<div class="clear-both"></div>
|
||||||
<a class="load_file" href="#">Load Firmware [Local]</a>
|
<a class="load_file" href="#">Load Firmware [Local]</a>
|
||||||
|
|
|
@ -107,14 +107,23 @@ function tab_initialize_firmware_flasher() {
|
||||||
} else {
|
} else {
|
||||||
if (result.no_reboot_sequence) {
|
if (result.no_reboot_sequence) {
|
||||||
$('input.updating').prop('checked', true);
|
$('input.updating').prop('checked', true);
|
||||||
|
$('label.flash_on_connect_wrapper').show();
|
||||||
} else {
|
} else {
|
||||||
$('input.updating').prop('checked', false);
|
$('input.updating').prop('checked', false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// bind UI hook so the status is saved on change
|
// bind UI hook so the status is saved on change
|
||||||
$('input.updating').change(function() {
|
$('input.updating').change(function() {
|
||||||
chrome.storage.local.set({'no_reboot_sequence': $(this).is(':checked')}, function() {});
|
var status = $(this).is(':checked');
|
||||||
|
|
||||||
|
if (status) {
|
||||||
|
$('label.flash_on_connect_wrapper').show();
|
||||||
|
} else {
|
||||||
|
$('label.flash_on_connect_wrapper').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
chrome.storage.local.set({'no_reboot_sequence': status}, function() {});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue