minor code improvements
This commit is contained in:
2
resources/js/jquery-3.5.1.slim.min.js
vendored
2
resources/js/jquery-3.5.1.slim.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -103,11 +103,9 @@ public class Application {
|
||||
}
|
||||
|
||||
private static void sendPlan(HttpExchange client) throws IOException {
|
||||
HashMap<String, String> params = inflate(client.getRequestBody().readAllBytes());
|
||||
try {
|
||||
if (!params.isEmpty()) {
|
||||
send(client,plan.process(params));
|
||||
} else send(client,plan.html());
|
||||
HashMap<String, String> params = inflate(client.getRequestBody().readAllBytes());
|
||||
send(client,params.isEmpty() ? plan.html() : plan.process(params));
|
||||
} catch (Exception e) {
|
||||
LOG.error("Error during sendPlan(): {}",e);
|
||||
send(client,new Page().append(e.getMessage()));
|
||||
|
||||
@@ -295,6 +295,8 @@ public class Plan {
|
||||
StringBuffer tiles = new StringBuffer();
|
||||
tiles.append(new StraightH().tag(null));
|
||||
tiles.append(new StraightV().tag(null));
|
||||
tiles.append(new BlockH().tag(null));
|
||||
tiles.append(new BlockV().tag(null));
|
||||
tiles.append(new DiagES().tag(null));
|
||||
tiles.append(new DiagSW().tag(null));
|
||||
tiles.append(new DiagNE().tag(null));
|
||||
@@ -314,8 +316,6 @@ public class Plan {
|
||||
tiles.append(new CrossH().tag(null));
|
||||
tiles.append(new CrossV().tag(null));
|
||||
tiles.append(new Eraser().tag(null));
|
||||
tiles.append(new BlockH().tag(null));
|
||||
tiles.append(new BlockV().tag(null));
|
||||
return new Tag("div").clazz("list").content(tiles.toString()).addTo(tileMenu);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user