diff --git a/art/themes/luciano_blocktronics/MAILMNU.ANS b/art/themes/luciano_blocktronics/MAILMNU.ANS index fef5522e..09b559cf 100644 Binary files a/art/themes/luciano_blocktronics/MAILMNU.ANS and b/art/themes/luciano_blocktronics/MAILMNU.ANS differ diff --git a/art/themes/luciano_blocktronics/MMENU.ANS b/art/themes/luciano_blocktronics/MMENU.ANS index cf395ec0..f779f31c 100644 Binary files a/art/themes/luciano_blocktronics/MMENU.ANS and b/art/themes/luciano_blocktronics/MMENU.ANS differ diff --git a/art/themes/luciano_blocktronics/MSGPMPT.ANS b/art/themes/luciano_blocktronics/MSGPMPT.ANS index 40415248..0f7c2da8 100644 Binary files a/art/themes/luciano_blocktronics/MSGPMPT.ANS and b/art/themes/luciano_blocktronics/MSGPMPT.ANS differ diff --git a/art/themes/luciano_blocktronics/activitypub_menu.ans b/art/themes/luciano_blocktronics/activitypub_menu.ans index 5b91b3bc..969cfbfd 100644 Binary files a/art/themes/luciano_blocktronics/activitypub_menu.ans and b/art/themes/luciano_blocktronics/activitypub_menu.ans differ diff --git a/art/themes/luciano_blocktronics/activitypub_menu_prompt.ans b/art/themes/luciano_blocktronics/activitypub_menu_prompt.ans new file mode 100644 index 00000000..0f7c2da8 Binary files /dev/null and b/art/themes/luciano_blocktronics/activitypub_menu_prompt.ans differ diff --git a/art/themes/luciano_blocktronics/activitypub_user_config_images.ans b/art/themes/luciano_blocktronics/activitypub_user_config_images.ans index b61239fa..116d966f 100644 Binary files a/art/themes/luciano_blocktronics/activitypub_user_config_images.ans and b/art/themes/luciano_blocktronics/activitypub_user_config_images.ans differ diff --git a/art/themes/luciano_blocktronics/theme.hjson b/art/themes/luciano_blocktronics/theme.hjson index 4243dda1..0363949b 100644 --- a/art/themes/luciano_blocktronics/theme.hjson +++ b/art/themes/luciano_blocktronics/theme.hjson @@ -1474,6 +1474,14 @@ } } } + + activityPubMenuCommand: { + mci: { + TL1: { + text: "|00|08(|11|AS|08)" + } + } + } } achievements: { diff --git a/core/activitypub/user_config.js b/core/activitypub/user_config.js index 11657b60..882f18eb 100644 --- a/core/activitypub/user_config.js +++ b/core/activitypub/user_config.js @@ -254,6 +254,8 @@ exports.getModule = class ActivityPubUserConfig extends MenuModule { imageView.setText(apSettings.image); iconView.setText(apSettings.icon); + imageView.setFocus(true); + return callback(null); }, ], diff --git a/core/fse.js b/core/fse.js index ad7149d8..dfff57b5 100644 --- a/core/fse.js +++ b/core/fse.js @@ -505,7 +505,7 @@ exports.FullScreenEditorModule = msg = insert( msg, tearLinePos, - bodyMessageView.getSGRFor('text') + bodyMessageView.getTextSgrPrefix() ); } @@ -1496,7 +1496,7 @@ exports.FullScreenEditorModule = const bodyMessageView = this.viewControllers.body.getView( MciViewIds.body.message ); - quoteLines += `${ansi.normal()}${bodyMessageView.getSGRFor('text')}`; + quoteLines += `${ansi.normal()}${bodyMessageView.getTextSgrPrefix()}`; } msgView.addText(`${quoteLines}\n\n`); } diff --git a/core/multi_line_edit_text_view.js b/core/multi_line_edit_text_view.js index 5fddbb1b..192c9e7c 100644 --- a/core/multi_line_edit_text_view.js +++ b/core/multi_line_edit_text_view.js @@ -128,14 +128,6 @@ function MultiLineEditTextView(options) { // this.cursorPos = { col: 0, row: 0 }; - this.getSGRFor = function (sgrFor) { - return ( - { - text: self.getSGR(), - }[sgrFor] || self.getSGR() - ); - }; - this.isEditMode = function () { return 'edit' === self.mode; }; @@ -144,6 +136,14 @@ function MultiLineEditTextView(options) { return 'preview' === self.mode; }; + this.getTextSgrPrefix = function () { + if (!self.isEditMode()) { + return ''; + } + + return self.hasFocus ? self.getFocusSGR() : self.getSGR(); + }; + // :TODO: Most of the calls to this could be avoided via incrementRow(), decrementRow() that keeps track or such this.getTextLinesIndex = function (row) { if (!_.isNumber(row)) { @@ -171,7 +171,7 @@ function MultiLineEditTextView(options) { this.toggleTextCursor = function (action) { self.client.term.rawWrite( - `${self.getSGRFor('text')}${ + `${self.getTextSgrPrefix()}${ 'hide' === action ? ansi.hideCursor() : ansi.showCursor() }` ); @@ -183,11 +183,11 @@ function MultiLineEditTextView(options) { const startIndex = self.getTextLinesIndex(startRow); const endIndex = Math.min(self.getTextLinesIndex(endRow), self.textLines.length); const absPos = self.getAbsolutePosition(startRow, 0); + const prefix = self.getTextSgrPrefix(); for (let i = startIndex; i < endIndex; ++i) { - //${self.getSGRFor('text')} self.client.term.write( - `${ansi.goto(absPos.row++, absPos.col)}${self.getRenderText(i)}`, + `${ansi.goto(absPos.row++, absPos.col)}${prefix}${self.getRenderText(i)}`, false // convertLineFeeds ); } @@ -492,7 +492,7 @@ function MultiLineEditTextView(options) { .slice(self.cursorPos.col - c.length); self.client.term.write( - `${ansi.hideCursor()}${self.getSGRFor('text')}${renderText}${ansi.goto( + `${ansi.hideCursor()}${self.getTextSgrPrefix()}${renderText}${ansi.goto( absPos.row, absPos.col )}${ansi.showCursor()}`, @@ -1105,10 +1105,14 @@ MultiLineEditTextView.prototype.redraw = function () { }; MultiLineEditTextView.prototype.setFocus = function (focused) { - this.client.term.rawWrite(this.getSGRFor('text')); - this.moveClientCursorToCursorPos(); - MultiLineEditTextView.super_.prototype.setFocus.call(this, focused); + + if (this.isEditMode() && this.getSGR() !== this.getFocusSGR()) { + this.redrawVisibleArea(); + } else { + this.client.term.rawWrite(this.getTextSgrPrefix()); + } + this.moveClientCursorToCursorPos(); }; MultiLineEditTextView.prototype.setText = function ( diff --git a/misc/menu_templates/activitypub.in.hjson b/misc/menu_templates/activitypub.in.hjson index 5f4b148e..87579043 100644 --- a/misc/menu_templates/activitypub.in.hjson +++ b/misc/menu_templates/activitypub.in.hjson @@ -1,9 +1,9 @@ { menus: { activityPubMenu: { - desc: ActivityPub + desc: ActivityPub Menu art: activitypub_menu - prompt: menuCommand + prompt: activiytPubMenuCommand submit: [ { value: {command: "S"} @@ -14,17 +14,26 @@ action: @menu:activityPubUserConfig } { - value: {command: "M"} + value: {command: "S"} action: @menu:activityPubSocialManager } { value: {command: "Q"} action: @menu:mainMenu } + { + value: { command: "E" } + action: @menu:privateMailMenu + } + { + value: { command: "G" } + action: @menu:fullLogoffSequence + } ] } + activityPubActorSearch: { - desc: Viewing ActivityPub + desc: ActivityPub Search module: activitypub/actor_search config: { cls: true @@ -166,7 +175,7 @@ } } activityPubSocialManager: { - desc: Social Manager + desc: ActivityPub Social Manager module: ./activitypub/social_manager config: { art: {main: "activitypub_social_manager"} @@ -199,4 +208,20 @@ } } } + + prompts: { + activityPubMenuCommand: { + art: activitypub_menu_prompt + mci: { + ET2: { + argName: command + width: 20 + maxLength: 20 + submit: true + textStyle: upper + focus: true + } + } + } + } }