Fix: mime to see marks; reverse actions order; hide endturn button

This commit is contained in:
Grail Finder
2025-09-11 18:42:41 +03:00
parent 6daab9cb1a
commit 1664c26c0a
4 changed files with 14 additions and 28 deletions

View File

@@ -9,6 +9,8 @@ import (
"log/slog"
"net/http"
"os"
"slices"
"strings"
)
var (
@@ -55,6 +57,12 @@ func HandleHome(w http.ResponseWriter, r *http.Request) {
} else {
fi.Room.GuesserView()
}
// reverse actions if first action
if len(fi.Room.ActionHistory) > 1 {
if strings.EqualFold(fi.Room.ActionHistory[0].Action, models.ActionTypeGameStarted) {
slices.Reverse(fi.Room.ActionHistory)
}
}
}
if fi != nil && fi.Room == nil {
rooms, err := repo.RoomList(r.Context())