diff --git a/Cargo.lock b/Cargo.lock index b9533db..72f1a21 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -124,7 +124,7 @@ dependencies = [ "bytes", "form_urlencoded", "futures-util", - "http 1.4.1", + "http 1.4.0", "http-body", "http-body-util", "hyper", @@ -157,7 +157,7 @@ checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1" dependencies = [ "bytes", "futures-core", - "http 1.4.1", + "http 1.4.0", "http-body", "http-body-util", "mime", @@ -189,7 +189,7 @@ dependencies = [ [[package]] name = "backbone-lib" -version = "0.2.16" +version = "0.2.15" dependencies = [ "bytes", "ewebsock", @@ -222,9 +222,9 @@ checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" [[package]] name = "bitflags" -version = "2.13.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8" +checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" [[package]] name = "blake2" @@ -295,9 +295,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.2.63" +version = "1.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "556e016178bb5662a08681bbe0f00f8e17631781a4dfc8c45e466e4b185ec27f" +checksum = "a1dce859f0832a7d088c4f1119888ab94ef4b5d6795d1ce05afb7fe159d79f98" dependencies = [ "find-msvc-tools", "shlex", @@ -322,9 +322,9 @@ dependencies = [ [[package]] name = "cmov" -version = "0.5.4" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9ea0ac24bc397ab3c98583a3c9ba74fa56b09a4449bbe172b9b1ddb016027a" +checksum = "3f88a43d011fc4a6876cb7344703e297c71dda42494fee094d5f7c76bf13f746" [[package]] name = "cobs" @@ -651,9 +651,9 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.6" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", @@ -1007,7 +1007,7 @@ dependencies = [ "futures-core", "futures-sink", "gloo-utils", - "http 1.4.1", + "http 1.4.0", "js-sys", "pin-project", "serde", @@ -1162,9 +1162,9 @@ dependencies = [ [[package]] name = "http" -version = "1.4.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8be7462df143984c4598a256ef469b251d7d7f9e271135073e78fc535414f3d0" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" dependencies = [ "bytes", "itoa", @@ -1177,7 +1177,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.4.1", + "http 1.4.0", ] [[package]] @@ -1188,7 +1188,7 @@ checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ "bytes", "futures-core", - "http 1.4.1", + "http 1.4.0", "http-body", "pin-project-lite", ] @@ -1236,15 +1236,15 @@ dependencies = [ [[package]] name = "hyper" -version = "1.10.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55281c53a1894c864990125767da440a4e630446785086f52523b20033b74498" +checksum = "6299f016b246a94207e63da54dbe807655bf9e00044f73ded42c3ac5305fbcca" dependencies = [ "atomic-waker", "bytes", "futures-channel", "futures-core", - "http 1.4.1", + "http 1.4.0", "http-body", "httparse", "httpdate", @@ -1261,7 +1261,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" dependencies = [ "bytes", - "http 1.4.1", + "http 1.4.0", "http-body", "hyper", "pin-project-lite", @@ -1313,7 +1313,7 @@ dependencies = [ "displaydoc", "potential_utf", "utf8_iter", - "yoke 0.8.3", + "yoke 0.8.2", "zerofrom", "zerovec 0.11.6", ] @@ -1613,7 +1613,7 @@ dependencies = [ "displaydoc", "icu_locale_core", "writeable 0.6.3", - "yoke 0.8.3", + "yoke 0.8.2", "zerofrom", "zerotrie 0.2.4", "zerovec 0.11.6", @@ -2069,9 +2069,9 @@ checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] name = "libredox" -version = "0.1.17" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f02ab6bace2054fb888a3c16f990117b579d14a3088e472d63c6011fa185c9d3" +checksum = "e02f3bb43d335493c96bf3fd3a321600bf6bd07ed34bc64118e9293bdffea46c" dependencies = [ "libc", ] @@ -2112,9 +2112,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.32" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953f07c43838f8e6f9758cab68bf5bed85465e7587ebe0b823f1bcd81978ad3a" +checksum = "616ec5685824bcc94416c6d4a7a446eea774a31efd7062c8480ba6fd06d7a6e5" [[package]] name = "manyhow" @@ -2166,9 +2166,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.8.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b947ae49db0d222b1dbc6b113ce7248a3fc3a6ca21b696717bfc000ba4484d8" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] name = "merge" @@ -2220,9 +2220,9 @@ dependencies = [ [[package]] name = "mio" -version = "1.2.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02bd0af71c67b473010cbbc60715ee815645a4dc942899111f494b4b737d6fda" +checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" dependencies = [ "libc", "wasi 0.11.1+wasi-snapshot-preview1", @@ -2658,7 +2658,7 @@ dependencies = [ [[package]] name = "protocol" -version = "0.2.16" +version = "0.2.15" dependencies = [ "serde", ] @@ -2911,7 +2911,7 @@ checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "relay-server" -version = "0.2.16" +version = "0.2.15" dependencies = [ "argon2", "axum", @@ -3175,7 +3175,7 @@ dependencies = [ "dashmap", "futures", "gloo-net 0.6.0", - "http 1.4.1", + "http 1.4.0", "js-sys", "once_cell", "pin-project-lite", @@ -3262,9 +3262,9 @@ dependencies = [ [[package]] name = "shlex" -version = "2.0.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" @@ -3305,9 +3305,9 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "socket2" -version = "0.6.4" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52d1cfed4120b4d927bf7c0f86d2087a4a7d6027c906d9f9d525a80573b9be51" +checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" dependencies = [ "libc", "windows-sys 0.61.2", @@ -3752,7 +3752,7 @@ dependencies = [ "axum-core", "cookie", "futures-util", - "http 1.4.1", + "http 1.4.0", "parking_lot", "pin-project-lite", "tower-layer", @@ -3769,7 +3769,7 @@ dependencies = [ "bytes", "futures-core", "futures-util", - "http 1.4.1", + "http 1.4.0", "http-body", "http-body-util", "http-range-header", @@ -3803,7 +3803,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a05911f23e8fae446005fe9b7b97e66d95b6db589dc1c4d59f6a2d4d4927d3" dependencies = [ "async-trait", - "http 1.4.1", + "http 1.4.0", "time", "tokio", "tower-cookies", @@ -3824,7 +3824,7 @@ dependencies = [ "axum-core", "base64 0.22.1", "futures", - "http 1.4.1", + "http 1.4.0", "parking_lot", "rand 0.8.6", "serde", @@ -3921,7 +3921,7 @@ dependencies = [ [[package]] name = "trictrac-store" -version = "0.2.16" +version = "0.2.15" dependencies = [ "anyhow", "base64 0.21.7", @@ -3934,7 +3934,7 @@ dependencies = [ [[package]] name = "trictrac-web" -version = "0.2.16" +version = "0.2.15" dependencies = [ "backbone-lib", "futures", @@ -3967,7 +3967,7 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http 1.4.1", + "http 1.4.0", "httparse", "log", "rand 0.8.6", @@ -3984,7 +3984,7 @@ checksum = "6c01152af293afb9c7c2a57e4b559c5620b421f6d133261c60dd2d0cdb38e6b8" dependencies = [ "bytes", "data-encoding", - "http 1.4.1", + "http 1.4.0", "httparse", "log", "rand 0.9.4", @@ -4014,9 +4014,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.20.1" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" +checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" [[package]] name = "ucd-trie" @@ -4059,9 +4059,9 @@ checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d" [[package]] name = "unicode-segmentation" -version = "1.13.3" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" +checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c" [[package]] name = "unicode-width" @@ -4131,9 +4131,9 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "uuid" -version = "1.23.2" +version = "1.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d258b83ceec21034727ecee8c382cfa6c3e133699b0742c64571814fb420c9f7" +checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76" dependencies = [ "getrandom 0.4.2", "js-sys", @@ -4643,9 +4643,9 @@ dependencies = [ [[package]] name = "yoke" -version = "0.8.3" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" +checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" dependencies = [ "stable_deref_trait", "yoke-derive 0.8.2", @@ -4678,18 +4678,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.50" +version = "0.8.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b065d4f0e55f82fae73202e189638116a87c55ab6b8e6c2721e13dd9d854ad1" +checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.50" +version = "0.8.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b631b19d36a892ab55420c92dbc83ccd79274f25be714855d3074aa71cab639" +checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" dependencies = [ "proc-macro2", "quote", @@ -4741,7 +4741,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" dependencies = [ "displaydoc", - "yoke 0.8.3", + "yoke 0.8.2", "zerofrom", ] @@ -4762,7 +4762,7 @@ version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" dependencies = [ - "yoke 0.8.3", + "yoke 0.8.2", "zerofrom", "zerovec-derive 0.11.3", ] diff --git a/Cargo.toml b/Cargo.toml index f8efdb7..52537ac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "0.2.18" +version = "0.2.16" [workspace] resolver = "2" diff --git a/clients/backbone-lib/src/lib.rs b/clients/backbone-lib/src/lib.rs index 48f478f..d67a96c 100644 --- a/clients/backbone-lib/src/lib.rs +++ b/clients/backbone-lib/src/lib.rs @@ -1,9 +1,9 @@ -pub mod platform; pub mod session; pub mod traits; mod client; mod host; +mod platform; mod protocol; pub use session::{ConnectError, GameSession, RoomConfig, RoomRole, SessionEvent}; diff --git a/clients/web/assets/style.css b/clients/web/assets/style.css index 665aac9..86e7cb8 100644 --- a/clients/web/assets/style.css +++ b/clients/web/assets/style.css @@ -783,8 +783,7 @@ a:hover { text-decoration: underline; } overflow: hidden; text-overflow: ellipsis; white-space: nowrap; - min-width: 4em; - text-align: left; + min-width: 0; } .score-bars { display: flex; flex-direction: row; gap: 1.5rem; flex: 1; align-items: center; } @@ -839,8 +838,8 @@ a:hover { text-decoration: underline; } } .peg-hole { - width: 14px; - height: 14px; + width: 10px; + height: 10px; border-radius: 50%; border: 1.5px solid rgba(138,106,40,0.45); background: rgba(0,0,0,0.06); @@ -848,6 +847,12 @@ a:hover { text-decoration: underline; } transition: background 0.3s ease-out, border-color 0.3s, box-shadow 0.3s; } +.peg-hole.filled { + background: var(--ui-gold); + border-color: var(--ui-gold-dark); + box-shadow: 0 0 4px rgba(200,164,72,0.6); +} + .bredouille-badge { font-size: 0.62rem; font-weight: 500; @@ -859,10 +864,22 @@ a:hover { text-decoration: underline; } letter-spacing: 0.06em; cursor: default; box-shadow: 0 1px 3px rgba(0,0,0,0.25); - margin: 0.4em; } -/* ── scoreboard (both players, above board) ──────────────────── */ +/* ── Merged scoreboard (both players, above board) ──────────────────── */ +.merged-score-panel { + background: var(--ui-parchment); + border-radius: 5px; + padding: 0.5rem 1.25rem 0.45rem; + font-size: 0.88rem; + box-shadow: 0 2px 6px rgba(0,0,0,0.25); + width: 100%; + border-top: 2px solid var(--ui-gold-dark); + display: flex; + flex-direction: column; + gap: 0.2rem; +} + .score-row { display: flex; align-items: center; @@ -923,7 +940,6 @@ a:hover { text-decoration: underline; } display: flex; align-items: baseline; gap: 0.1rem; - direction: ltr; } .pts-counter { @@ -945,6 +961,33 @@ a:hover { text-decoration: underline; } padding-bottom: 2px; } +/* ── Hole pegs — larger and coloured (me = green, opp = red) ─────────── */ +.merged-score-panel .peg-track { + gap: 4px; +} + +.merged-score-panel .peg-hole { + width: 14px; + height: 14px; + border-radius: 50%; + border: 1.5px solid rgba(138,106,40,0.3); + background: rgba(0,0,0,0.06); + flex-shrink: 0; + transition: background 0.3s ease-out, border-color 0.3s, box-shadow 0.3s; +} + +.merged-score-panel .peg-hole.filled { + background: #5aab38; + border-color: #3a7828; + box-shadow: 0 0 5px rgba(90,171,56,0.55); +} + +.merged-score-panel .peg-hole.peg-opp.filled { + background: #c05030; + border-color: #8a3018; + box-shadow: 0 0 5px rgba(192,80,48,0.55); +} + /* Peg pop-in animation when a new hole is scored */ @keyframes peg-pop { 0% { transform: scale(0.15); opacity: 0; } @@ -953,6 +996,10 @@ a:hover { text-decoration: underline; } 100% { transform: scale(1.0); opacity: 1; } } +.merged-score-panel .peg-hole.peg-new { + animation: peg-pop 0.52s cubic-bezier(0.22, 0.61, 0.36, 1) forwards; +} + /* Thin separator between the two player rows */ .score-row-sep { height: 1px; @@ -960,6 +1007,31 @@ a:hover { text-decoration: underline; } margin: 0.05rem 0; } +/* ── Non-blocking hole flash (replaces old toast) ───────────────────── */ +@keyframes hole-flash-in-out { + 0% { opacity: 0; transform: translateY(-3px); } + 14% { opacity: 1; transform: translateY(0); } + 65% { opacity: 1; } + 100% { opacity: 0; transform: translateY(2px); } +} + +.hole-flash { + margin-left: auto; + flex-shrink: 0; + white-space: nowrap; + font-family: var(--font-display); + font-size: 0.88rem; + font-weight: 600; + color: var(--ui-green-accent); + letter-spacing: 0.05em; + animation: hole-flash-in-out 2.5s ease-out forwards; + pointer-events: none; +} + +.hole-flash.hole-flash-bredouille { + color: var(--ui-gold-dark); +} + /* ── Game bottom strip — status, hints, buttons on cream ────────────── */ .game-bottom-strip { background: var(--ui-parchment); @@ -2250,8 +2322,9 @@ a:hover { text-decoration: underline; } gap: 0.5rem; } -.strip-player { display: flex; justify-content: flex-end; align-items: center; flex: 1; min-width: 0; } -.strip-player-left { } +.strip-player { display: flex; align-items: center; flex: 1; min-width: 0; } +.strip-player-left { justify-content: flex-end; } +.strip-player-right { justify-content: flex-start; } .strip-active-zone { display: flex; @@ -2289,7 +2362,8 @@ a:hover { text-decoration: underline; } } /* Strip peg overrides */ -.players-strip .peg-track { gap: 3px; direction: ltr; } +.players-strip .peg-track { gap: 3px; } +.players-strip .peg-hole { width: 12px; height: 12px; } .players-strip .peg-hole.filled { background: #5aab38; border-color: #3a7828; box-shadow: 0 0 5px rgba(90,171,56,0.55); @@ -2330,23 +2404,16 @@ a:hover { text-decoration: underline; } } /* ── Controls column (sidebar on wide, row on narrow) ────────────────── */ -/* left-control displayed only on wide screen to center board */ -.controls, .left-controls { +.controls { display: flex; flex-direction: column; gap: 0.5rem; align-self: stretch; } -@media (min-width: 1120px) { - .left-controls { - width: 200px; - } -} @media (min-width: 920px) { .controls { width: 200px; } - .strip-player-right { direction: rtl; } } .ctrl-dice { @@ -2393,6 +2460,7 @@ a:hover { text-decoration: underline; } justify-content: space-around; align-items: center; gap: 0.4rem; + flex: 1; min-width: 0; } .ctrl-status .game-status { @@ -2435,11 +2503,6 @@ a:hover { text-decoration: underline; } margin: 0; } -@media (max-width: 1119px) { - .left-controls { - width: 0; - } - } /* ── Responsive: ≤919px → controls becomes a bottom bar ─────────────── */ @media (max-width: 919px) { .main-body { @@ -2451,7 +2514,6 @@ a:hover { text-decoration: underline; } width: 100%; } .ctrl-status { flex: 1; } - .strip-center { display: none; } - /* move second player below first player */ - .players-strip { flex-flow: column; } + /* Hide pegs on small screens to save space in the strip */ + .players-strip .peg-track { display: none; } } diff --git a/clients/web/locales/en.json b/clients/web/locales/en.json index 144a374..ebc5130 100644 --- a/clients/web/locales/en.json +++ b/clients/web/locales/en.json @@ -150,7 +150,7 @@ "account_deleted": "Your account has been permanently deleted.", "about": "About", "legal": "Legal notices", - "free_mode_label": "Free move mode", + "free_mode_label": "Free play mode", "free_mode_tooltip": "Select any checker and try to find a valid move yourself. If your move breaks a rule, you'll see an explanation.", "reset_move": "Try again", "err_invalid_move": "This move is not valid with the current dice", diff --git a/clients/web/locales/fr.json b/clients/web/locales/fr.json index f61290a..5889556 100644 --- a/clients/web/locales/fr.json +++ b/clients/web/locales/fr.json @@ -148,7 +148,7 @@ "account_deleted": "Votre compte a été définitivement supprimé.", "about": "À propos", "legal": "Mentions légales", - "free_mode_label": "Déplacement libre", + "free_mode_label": "Mode jeu libre", "free_mode_tooltip": "Sélectionnez n'importe quelle dame et tentez de trouver un coup valide vous-même. Si votre coup enfreint une règle, une explication s'affichera.", "reset_move": "Réessayer", "err_invalid_move": "Ce coup n'est pas valide avec les dés actuels", diff --git a/clients/web/src/app.rs b/clients/web/src/app.rs index d490e4c..ba90a54 100644 --- a/clients/web/src/app.rs +++ b/clients/web/src/app.rs @@ -696,9 +696,9 @@ fn SiteHamburger() -> impl IntoView {
Une interprétation numérique