add visual rating guide (#48)

This commit is contained in:
2026-11-06 21:52:07 +01:00
parent 64a9210580
commit f2d886d602
8 changed files with 178 additions and 5 deletions
@@ -16,9 +16,7 @@ defmodule ChesstrainerWeb.EndgameLive.Play do
{@endgame.color |> Atom.to_string() |> String.capitalize()} to move · Rating: {round(
@endgame.rating
)} · Attempts: {@endgame.times_attempted ||
0} · Solved: {@endgame.times_solved || 0}<span :if={@user_rating}> · Your rating: {round(
@user_rating
)}</span>
0} · Solved: {@endgame.times_solved || 0}
<p class="text-xs text-muted flex items-center mt-1">
<span>FEN: {@endgame.fen}</span>
<button
@@ -42,6 +40,10 @@ defmodule ChesstrainerWeb.EndgameLive.Play do
</:actions>
</.header>
<div :if={@user_rating} class="mb-4">
<.rating_guide rating={@user_rating} deviation={@user_deviation} />
</div>
<PlayComponents.play_surface
endgame={@endgame}
status={@status}