Allow for WFC status to be MLTEV

This commit is contained in:
Bryan Ashby 2022-07-17 23:02:08 -06:00
parent e8f6a2f702
commit 17ddd73247
No known key found for this signature in database
GPG Key ID: C2C1B501E4EFD994
5 changed files with 21 additions and 7 deletions

View File

@ -297,7 +297,7 @@
statusAvailableIndicators: [ "N", "Y" ]
statusVisibleIndicators: [ "N", "Y" ]
nodeStatusSelectionFormat: "|00|10{realName}"
nodeStatusSelectionFormat: "|00|10{realName}\n{serverName}"
}
0: {
mci: {
@ -322,6 +322,13 @@
width: 73
itemFormat: "|00|07{nodeId} {levelIndicator} |02{timestamp} {message:<51.50}"
}
MT3: {
mode: preview
autoScroll: false
height: 5
width: 12
}
}
}
}

View File

@ -685,7 +685,7 @@ exports.MenuModule = class MenuModule extends PluginModule {
}
if (appendMultiLine && view instanceof MultiLineEditTextView) {
view.addText(text);
view.setAnsi(text);
} else {
view.setText(text);
}

View File

@ -14,6 +14,9 @@ const UserProps = require('./user_property');
const Log = require('./logger');
const Config = require('./config.js').get;
const { Errors } = require('./enig_error');
const { pipeToAnsi } = require('./color_codes');
const MultiLineEditTextView =
require('./multi_line_edit_text_view').MultiLineEditTextView;
// deps
const async = require('async');
@ -112,7 +115,6 @@ exports.getModule = class WaitingForCallerModule extends MenuModule {
return this._confirmKickSelectedNode(cb);
},
kickNodeYes: (formData, extraArgs, cb) => {
//this._startRefreshing();
return this._kickSelectedNode(cb);
},
kickNodeNo: (formData, extraArgs, cb) => {
@ -232,9 +234,14 @@ exports.getModule = class WaitingForCallerModule extends MenuModule {
if (item) {
const nodeStatusSelectionFormat =
this.config.nodeStatusSelectionFormat || '{text}';
nodeStatusSelectionView.setText(
stringFormat(nodeStatusSelectionFormat, item)
);
const s = stringFormat(nodeStatusSelectionFormat, item);
if (nodeStatusSelectionView instanceof MultiLineEditTextView) {
nodeStatusSelectionView.setAnsi(pipeToAnsi(s, this.client));
} else {
nodeStatusSelectionView.setText(s);
}
}
}

View File

@ -92,7 +92,7 @@ The following MCI codes are available:
* `freeMemoryBytes`: Free system memory in bytes.
* `systemAvgLoad`: System average load.
* `systemCurrentLoad`: System current load.
* `newPrivateMail`: Number of new **privae** mail for current user.
* `newPrivateMail`: Number of new **private** mail for current user.
* `newMessagesAddrTo`: Number of new messages **addressed to the current user**.
* `availIndicator`: Is the current user availalbe? Displayed via `statusAvailableIndicators` or system theme. See also [Themes](../art/themes.md).
* `visIndicator`: Is the current user visible? Displayed via `statusVisibleIndicators` or system theme. See also [Themes](../art/themes.md).