mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-26 09:45:23 +03:00
Merge pull request #1681 from M0j0Risin/cli-usability-enhancements
CLI usability enhancements
This commit is contained in:
commit
1697b153f1
3 changed files with 27 additions and 9 deletions
|
@ -1976,25 +1976,31 @@
|
|||
"message": "CLI output successfully saved to file"
|
||||
},
|
||||
"cliClearOutputHistoryBtn": {
|
||||
"message": "Clear output history"
|
||||
"message": "Clear Screen"
|
||||
},
|
||||
"cliCopyToClipboardBtn": {
|
||||
"message": "Copy to clipboard"
|
||||
"message": "Copy to Clipboard"
|
||||
},
|
||||
"cliExitBtn": {
|
||||
"message": "EXIT"
|
||||
"message": "Exit"
|
||||
},
|
||||
"cliSaveSettingsBtn": {
|
||||
"message": "SAVE SETTINGS"
|
||||
"message": "Save Settings"
|
||||
},
|
||||
"cliMscBtn": {
|
||||
"message": "MSC"
|
||||
},
|
||||
"cliDiffAllBtn": {
|
||||
"message": "Diff All"
|
||||
},
|
||||
"cliCommandsHelp": {
|
||||
"message": "Type or paste commands in the box to the left. You can use the up and down arrow keys to recall previously typed commands. Type 'help' or click on this icon for more info."
|
||||
},
|
||||
"cliCopySuccessful": {
|
||||
"message": "Copied!"
|
||||
},
|
||||
"cliLoadFromFileBtn": {
|
||||
"message": "Load from file"
|
||||
"message": "Load from File"
|
||||
},
|
||||
"cliConfirmSnippetDialogTitle": {
|
||||
"message": "Review loaded commands"
|
||||
|
|
|
@ -11,7 +11,12 @@
|
|||
<div class="wrapper"></div>
|
||||
</div>
|
||||
</div>
|
||||
<textarea name="commands" i18n_placeholder="cliInputPlaceholder" rows="1" cols="0"></textarea>
|
||||
<div style="display:flex;align-items:center;">
|
||||
<textarea name="commands" i18n_placeholder="cliInputPlaceholder" rows="1" cols="0"></textarea>
|
||||
<a class="helpiconLink" style="margin-left:5px;margin-right:5px;" href="https://github.com/iNavFlight/inav/blob/master/docs/Cli.md" target="_blank">
|
||||
<div class="helpicon cf_tip" style="float:none;" data-i18n_title="cliCommandsHelp"></div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content_toolbar">
|
||||
<div class="btn save_btn" style="float: left; padding-left: 15px">
|
||||
|
@ -23,8 +28,9 @@
|
|||
<a class="cliDocsBtn" href="#" i18n="cliDocsBtn" target="_blank"></a>
|
||||
<a class="save" href="#" i18n="cliSaveToFileBtn"></a>
|
||||
<a class="load" href="#" i18n="cliLoadFromFileBtn"></a>
|
||||
<a class="clear" href="#" i18n="cliClearOutputHistoryBtn"></a>
|
||||
<a class="copy" href="#" i18n="cliCopyToClipboardBtn"></a>
|
||||
<a class="copy" href="#" i18n="cliCopyToClipboardBtn"></a>
|
||||
<a class="clear" href="#" i18n="cliClearOutputHistoryBtn"></a>
|
||||
<a class="diffall" href="#" i18n="cliDiffAllBtn"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -193,6 +193,12 @@ TABS.cli.initialize = function (callback) {
|
|||
self.send(getCliCommand('msc\n', TABS.cli.cliBuffer));
|
||||
});
|
||||
|
||||
$('.tab-cli .diffall').click(function() {
|
||||
self.outputHistory = "";
|
||||
$('.tab-cli .window .wrapper').empty();
|
||||
self.send(getCliCommand('diff all\n', TABS.cli.cliBuffer));
|
||||
});
|
||||
|
||||
$('.tab-cli .clear').click(function() {
|
||||
self.outputHistory = "";
|
||||
$('.tab-cli .window .wrapper').empty();
|
||||
|
@ -278,7 +284,7 @@ TABS.cli.initialize = function (callback) {
|
|||
var out_string = textarea.val();
|
||||
self.history.add(out_string.trim());
|
||||
|
||||
if (out_string.trim().toLowerCase() == "cls") {
|
||||
if (out_string.trim().toLowerCase() == "cls" || out_string.trim().toLowerCase() == "clear") {
|
||||
self.outputHistory = "";
|
||||
$('.tab-cli .window .wrapper').empty();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue