mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-26 01:35:28 +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() {
|
$('.tab-cli .load').click(function() {
|
||||||
var suffix = 'txt',
|
var accepts = [
|
||||||
accepts = [{
|
{
|
||||||
description: suffix.toUpperCase() + ' files', extensions: [suffix],
|
description: 'Config files', extensions: ["txt", "config"],
|
||||||
}];
|
},
|
||||||
|
{
|
||||||
|
description: 'All files',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
chrome.fileSystem.chooseEntry({type: 'openFile', accepts: accepts}, function(entry) {
|
chrome.fileSystem.chooseEntry({type: 'openFile', accepts: accepts}, function(entry) {
|
||||||
if (chrome.runtime.lastError) {
|
if (chrome.runtime.lastError) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue