+ } else if (tui.mode.name == 'admin_thing_protect' && event.key == 'Enter') {
+ if (tui.inputEl.value.length != 1) {
+ tui.log_msg('@ entered non-single-char, therefore aborted');
+ } else {
+ server.send(['THING_PROTECTION', tui.selected_thing_id, tui.inputEl.value])
+ tui.log_msg('@ sent new protection character for thing');
+ }
+ tui.switch_mode('admin');