From b75e427833790b7e04c1a7f56d7ce2e5d686669b Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 22 Dec 2020 11:52:01 +0100 Subject: [PATCH] docs help command --- .../UI/Spaces/Docs-Space/DocsSpace.js | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js b/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js index 248a3fef7..f1e15ee8a 100644 --- a/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js +++ b/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js @@ -799,12 +799,32 @@ function newSuperalgosDocSpace() { function detectCommands() { const newParagraphText = "Left click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode." + if (checkHelpCommand() === undefined) { return } if (checkAddCommand() === undefined) { return } if (checkDeleteCommand() === undefined) { return } if (checkUReIndexCommand() === undefined) { return } renderSearchResultsPage() + function checkHelpCommand() { + if (command.toLowerCase() === 'help') { + renderCommandResultsPage( + [ + "Command line interface general help info: ", + "The Docs is equiped with a command line interface from where you can type commands that will help you contribute to the Docs. Each command listed below has it's own help. You just need to type help and the command to get details about it's sintax and examples on how to use it. The following is the list of available commands:", + "Help: This general purpose help info.", + "Add: Use this command to add new Nodes, Concepts or Topics to the Docs.", + "Delete: Use this command to delete existing Nodes, Concepts or Topics from the Docs.", + "Save: Use this command whenever you would like to save the changes you made to the Docs.", + "Reindex: Use this command to re-index all the info again so that your changes are visible at search results.", + "Note that anything you type not identified as a command will be treated as a search query." + ] + ) + return + } + return 'Not Help Command' + } + function checkAddCommand() { if (command.toLowerCase() === 'help add') { renderCommandResultsPage(