1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-13 11:29:53 +03:00

Add and option to flush settings cache

This commit is contained in:
Pawel Spychalski (DzikuVx) 2024-05-12 20:23:07 +02:00
parent e1c302438b
commit 6d25fbb8b8
4 changed files with 21 additions and 0 deletions

View file

@ -24,6 +24,7 @@ const update = require('./globalUpdates');
const appUpdater = require('./appUpdater');
const CliAutoComplete = require('./CliAutoComplete');
const { SITLProcess } = require('./sitl');
const settingsCache = require('./settingsCache');
process.on('uncaughtException', function (error) {
if (process.env.NODE_ENV !== 'development') {
@ -385,6 +386,9 @@ $(function() {
$('#demoModeReset').on('click', function () {
SITLProcess.deleteEepromFile('demo.bin');
});
$('#maintenanceFlushSettingsCache').on('click', function () {
settingsCache.flush();
});
function close_and_cleanup(e) {
if (e.type == 'click' && !$.contains($('div#options-window')[0], e.target) || e.type == 'keyup' && e.keyCode == 27) {
$(document).unbind('click keyup', close_and_cleanup);