Added system menu method to choose encoding
This commit is contained in:
parent
0b9b08eded
commit
a1d4a90e05
|
@ -16,6 +16,7 @@ const iconv = require('iconv-lite');
|
||||||
|
|
||||||
exports.login = login;
|
exports.login = login;
|
||||||
exports.login2FA_OTP = login2FA_OTP;
|
exports.login2FA_OTP = login2FA_OTP;
|
||||||
|
exports.setClientEncoding = setClientEncoding;
|
||||||
exports.logoff = logoff;
|
exports.logoff = logoff;
|
||||||
exports.prevMenu = prevMenu;
|
exports.prevMenu = prevMenu;
|
||||||
exports.nextMenu = nextMenu;
|
exports.nextMenu = nextMenu;
|
||||||
|
@ -241,6 +242,23 @@ 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.log.info(
|
||||||
|
{ encoding: encoding, currentEncoding: client.term.outputEncoding },
|
||||||
|
'Setting client encoding.'
|
||||||
|
);
|
||||||
|
|
||||||
|
encoding = encoding || client.term.outputEncoding;
|
||||||
|
|
||||||
|
client.term.outputEncoding = encoding;
|
||||||
|
|
||||||
|
return callingMenu.nextMenu(cb);
|
||||||
|
}
|
||||||
|
|
||||||
function sendForgotPasswordEmail(callingMenu, formData, extraArgs, cb) {
|
function sendForgotPasswordEmail(callingMenu, formData, extraArgs, cb) {
|
||||||
const username = formData.value.username || callingMenu.client.user.username;
|
const username = formData.value.username || callingMenu.client.user.username;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue