mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-10 06:34:41 +02:00
Good progress on 2FA/OTP config
This commit is contained in:
parent
b62f55961f
commit
8802ae24ba
7 changed files with 230 additions and 10 deletions
|
@ -35,11 +35,16 @@ util.inherits(ToggleMenuView, MenuView);
|
|||
ToggleMenuView.prototype.redraw = function() {
|
||||
ToggleMenuView.super_.prototype.redraw.call(this);
|
||||
|
||||
if(0 === this.items.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
//this.cachePositions();
|
||||
|
||||
this.client.term.write(this.hasFocus ? this.getFocusSGR() : this.getSGR());
|
||||
|
||||
assert(this.items.length === 2);
|
||||
assert(this.items.length === 2, 'ToggleMenuView must contain exactly (2) items');
|
||||
|
||||
for(var i = 0; i < 2; i++) {
|
||||
var item = this.items[i];
|
||||
var text = strUtil.stylizeString(
|
||||
|
@ -102,7 +107,7 @@ ToggleMenuView.prototype.onKeyPress = function(ch, key) {
|
|||
if(key) {
|
||||
if(this.isKeyMapped('right', key.name) || this.isKeyMapped('down', key.name)) {
|
||||
this.focusNext();
|
||||
} else if(this.isKeyMapped('left', key.name) || this.isKeyMapped('up', key.nam4e)) {
|
||||
} else if(this.isKeyMapped('left', key.name) || this.isKeyMapped('up', key.name)) {
|
||||
this.focusPrevious();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue