add hex mode state check before open bin file

This commit is contained in:
Xen 2020-05-29 20:44:03 +08:00
parent 63dde15549
commit 257169d1b6
2 changed files with 6 additions and 1 deletions

View File

@ -199,6 +199,11 @@ function openFile() {
}
function openBinFile() {
if (true !== config.general.hexmode) {
toast("Please first enable 'Hex Mode' in General tab.");
return;
}
dialog
.showOpenDialog({
properties: ["openFile"],

View File

@ -127,7 +127,7 @@ function serialGetOptions() {
}
function toast(text) {
mcss.toast({ html: text, displayLength: 1000 });
mcss.toast({ html: text, displayLength: 2000 });
// alert(text)
}