feat(web): ui improvements
- flex-wrap elements - refine output table - reset state
This commit is contained in:
@@ -28,7 +28,9 @@
|
||||
</script>
|
||||
|
||||
{#await data}
|
||||
<div class="flex items-center justify-center gap-2 p-6 text-gray-600">
|
||||
<div
|
||||
class="flex items-center justify-center gap-2 text-gray-600 max-w-full"
|
||||
>
|
||||
Solving...
|
||||
{#if progress}
|
||||
<span class="text-sm">
|
||||
@@ -37,7 +39,7 @@
|
||||
{/if}
|
||||
</div>
|
||||
{:then d}
|
||||
<div class="overflow-x-auto rounded-lg border border-gray-500 shadow-sm">
|
||||
<div class="rounded-lg border border-gray-500 shadow-sm max-w-full">
|
||||
<table class="w-full text-left text-sm text-gray-700">
|
||||
<thead class="bg-gray-800 text-xs uppercase text-gray-600">
|
||||
<tr>
|
||||
@@ -46,7 +48,7 @@
|
||||
<th
|
||||
class="px-4 py-3 math-header"
|
||||
title="The probability that this word is the solution."
|
||||
{@attach renderMath("p(x=\\text{word})")}
|
||||
{@attach renderMath("p(x)")}
|
||||
></th>
|
||||
<th
|
||||
title="The expected information to gain when guessing this word."
|
||||
@@ -73,15 +75,15 @@
|
||||
>
|
||||
<td class="px-4 py-3 font-bold">#{i + 1}</td>
|
||||
<td class="px-4 py-3 font-bold">{s.word}</td>
|
||||
<td class="px-4 py-3"
|
||||
>{s.solution_probability.toFixed(3)}</td
|
||||
>
|
||||
<td class="px-4 py-3"
|
||||
>{s.expected_information_gained.toFixed(3)}</td
|
||||
>
|
||||
<td class="px-4 py-3"
|
||||
>{s.expected_score_after_guess.toFixed(3)}</td
|
||||
>
|
||||
<td class="px-4 py-3">
|
||||
{(s.solution_probability * 100).toFixed(2) + "%"}
|
||||
</td>
|
||||
<td class="px-4 py-3">
|
||||
{s.expected_information_gained.toFixed(2)} bits
|
||||
</td>
|
||||
<td class="px-4 py-3">
|
||||
{s.expected_score_after_guess.toFixed(3)}
|
||||
</td>
|
||||
</tr>
|
||||
{/each}
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user