mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-23 08:15:19 +03:00
[Electron] MacOs and MessageBox fix
MacOS: - Nice icon for DMG - Fix bug when Configurator was minimized and dock icon is clicked Fix (Workaround): After a MessageBox (alert()) was displayed, all input fields stopped working.
This commit is contained in:
parent
a4fd2bce9d
commit
2efebecb61
5 changed files with 36 additions and 22 deletions
|
@ -1,4 +1,6 @@
|
|||
'use strict';
|
||||
const { dialog } = require("@electron/remote");
|
||||
|
||||
|
||||
const CONFIGURATOR = require('./data_storage');
|
||||
const Switchery = require('./libraries/switchery/switchery')
|
||||
|
@ -529,6 +531,13 @@ GUI_control.prototype.update_dataflash_global = function () {
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Don't use alert() in Electron, it has a nasty bug: https://github.com/electron/electron/issues/31917
|
||||
*/
|
||||
GUI_control.prototype.alert = function(message) {
|
||||
dialog.showMessageBoxSync({ message: message, icon: "./images/inav_icon_128.png" });
|
||||
}
|
||||
|
||||
// initialize object into GUI variable
|
||||
var GUI = new GUI_control();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue