Skip to content

Commit

Permalink
chore(0pdd): fixed Qulice warning
Browse files Browse the repository at this point in the history
  • Loading branch information
nergal-perm committed Oct 1, 2024
1 parent a35281e commit c9f4326
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/main/java/ru/ewc/checklogic/server/CommandMetadata.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,14 @@ public CommandMetadata(final Map<String, List<String>> metadata) {
*/
public String namesAsHtmlList(final ServerInstance computation, final String outcome) {
return this.names.stream().sorted().map(
command -> """
<div class="col-4 px-2">
<button class="btn %2$s col-12"
hx-get="/command" hx-target="body" hx-swap="beforeend"
hx-vals='{"command":"%1$s"}'>%1$s</button>
</div>
""".formatted(command, buttonCssClass(computation, command, outcome))
command -> new StringBuilder()
.append("<div class='col-4 px-2'>")
.append("<button class='btn %2$s col-12'")
.append("hx-get='/command' hx-target='body' hx-swap='beforeend'")
.append("hx-vals='{\"command\":\"%1$s\"}'>%1$s</button>")
.append("</div>")
.toString()
.formatted(command, buttonCssClass(computation, command, outcome))
).collect(Collectors.joining());
}

Expand Down

0 comments on commit c9f4326

Please sign in to comment.