panel fix

This commit is contained in:
Michael Wain 2024-03-13 17:56:11 +03:00
parent d027e13595
commit ed3cae9c33
3 changed files with 3 additions and 3 deletions

View File

@ -200,7 +200,7 @@ public class BunkerBot extends TelegramLongPollingBot {
p.setLuggage((Luggage) BotUtils.getRandomFromList(luggs, random)); p.setLuggage((Luggage) BotUtils.getRandomFromList(luggs, random));
p.setHobby((Hobby) BotUtils.getRandomFromList(hobbies, random)); p.setHobby((Hobby) BotUtils.getRandomFromList(hobbies, random));
p.setHealth((Health) BotUtils.getRandomFromList(healths, random)); p.setHealth((Health) BotUtils.getRandomFromList(healths, random));
if( random.nextBoolean() ) { if( true ) { // random.nextBoolean()
p.setScripts(Arrays.asList((ActionScript) BotUtils.getRandomFromList(scripts, random))); p.setScripts(Arrays.asList((ActionScript) BotUtils.getRandomFromList(scripts, random)));
} else { } else {
p.setScripts(new ArrayList<>()); p.setScripts(new ArrayList<>());

View File

@ -103,7 +103,7 @@ public class DatabaseController {
} }
private void saveAction(Map<String, String> params) { private void saveAction(Map<String, String> params) {
String scriptBody = params.get("action_body_text"); String scriptBody = new String(HashUtils.decodeHexString(params.get("action_body_text")));
String name_text = new String(HashUtils.decodeHexString(params.get("action_name_text"))); String name_text = new String(HashUtils.decodeHexString(params.get("action_name_text")));
TextDataVal t1 = textDataValService.save(new TextDataVal(name_text)); TextDataVal t1 = textDataValService.save(new TextDataVal(name_text));

View File

@ -15,7 +15,7 @@ function grab_form() {
let query = ""; let query = "";
if(input.attr("type") == "checkbox") { if(input.attr("type") == "checkbox") {
query = input.attr('id') + "=" + input.is(':checked'); query = input.attr('id') + "=" + input.is(':checked');
} else if(input.attr("type") == "text") { } else if(input.attr("type") == "text" || input.attr("id") == "action_body_text") {
var vv = str_toHex(input.val()); var vv = str_toHex(input.val());
query = input.attr('id') + "=" + vv; query = input.attr('id') + "=" + vv;
} else { } else {