From 57642f2d30b27efd7c14912a65152ded7af5b029 Mon Sep 17 00:00:00 2001 From: giteaadmin Date: Fri, 19 Jun 2026 08:31:14 +0000 Subject: [PATCH] update join room --- www/html/Admin/private/store.json | 269 +++++++++++++++++- www/html/Game/data/game-timing.json | 20 +- .../Game/data/quiz-battle-leaderboard.json | 2 +- www/html/Game/public/js/customize-popup.js | 45 ++- www/html/Game/public/js/play.js | 37 ++- www/html/Game/public/js/room-lobby.js | 46 ++- www/html/Game/public/play.html | 4 +- www/html/Game/public/room-lobby.html | 4 +- www/html/Game/server.js | 42 ++- www/html/Join Room/index.html | 2 +- www/html/Join Room/join.js | 3 +- www/html/Main-Lobby/index.html | 2 +- 12 files changed, 430 insertions(+), 46 deletions(-) diff --git a/www/html/Admin/private/store.json b/www/html/Admin/private/store.json index db928b5..823d167 100644 --- a/www/html/Admin/private/store.json +++ b/www/html/Admin/private/store.json @@ -38,34 +38,36 @@ "providerUserId": "p_1775109142385_wq7wfy1p32j", "notes": "auto: player-coins", "blocked": false, - "coins": 815, + "coins": 897, "createdAt": "2026-04-02T05:52:21+00:00", - "updatedAt": "2026-06-18T15:59:38+00:00", + "updatedAt": "2026-06-19T07:10:26+00:00", "daily": { "anchorMs": 1781197200000, "claimedDays": [ true, true, - false, + true, false, false, false, false ], - "lockUntilMs": 0 + "lockUntilMs": 1781888400000 }, - "score": 730, + "score": 792, "scoreByCase": { - "1": 10, - "10": 310, + "1": 16, + "10": 320, "8": 220, "11": 20, - "13": 20, + "13": 40, "14": 20, "9": 40, "12": 60, "15": 20, - "4": 10 + "4": 10, + "5": 20, + "7": 6 }, "lbName": "Q", "achievements": { @@ -158,14 +160,36 @@ { "id": "2613daea57c76f13ac9197ec", "email": "", - "displayName": "Guest", + "displayName": "Pear", "loginType": "guest", "providerUserId": "p_1780400804441_lsc3lqqvs0i", "notes": "auto: player-coins", "blocked": false, - "coins": 0, + "coins": 16, "createdAt": "2026-06-02T11:46:46+00:00", - "updatedAt": "2026-06-02T11:46:46+00:00" + "updatedAt": "2026-06-19T07:10:26+00:00", + "daily": { + "anchorMs": 1781802000000, + "claimedDays": [ + true, + false, + false, + false, + false, + false, + false + ], + "lockUntilMs": 1781888400000 + }, + "score": 6, + "scoreByCase": { + "1": 4, + "7": 2 + }, + "lbName": "Pear", + "achievements": { + "d1_minigame_solver": 2 + } }, { "id": "9404ea306bffed187b43a490", @@ -193,6 +217,227 @@ }, "createdAt": "2026-06-17T08:22:51+00:00", "updatedAt": "2026-06-17T08:22:51+00:00" + }, + { + "id": "c3f2affa3fc67b2411992cdf", + "email": "", + "displayName": "Nutty", + "loginType": "guest", + "providerUserId": "p_1781849622720_33zppelly7r", + "notes": "auto: player-coins", + "blocked": false, + "coins": 12, + "createdAt": "2026-06-19T06:13:44+00:00", + "updatedAt": "2026-06-19T07:10:26+00:00", + "score": 12, + "scoreByCase": { + "1": 12 + }, + "lbName": "Nutty", + "achievements": { + "d1_minigame_solver": 3 + } + }, + { + "id": "71f99e98ffa2e824b225af7c", + "email": "", + "displayName": "tomato", + "loginType": "guest", + "providerUserId": "p_1781849642042_x2vt68wscm", + "notes": "auto: player-coins", + "blocked": false, + "coins": 136, + "createdAt": "2026-06-19T06:14:02+00:00", + "updatedAt": "2026-06-19T07:49:00+00:00", + "daily": { + "anchorMs": 1781802000000, + "claimedDays": [ + true, + false, + false, + false, + false, + false, + false + ], + "lockUntilMs": 1781888400000 + }, + "score": 126, + "scoreByCase": { + "1": 66, + "7": 10, + "5": 10, + "2": 40 + }, + "lbName": "tomato", + "achievements": { + "d1_minigame_solver": 14 + } + }, + { + "id": "cdf90c44df43f374c61afe24", + "email": "", + "displayName": "Guest", + "loginType": "guest", + "providerUserId": "p_1781849653038_swv8lg8jlm", + "notes": "auto: player-coins", + "blocked": false, + "coins": 10, + "createdAt": "2026-06-19T06:14:13+00:00", + "updatedAt": "2026-06-19T06:14:35+00:00", + "daily": { + "anchorMs": 1781802000000, + "claimedDays": [ + true, + false, + false, + false, + false, + false, + false + ], + "lockUntilMs": 1781888400000 + } + }, + { + "id": "237fe56525ecb6a41d2831ee", + "email": "", + "displayName": "Chupa Chup", + "loginType": "guest", + "providerUserId": "p_1781849770177_lylmhvm1lp", + "notes": "auto: player-coins", + "blocked": false, + "coins": 94, + "createdAt": "2026-06-19T06:16:09+00:00", + "updatedAt": "2026-06-19T07:33:03+00:00", + "daily": { + "anchorMs": 1781802000000, + "claimedDays": [ + true, + false, + false, + false, + false, + false, + false + ], + "lockUntilMs": 1781888400000 + }, + "score": 84, + "scoreByCase": { + "1": 76, + "7": 8 + }, + "lbName": "Zara Kissy", + "achievements": { + "d1_minigame_solver": 9 + } + }, + { + "id": "c762e08534c6c99a24a49dbe", + "email": "", + "displayName": "Guest", + "loginType": "guest", + "providerUserId": "p_1781850202249_347o67u9vhq", + "notes": "auto: player-coins", + "blocked": false, + "coins": 10, + "createdAt": "2026-06-19T06:23:24+00:00", + "updatedAt": "2026-06-19T06:24:28+00:00", + "daily": { + "anchorMs": 1781802000000, + "claimedDays": [ + true, + false, + false, + false, + false, + false, + false + ], + "lockUntilMs": 1781888400000 + } + }, + { + "id": "a5e5d250871a8fdc6988bb83", + "email": "", + "displayName": "Guest", + "loginType": "guest", + "providerUserId": "p_1781850663247_l0g0d1r7pcm", + "notes": "auto: player-coins", + "blocked": false, + "coins": 0, + "createdAt": "2026-06-19T06:31:03+00:00", + "updatedAt": "2026-06-19T06:31:03+00:00" + }, + { + "id": "0bf4718eeec4434c080d6057", + "email": "", + "displayName": "Guest", + "loginType": "guest", + "providerUserId": "p_1781851275186_szcmp5pu3s", + "notes": "auto: player-coins", + "blocked": false, + "coins": 10, + "createdAt": "2026-06-19T06:41:15+00:00", + "updatedAt": "2026-06-19T07:00:09+00:00", + "daily": { + "anchorMs": 1781802000000, + "claimedDays": [ + true, + false, + false, + false, + false, + false, + false + ], + "lockUntilMs": 1781888400000 + } + }, + { + "id": "6976f001d7a7eb32c2fd0171", + "email": "", + "displayName": "MONE", + "loginType": "guest", + "providerUserId": "p_1781852432483_mfrw1xmw0j", + "notes": "auto: player-coins", + "blocked": false, + "coins": 4, + "createdAt": "2026-06-19T07:00:33+00:00", + "updatedAt": "2026-06-19T07:10:26+00:00", + "score": 4, + "scoreByCase": { + "7": 4 + }, + "lbName": "MONE", + "achievements": { + "d1_minigame_solver": 1 + } + }, + { + "id": "689a199e3291ae6cc2c8bc05", + "email": "", + "displayName": "Guest", + "loginType": "guest", + "providerUserId": "p_1781855252958_jds3qm3aebt", + "notes": "auto: player-coins", + "blocked": false, + "coins": 0, + "createdAt": "2026-06-19T07:47:33+00:00", + "updatedAt": "2026-06-19T07:47:33+00:00" + }, + { + "id": "bb6f0d73632880703c833ad5", + "email": "", + "displayName": "Guest", + "loginType": "guest", + "providerUserId": "p_1781856969270_oupok32bkh9", + "notes": "auto: player-coins", + "blocked": false, + "coins": 0, + "createdAt": "2026-06-19T08:16:09+00:00", + "updatedAt": "2026-06-19T08:16:09+00:00" } ] } \ No newline at end of file diff --git a/www/html/Game/data/game-timing.json b/www/html/Game/data/game-timing.json index 50a1075..befa624 100644 --- a/www/html/Game/data/game-timing.json +++ b/www/html/Game/data/game-timing.json @@ -89,19 +89,13 @@ "balloonBossPlayerBalloonFallbackUrl": "/Game/img/MegaVirus/Artboard%209.png", "balloonBossBalloonsPerPlayer": 3, "forcedMinigameKeys": [ - "quiz", - "gauntlet", - "stack" + "quiz_carry", + "space_shooter", + "balloon_boss" ], - "testSpecialCardByMap": { - "mng8a80o": 1, - "mno9kb07": 2, - "mnn93hpi": 3, - "mnorwqx1": 4, - "mnptfts2": 5, - "mnpz6rkp": 6, - "mnq1eml7": 7 - }, + "testSpecialCardByMap": {}, "troublesomeForceOffer": false, - "specialQuizIconExpireSec": 20 + "specialQuizIconExpireSec": 20, + "pickVoteSec": 25, + "trialVoteSec": 30 } \ No newline at end of file diff --git a/www/html/Game/data/quiz-battle-leaderboard.json b/www/html/Game/data/quiz-battle-leaderboard.json index 5bd9279..820d797 100644 --- a/www/html/Game/data/quiz-battle-leaderboard.json +++ b/www/html/Game/data/quiz-battle-leaderboard.json @@ -1 +1 @@ -{"qbroom1":[{"name":"Q","score":7,"characterId":"char-1777017632279","ts":1781171902962},{"name":"ผู้เล่น8916","score":4,"characterId":"char-1777017632279","ts":1781074083031},{"name":"ผู้เล่น2821","score":4,"characterId":"char-1777017632279","ts":1781079179108}],"qbroom2":[{"name":"Q","score":7,"characterId":"char-1777017632279","ts":1781175468983},{"name":"ผู้เล่น2612","score":1,"characterId":"char-1777017632279","ts":1781079252376}],"qbroom3":[{"name":"Q","score":9,"characterId":"char-1777017632279","ts":1781175654893}],"qbroom5":[{"name":"Q","score":6,"characterId":"char-1777017632279","ts":1781675299850}],"qbroom6":[{"name":"Q","score":3,"characterId":"char-1777017632279","ts":1781675383175}],"qbroom9":[{"name":"Q","score":7,"characterId":"char-1777017632279","ts":1781696345322}]} \ No newline at end of file +{"qbroom1":[{"name":"ผู้เล่น9514","score":17,"characterId":"char-1777017632279","ts":1781850667717},{"name":"MONE","score":10,"characterId":"char-1777017632279","ts":1781850749437},{"name":"tomato","score":9,"characterId":"char-1777017632279","ts":1781850748552},{"name":"Q","score":7,"characterId":"char-1777017632279","ts":1781171902962},{"name":"ผู้เล่น1991","score":5,"characterId":"char-1777017632279","ts":1781850950078},{"name":"ผู้เล่น8916","score":4,"characterId":"char-1777017632279","ts":1781074083031},{"name":"ผู้เล่น2821","score":4,"characterId":"char-1777017632279","ts":1781079179108},{"name":"Weenwild","score":4,"characterId":"char-1777017632279","ts":1781849863580}],"qbroom2":[{"name":"ผู้เล่น4472","score":13,"characterId":"char-1777017632279","ts":1781851033914},{"name":"Q","score":7,"characterId":"char-1777017632279","ts":1781175468983},{"name":"ผู้เล่น2612","score":1,"characterId":"char-1777017632279","ts":1781079252376}],"qbroom3":[{"name":"Q","score":9,"characterId":"char-1777017632279","ts":1781175654893},{"name":"Weenwild","score":2,"characterId":"char-1777017632279","ts":1781849898452}],"qbroom5":[{"name":"Q","score":6,"characterId":"char-1777017632279","ts":1781675299850}],"qbroom6":[{"name":"Q","score":3,"characterId":"char-1777017632279","ts":1781675383175}],"qbroom9":[{"name":"Q","score":7,"characterId":"char-1777017632279","ts":1781696345322}]} \ No newline at end of file diff --git a/www/html/Game/public/js/customize-popup.js b/www/html/Game/public/js/customize-popup.js index e015687..c89872d 100644 --- a/www/html/Game/public/js/customize-popup.js +++ b/www/html/Game/public/js/customize-popup.js @@ -566,9 +566,28 @@ function applyCustomizeSelection() { var characterId = getStoredCharacterId(); - if (!characterId) return Promise.resolve(null); return new Promise(function (resolve) { function runApply() { + // ไม่มีตัวละคร (เครื่องที่ยังไม่ได้เลือกตัวละคร) — ยังต้องซิงก์สีไปเซิร์ฟเวอร์ + // ให้คนอื่นเห็น แต่ข้ามการ composite รูป preview เพราะไม่มี characterId + if (!characterId) { + try { + persistConfirmedState(); + syncLobbyTintStorageKeys(); + } catch (e0) { /* ignore */ } + try { + window.dispatchEvent(new CustomEvent('customize-popup:applied', { + detail: { + characterId: '', + activeColor: clampIndex(state.activeColor, 1, 8), + activeSkin: clampIndex(state.activeSkin, 1, 3), + avatarSrc: '' + } + })); + } catch (e1) { /* ignore */ } + resolve(null); + return; + } var tint = getSelectedTint(); var domAvatar = resolveDomAvatarSource(); var fallbackSrc = domAvatar.src || ''; @@ -1068,6 +1087,12 @@ function closePopup() { if (!refs.overlay) return; stopScrollbarDrag(); + /* ย้าย focus ออกจาก overlay ก่อนซ่อน — กันคำเตือน "aria-hidden on focused element" (เช่นปุ่มยืนยันที่เพิ่งกด) */ + try { + if (refs.overlay.contains(document.activeElement) && document.activeElement.blur) { + document.activeElement.blur(); + } + } catch (e) { /* ignore */ } refs.overlay.classList.add('is-hidden'); refs.overlay.setAttribute('aria-hidden', 'true'); } @@ -1124,9 +1149,27 @@ }); } + /** ซ่อมรูป avatar ที่ถูก "อบ" (bake) ไว้ผิดสีจากโค้ดเวอร์ชันเก่า (heuristic = ชุดขาว+ขอบสี) + → คอมโพสิตใหม่จากเลเยอร์จริงด้วยสีที่บันทึกไว้ แล้วเขียนทับ bake เดิม (self-heal ทุกเครื่อง) */ + function rebakeAvatarFromSavedColors() { + if (isRoomLobbyPage()) return; // room-lobby มีระบบ tint ของตัวเองอยู่แล้ว + var characterId = getStoredCharacterId(); + if (!characterId) return; + var hasSavedColor = false; + try { hasSavedColor = !!localStorage.getItem('lobbyThemeColor'); } catch (e) { /* ignore */ } + if (!hasSavedColor) return; // ยังไม่เคยเลือกสี → คงรูป default ไว้ ไม่ไปอบทับ + readLobbyTintIntoState(); + composeTintedCharacterPreview(characterId, getSelectedTint()).then(function (outSrc) { + if (!outSrc || typeof outSrc !== 'string' || outSrc.indexOf('data:image/') !== 0) return; // composite ไม่สำเร็จ → ไม่เขียนทับด้วย fallback + try { localStorage.setItem(LOBBY_IDLE_DOWN_PREFIX + characterId, outSrc); } catch (e) { /* ignore */ } + syncLiveAvatarElements(outSrc, 'ตัวละครที่ปรับแต่งแล้ว'); + }).catch(function () { /* ignore */ }); + } + function init() { createPopupIfNeeded(); if (triggerSelectors.length) bindTriggers(); + rebakeAvatarFromSavedColors(); } if (document.readyState === 'loading') { diff --git a/www/html/Game/public/js/play.js b/www/html/Game/public/js/play.js index e3dcf94..f52af60 100644 --- a/www/html/Game/public/js/play.js +++ b/www/html/Game/public/js/play.js @@ -2436,6 +2436,21 @@ } catch (e) { /* ignore */ } } + /** วินิจฉัยสีในเกม: รันใน console บนแต่ละเครื่อง → เทียบสีที่ render ของทุกตัว */ + window.__colorDebug = function () { + var rows = []; + rows.push({ who: '*ME*', id: String(myId == null ? '' : myId).slice(0, 6), renderTint: JSON.stringify(me && me.playTint) }); + others.forEach(function (o, id) { + rows.push({ who: isPreviewBotId(id) ? 'BOT' : 'peer', id: String(id).slice(0, 10), name: o.nickname || '', renderTint: JSON.stringify(o.playTint) }); + }); + try { console.table(rows); } catch (e) { console.log(JSON.stringify(rows, null, 2)); } + var lsTheme = '?'; var lsTint = '?'; + try { lsTheme = localStorage.getItem('lobbyThemeColor'); lsTint = localStorage.getItem(LOBBY_PLAYER_TINT_KEY); } catch (e) { /* ignore */ } + console.log('[color-dbg/game] myId=' + myId + ' playLobbyBotThemes=' + JSON.stringify(playLobbyBotThemes) + + ' LS.lobbyThemeColor=' + lsTheme + ' LS.PLAYER_TINT=' + lsTint); + return rows; + }; + function getPlayTintForMissionAvatar(peerId) { const sid = peerId != null ? String(peerId) : ''; if (myId != null && sid === String(myId)) { @@ -3194,6 +3209,24 @@ let playLiveQuizScores = {}; /** เกมถูก/ผิด (multiplayer): ใครเคยตอบผิดในเซสชันนี้ — ใช้โชว์แสตมป์ในสรุปภารกิจ mng8a80o */ let playQuizEverWrong = {}; + /** MG1: กันสั่งจบซ้ำเมื่อตรวจพบ "ตายหมด" (รวมบอท ฝั่ง client) */ + let mg1AllDeadEndScheduled = false; + /** MG1: ตรวจว่าทุกคน(เรา+บอท+ผู้เล่นอื่น)ถูกล็อกตอบผิดหมด → จบเกมทันที (เฉพาะโหมดสืบสวน) */ + function checkMg1AllDeadAndEnd() { + if (mg1AllDeadEndScheduled || previewMode) return; + if (!isQuiz() || !isDetectiveMinigamePlay()) return; + const meLocked = !!(playQuizPlayerLocal && playQuizPlayerLocal.cannotTrue && playQuizPlayerLocal.cannotFalse); + if (!meLocked) return; + let anyAlive = false; + others.forEach(function (o, id) { + if (!o || o.bannedSpectator) return; + if (!playBotsEnabled() && isPreviewBotId(id)) return; + if (!(o.quizCannotTrue && o.quizCannotFalse)) anyAlive = true; + }); + if (anyAlive) return; + mg1AllDeadEndScheduled = true; + setTimeout(function () { try { tryFinishDetectiveMinigameAndReturnLobby(); } catch (e) { /* ignore */ } }, 1600); + } /** ผีตามตัวเมื่อตอบผิด — ใช้เฉพาะแมป mng8a80o (เป็นสัญลักษณ์/บทลงโทษเชิงสนุก) */ const QUIZ_WRONG_GHOST_URL = BASE + '/img/QUESTION/ghost/ghost-front.png'; let quizWrongGhostImg = null; @@ -3588,7 +3621,7 @@ playLiveQuizScores = {}; playLiveQuizScores[myId] = 0; others.forEach((_, id) => { playLiveQuizScores[id] = 0; }); - if (isQuiz()) playQuizEverWrong = {}; + if (isQuiz()) { playQuizEverWrong = {}; mg1AllDeadEndScheduled = false; } renderPlayQuizScoreboard(playLiveQuizScores); } @@ -18876,6 +18909,7 @@ spawnQuizTrueFalseScorePopupPlay(!!r.correctTrue); } showPlayQuizFeedback(r); + checkMg1AllDeadAndEnd(); }); socket.on('quiz-player-state', (st) => { @@ -18888,6 +18922,7 @@ score: typeof st.score === 'number' ? st.score : (playQuizPlayerLocal.score || 0), }; if (quizGhostConfineActivePlay()) warpMeIntoQuizGhostZonePlay(); + checkMg1AllDeadAndEnd(); }); socket.on('quiz-ended', () => { diff --git a/www/html/Game/public/js/room-lobby.js b/www/html/Game/public/js/room-lobby.js index d270887..9d57d7b 100644 --- a/www/html/Game/public/js/room-lobby.js +++ b/www/html/Game/public/js/room-lobby.js @@ -603,7 +603,7 @@ return parseLobbyThemeIndex(p.lobbyColorThemeIndex) || parseLobbyThemeIndex(p.colorThemeIndex); } - function getLobbyTakenThemeIndices(excludePeerId) { + function getLobbyTakenThemeIndices(excludePeerId, humanOnly) { var taken = []; var seen = {}; peers.forEach(function (p, id) { @@ -611,10 +611,12 @@ var ti = peerLobbyThemeIndex(p); if (ti && !seen[ti]) { seen[ti] = true; taken.push(ti); } }); - lobbyBots.forEach(function (b) { - var ti = peerLobbyThemeIndex(b); - if (ti && !seen[ti]) { seen[ti] = true; taken.push(ti); } - }); + if (!humanOnly) { + lobbyBots.forEach(function (b) { + var ti = peerLobbyThemeIndex(b); + if (ti && !seen[ti]) { seen[ti] = true; taken.push(ti); } + }); + } return taken; } @@ -623,7 +625,8 @@ if (!ti) return false; var myIdx = getMyLobbyThemeIndex(); if (forSelfChange && myIdx === ti) return true; - return getLobbyTakenThemeIndices(forSelfChange ? socket.id : null).indexOf(ti) < 0; + /* บอทไม่บล็อก: ถ้าสีถูกบอทยึดอยู่ ยังเลือกได้ (server จะดันบอทไปสีอื่นให้) — บล็อกเฉพาะสีที่ "คนจริง" ใช้ */ + return getLobbyTakenThemeIndices(forSelfChange ? socket.id : null, true).indexOf(ti) < 0; } function applyThemeIndexToOccupant(target, themeIndex, skinIndex, done) { @@ -672,6 +675,29 @@ tick(); } + /** วินิจฉัยสี: รันใน console บนแต่ละเครื่อง → เทียบ index/สี ของทุกตัว เพื่อหาจุดที่ไม่ตรง */ + window.__colorDebug = function () { + var rows = []; + peers.forEach(function (p, id) { + rows.push({ + who: id === socket.id ? '*ME*' : 'peer', + id: String(id).slice(0, 6), + name: p.nickname || '', + serverIdx: p.lobbyColorThemeIndex || null, + skinIdx: p.lobbySkinToneIndex || null, + renderRGB: (id === socket.id ? (myTintTheme || '') : (p.colorTheme || '(none)')), + }); + }); + (lobbyBots || []).forEach(function (b, i) { + rows.push({ who: 'BOT', id: String(b.id || ('bot' + i)).slice(0, 10), name: b.nickname || '', serverIdx: peerLobbyThemeIndex(b), skinIdx: b.lobbySkinToneIndex || null, renderRGB: b.colorTheme || '(none)' }); + }); + try { console.table(rows); } catch (e) { console.log(JSON.stringify(rows, null, 2)); } + console.log('[color-dbg/lobby] mySocket=' + socket.id + ' myTintTheme=' + myTintTheme + ' myTintSkin=' + myTintSkin + + ' botThemesFromServer=' + JSON.stringify(lobbyBotThemesFromServer) + + ' LS.lobbyThemeColor=' + (function () { try { return localStorage.getItem('lobbyThemeColor'); } catch (e) { return '?'; } })()); + return rows; + }; + function applyLobbyTintSyncPayload(data) { if (!data) return; if (Array.isArray(data.lobbyBotThemes)) lobbyBotThemesFromServer = data.lobbyBotThemes; @@ -4576,6 +4602,14 @@ socket.off('user-joined'); socket.on('user-joined', async (data) => { peers.set(data.id, normalizeLobbyPeerFromServer(data, mapData)); + /* แก้สีชุด peer ใหม่ไม่ขึ้นบนเครื่องคนอื่น: resolve RGB ของธีมสีทันที + (lobby-tint-sync ถูก emit ก่อน user-joined จึงข้าม peer นี้เพราะยังไม่อยู่ใน map) */ + applyPeerThemeFromServer(peers.get(data.id), data.lobbyColorThemeIndex, data.lobbySkinToneIndex, function () { + updatePlayersHud(); + renderPeers(); + redrawLobbyMap(); + if (typeof window.refreshCustomizeColorRow === 'function') window.refreshCustomizeColorRow(); + }); updatePlayersHud(); renderPeers(); ensureReadyControlEnabled(); diff --git a/www/html/Game/public/play.html b/www/html/Game/public/play.html index 312c257..e5d0aab 100644 --- a/www/html/Game/public/play.html +++ b/www/html/Game/public/play.html @@ -5124,7 +5124,7 @@ #special-quiz-overlay .sq-ov-result--fail { color: #fff; background: rgba(247,118,142,0.9); } #special-quiz-overlay #sq-ov-quiz-body.is-hidden { display: none; } /* ===== หน้ารับการ์ด (mock 10-Game-1-result) — เต็มจอ ไม่มีกรอบควิซ ===== */ - #special-quiz-overlay.is-award .sq-ov-panel { background: none !important; padding: 2vh 4vw !important; min-height: 0 !important; box-shadow: none; } + #special-quiz-overlay.is-award .sq-ov-panel { background: none !important; padding: 2vh 4vw !important; min-height: 0 !important; width: auto !important; max-width: 96vw !important; aspect-ratio: auto !important; max-height: 96vh !important; overflow: visible !important; box-shadow: none; } #special-quiz-overlay .sq-ov-award { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; } #special-quiz-overlay .sq-ov-award.is-hidden { display: none; } #special-quiz-overlay .sq-ov-award-stage { position: relative; display: flex; align-items: center; justify-content: center; } @@ -5205,7 +5205,7 @@ - +
v —