From dd03d3dcf15dd1c3ce9b0d7b3b7b3dfbaa0cc946 Mon Sep 17 00:00:00 2001 From: Robert Mooney Date: Sun, 24 Jul 2016 20:19:09 -0700 Subject: [PATCH 1/3] Minor documentation fixes: - Clarify *oputil* invocation - Remove redundant 'to' --- docs/index.md | 2 +- docs/menu_system.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/index.md b/docs/index.md index 7c786978..947ffe02 100644 --- a/docs/index.md +++ b/docs/index.md @@ -46,7 +46,7 @@ The main system configuration is handled via `~/.config/enigma-bbs/config.hjson` ### Via oputil.js `oputil.js` can be utilized to generate your **initial** configuration. **This is the recommended way for all new users**: - optutil.js config --new + ./oputil.js config --new You wil be asked a series of basic questions. diff --git a/docs/menu_system.md b/docs/menu_system.md index eca73c17..b8b02fc8 100644 --- a/docs/menu_system.md +++ b/docs/menu_system.md @@ -69,6 +69,6 @@ matrix: { } ``` -In the above entry, you'll notice `form`. This defines a form(s) object. In this case, a single form by ID of `0`. The system is then told to use a block only when the resulting art provides a `VM` (*VerticalMenuView*) MCI entry. `VM1` is then setup to to `submit` and start focused via `focus: true` as well as have some menu entries ("login", "apply", ...) defined. +In the above entry, you'll notice `form`. This defines a form(s) object. In this case, a single form by ID of `0`. The system is then told to use a block only when the resulting art provides a `VM` (*VerticalMenuView*) MCI entry. `VM1` is then setup to `submit` and start focused via `focus: true` as well as have some menu entries ("login", "apply", ...) defined. The `submit` object tells the system to attempt to apply provided match entries from any view ID (`*`). Upon submit, the first match will be executed. For example, if the user selects "login", the first entry with a value of `{ 1: 0 }` or view ID 1, value 0 will match causing `action` of `@menu:login` to be executed (go to `login` menu). \ No newline at end of file From e080b5dcfafcf4dc544312178e2475bf399fad69 Mon Sep 17 00:00:00 2001 From: Robert Mooney Date: Sun, 24 Jul 2016 23:11:04 -0700 Subject: [PATCH 2/3] Spelling and grammar! --- core/connect.js | 4 ++-- core/view_controller.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/connect.js b/core/connect.js index 2698fd44..a92846f9 100644 --- a/core/connect.js +++ b/core/connect.js @@ -78,7 +78,7 @@ function prepareTerminal(term) { function displayBanner(term) { term.pipeWrite( - '|06Conected to |02EN|10i|02GMA|10½ |06BBS version |12|VN\n' + + '|06Connected to |02EN|10i|02GMA|10½ |06BBS version |12|VN\n' + '|06Copyright (c) 2014-2015 Bryan Ashby |14- |12http://l33t.codes/\n' + '|06Updates & source |14- |12https://github.com/NuSkooler/enigma-bbs/\n' + '|00'); @@ -118,7 +118,7 @@ function connectEntry(client, nextMenu) { prepareTerminal(term); // - // Always show a ENiGMA½ banner + // Always show an ENiGMA½ banner // displayBanner(term); diff --git a/core/view_controller.js b/core/view_controller.js index 53574f82..b4c7f279 100644 --- a/core/view_controller.js +++ b/core/view_controller.js @@ -533,7 +533,7 @@ ViewController.prototype.loadFromPromptConfig = function(options, cb) { // // Locate matching action block // - // :TODO: this is bacially the same as for menus -- DRY it up! + // :TODO: this is basically the same as for menus -- DRY it up! for(var c = 0; c < menuSubmit.length; ++c) { var actionBlock = menuSubmit[c]; From 9ab4adc05f8f676172fef8ff056bbbe46ac1f1a6 Mon Sep 17 00:00:00 2001 From: Robert Mooney Date: Mon, 25 Jul 2016 01:20:22 -0700 Subject: [PATCH 3/3] Handle empty text masks. This allows themes to prevent text from being sent during password entry. To enable, edit theme.hjson and set $.customization.defaults .general.passwordChar to "". e.g., { ... customization: { defaults: { general: { passwordChar: "" } } ... } } --- core/edit_text_view.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/edit_text_view.js b/core/edit_text_view.js index efe2c812..424041ae 100644 --- a/core/edit_text_view.js +++ b/core/edit_text_view.js @@ -68,8 +68,9 @@ EditTextView.prototype.onKeyPress = function(ch, key) { } else { this.cursorPos.col += 1; - if(this.textMaskChar) { - this.client.term.write(this.textMaskChar); + if(_.isString(this.textMaskChar)) { + if(this.textMaskChar.length > 0) + this.client.term.write(this.textMaskChar); } else { this.client.term.write(ch); }