Merge with master
This commit is contained in:
@@ -42,6 +42,10 @@ function ClientTerminal(output) {
|
||||
},
|
||||
set: function (enc) {
|
||||
if (iconv.encodingExists(enc)) {
|
||||
Log.info(
|
||||
{ encoding: enc, currentEncoding: outputEncoding },
|
||||
'Setting client encoding.'
|
||||
);
|
||||
outputEncoding = enc;
|
||||
} else {
|
||||
Log.warn({ encoding: enc }, 'Unknown encoding');
|
||||
|
||||
@@ -16,6 +16,7 @@ const iconv = require('iconv-lite');
|
||||
|
||||
exports.login = login;
|
||||
exports.login2FA_OTP = login2FA_OTP;
|
||||
exports.setClientEncoding = setClientEncoding;
|
||||
exports.logoff = logoff;
|
||||
exports.prevMenu = prevMenu;
|
||||
exports.nextMenu = nextMenu;
|
||||
@@ -241,6 +242,16 @@ function nextArea(callingMenu, formData, extraArgs, cb) {
|
||||
);
|
||||
}
|
||||
|
||||
function setClientEncoding(callingMenu, formData, extraArgs, cb) {
|
||||
// TODO: Also add other encoding types
|
||||
const client = callingMenu.client;
|
||||
let encoding = formData.value.encoding;
|
||||
|
||||
client.term.outputEncoding = encoding;
|
||||
|
||||
return callingMenu.nextMenu(cb);
|
||||
}
|
||||
|
||||
function sendForgotPasswordEmail(callingMenu, formData, extraArgs, cb) {
|
||||
const username = formData.value.username || callingMenu.client.user.username;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user