mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-24 16:55:24 +03:00
allow user to pick any type of file to load in CLI
This commit is contained in:
parent
0458198e9a
commit
6062d76ed3
1 changed files with 8 additions and 4 deletions
|
@ -203,10 +203,14 @@ TABS.cli.initialize = function (callback, nwGui) {
|
|||
}
|
||||
|
||||
$('.tab-cli .load').click(function() {
|
||||
var suffix = 'txt',
|
||||
accepts = [{
|
||||
description: suffix.toUpperCase() + ' files', extensions: [suffix],
|
||||
}];
|
||||
var accepts = [
|
||||
{
|
||||
description: 'Config files', extensions: ["txt", "config"],
|
||||
},
|
||||
{
|
||||
description: 'All files',
|
||||
},
|
||||
];
|
||||
|
||||
chrome.fileSystem.chooseEntry({type: 'openFile', accepts: accepts}, function(entry) {
|
||||
if (chrome.runtime.lastError) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue