Commit Graph

33 Commits

Author SHA1 Message Date
57fa54e77d fix(frontend): animate the lesson moves
The pit animator sends the same board model, changed, at every step, so
React skipped the lesson page's updates and only the first step showed.
Each update now gets a new model.
2026-10-16 16:05:39 +03:00
f8ce8f215f feat(frontend): show hints in games against the bot
With hints on, the player's pits show whether their move gives an extra turn
or how many stones it takes, and a line under the board says what the last
move did and why. A Hints switch appears only in games against the bot.
2026-10-16 14:58:56 +03:00
d444447425 feat(frontend): offer the tutorial to newcomers and a practice game
The home page shows newcomers a banner to start the lessons; it goes away for
good after Not now, a lesson or a game. The lessons end with a practice game
against the Easy bot with hints on.
2026-10-16 14:55:51 +03:00
9beb8ba7d4 feat(frontend): add the lessons
Six lessons, one per rule, on the real board with the TypeScript engine: a
task, the move animated, praise or an explanation and a retry. Completed
lessons are remembered on the device.
2026-10-16 14:55:07 +03:00
8511e0b3f2 feat(frontend): show the rules
A How to play page with every rule and a before/after board computed by the
engine, a help button in the header, and the rules in a side panel over the
game page so a game can go on while a rule is looked up.
2026-10-16 14:53:18 +03:00
e66c4a3a41 feat(frontend): offer games against the bot
The lobby offers the bot levels after 10 seconds without an opponent, the
home page has a Play with bot menu, and a game against the bot ends with
Play again at the same level.
2026-10-16 14:22:04 +03:00
d8ea5d00f8 Merge branch 'feature/keycloak-theme' into develop 2026-10-16 10:38:12 +03:00
9619825605 feat(frontend): lay out the home page in the new design
The game in progress comes first with a large mini board; live,
popular and recent games are grids of cards with the score, a mini
board and a status pill. Live and popular games are shown together;
live games are hidden while nothing is being played.
2026-10-16 10:21:46 +03:00
ce27c71176 feat(frontend): lay out the replay page in the new design
A summary card with the result, date, duration, move count, players and
score; players and the move number beside the board; a controls card
with the transport buttons, speed, timeline and the shown move with its
tags; the landing pit of the shown move is ringed.
2026-10-16 10:19:57 +03:00
efe97da0b7 feat(frontend): lay out the game page in the new design
Players beside the board with avatar, online status, store count and
clock, the turn between them, a game-over card over the board, and a
move list with the newest move first and tags for extra turns,
captures and store gains. On phones the bottom player is shown below
the board.
2026-10-16 09:41:47 +03:00
e3e7916265 feat(frontend): draw the new board
Pits and stores are wells with scattered stones and count badges, the
viewer's store on the right. Below 600 px the board stands upright.
Playable pits preview their move on hover, animated pits are ringed and
the pit of the last move has a dashed ring.
2026-10-16 09:37:50 +03:00
6279b5a820 feat(frontend): add the new themes and header
Ceviz, Gece and Yeşim themes as CSS variables on <html>, Bricolage
Grotesque, shared styles, and one header for every page with theme
swatches, the account menu and the page's main action. The lobby,
privacy page and status panels use the new look.
2026-10-16 09:35:39 +03:00
08fc5c8b7b fix(frontend): confirm leaving a game with Yes and go home
The dialog's buttons were in the wrong order and its result was read inverted; leaving now needs Yes and returns to the home page.
2026-10-16 09:26:02 +03:00
8671bb2553 feat(frontend): show the clocks in replays
Each player's clock after the shown move, from the saved move times; games saved before the game clock show none.
2026-10-16 01:40:05 +03:00
20359b7a8f feat(frontend): show the game clocks in live games
Both clocks sit next to the players' names and count down in server time; the running one is highlighted and turns red under 30 seconds. They replace the offline countdown, so core drops TURN_TIMEOUT_MS, INACTIVE_TIMEOUT_MS, offlineSince and its text. Long info texts wrap on phones.
2026-10-16 01:39:36 +03:00
6e6d37650d feat(frontend): open Keycloak pages in the app's language
Login and sign-up redirects pass the current language as ui_locales.
2026-10-16 01:13:20 +03:00
3bb151dbed feat(frontend): replay finished games move by move
- Opening a finished game shows its final position, result, score, date
  and duration, with Watch from start
- First / previous / play-pause / next / last, speed 1x, 2x, 4x, a
  timeline, the move list and arrow keys and space
- Stepping forward animates the move like a live game; jumps show the
  position directly
- ?move=n links to a move and follows the shown move
- Players see the board from their own side
- PitAnimator takes its step interval as a parameter
2026-10-16 00:34:49 +03:00
aa265f7e6c feat(frontend): show the moves of a live game and let players look back
- Move list under the board with player, pit and what happened (extra
  turn, capture, stones to the store, game over); collapsed on phones
- Selecting a move or using the arrow keys shows that position with a
  banner and Back to live; pits are locked meanwhile and the banner says
  when it is your turn
- Countdown while the opponent is offline on their turn
- on_game_end is handled, so games that end by timeout or inactivity end
  on the page with the reason
2026-10-16 00:31:43 +03:00
a65662f695 feat(frontend): show ongoing, live, popular and recent games on the home page
- Banner for the user's game in progress with a Continue button
- Live games as cards with the real board, updated over WebSocket; the
  most watched finished games when nothing is live
- The user's last 3 games, from their side of the board, with the result
  as they would say it
- The lobby offers to continue the game in progress when a new one is
  refused
- Spectators register once connected and identified, and again after a
  reconnect, so they are counted
- The backend includes games that ended but are not saved yet in /game/:id
  and the lists
2026-10-16 00:27:06 +03:00
9278ed7447 feat(frontend): let the board render at any width
Board components size themselves from a --board-unit CSS variable instead
of vw. By default it is 1vw, so the game page looks the same; with the new
width prop the same board renders small, e.g. in previews.
2026-10-16 00:21:53 +03:00
f5dcf930fa feat(frontend): log in with Keycloak, as a guest or with an account
- First visit logs in as a new guest through Keycloak without a form;
  the session, including an offline refresh token, is kept in local storage
- Account menu on the home page: guests can log in or sign up, users can
  log out (which starts a new guest session)
- The WebSocket client in core authenticates with the access token after
  connecting, reports "connected" once the server accepts it, and re-sends
  renewed tokens on the open connection
- Game page shows player names; guests appear as "Guest 4F2A"
- Auth channels, AuthUser and player names in UserConnectionInfo move to
  core and the backend uses them from there
- Mobile keeps using userKey login for now
2026-10-14 02:22:13 +03:00
e165b0a0eb build: use local mancala.js and @mancala/core packages
- Apps and @mancala/core depend on the packages in this repo through
  link: dependencies instead of the npm releases, so changes no longer
  need a publish
- Root package.json gets a build:packages script that installs and
  builds both packages
- Backend and frontend Docker images are built from the repo root so
  they can include the packages; compose builds them that way
- Metro watches the packages folder and resolves their imports from the
  app's node_modules
2026-10-14 02:09:05 +03:00
69664796ce feat(mobile): implement "Rejoin Game" functionality and fix storage bugs 2026-07-16 02:00:25 +03:00
0be96a6229 fix: display stone count immediately on board pits 2026-07-04 11:54:31 +03:00
ca92b20b59 feat(frontend): display stone count in pit 2026-05-26 00:31:59 +03:00
230dd0ecff chore(frontend): upgrade uuid version 2024-12-22 02:02:44 +03:00
3f5db4be22 fix(frontend): update websocket server default address 2024-12-22 00:55:20 +03:00
9c42f867e9 v0.4.7 2024-12-08 23:26:17 +03:00
5d4ce2799c fix(frontend): env variable 2024-12-08 23:24:22 +03:00
0c96056f84 v0.4.6 2024-12-08 22:49:21 +03:00
9dedc31626 fea(frontend): add WS_SERVER_ADDRESS env 2024-12-08 22:47:02 +03:00
734417b0a6 (frontend) add docker file 2024-10-04 23:31:55 +03:00
7860f9aac4 (refactor) change folder structure 2024-06-18 01:11:26 +03:00