asd
This commit is contained in:
parent
ff5d6ab91d
commit
572cfedd56
2 changed files with 23 additions and 10 deletions
|
|
@ -1115,10 +1115,10 @@
|
|||
<div class="suit-picker">
|
||||
<h2>Vyber barvu</h2>
|
||||
<div class="suit-grid">
|
||||
<button class="suit-btn red-suit" onclick="pickSuit('hearts')">♥<span>Srdce</span></button>
|
||||
<button class="suit-btn red-suit" onclick="pickSuit('diamonds')">♦<span>Kára</span></button>
|
||||
<button class="suit-btn black-suit" onclick="pickSuit('spades')">♠<span>Piky</span></button>
|
||||
<button class="suit-btn black-suit" onclick="pickSuit('clubs')">♣<span>Kříže</span></button>
|
||||
<button class="suit-btn red-suit" onclick="pickSuit('hearts')">♥<span>Červený</span></button>
|
||||
<button class="suit-btn black-suit" onclick="pickSuit('diamonds')">🍃<span>Zelený</span></button>
|
||||
<button class="suit-btn black-suit" onclick="pickSuit('spades')">🔔<span>Kule</span></button>
|
||||
<button class="suit-btn black-suit" onclick="pickSuit('clubs')">🌰<span>Žaludy</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1205,10 +1205,10 @@ let tableVisible = false;
|
|||
let currentScriptOpen = false;
|
||||
let lobbyPollTimer = null;
|
||||
|
||||
const SUIT_ICONS = { hearts:'♥', diamonds:'♦', spades:'♠', clubs:'♣' };
|
||||
const SUIT_NAMES = { hearts:'Srdce', diamonds:'Kára', spades:'Piky', clubs:'Kříže' };
|
||||
const SUIT_COLOR = { hearts:'red', diamonds:'red', spades:'black', clubs:'black' };
|
||||
const VALUE_LABEL = { '7':'7','8':'8','9':'9','10':'10', under:'J', upper:'Q', king:'K', ace:'A' };
|
||||
const SUIT_ICONS = { hearts:'♥', diamonds:'🍃', spades:'🔔', clubs:'🌰' };
|
||||
const SUIT_NAMES = { hearts:'Červený', diamonds:'Zelený', spades:'Kule', clubs:'Žaludy' };
|
||||
const SUIT_COLOR = { hearts:'red', diamonds:'black', spades:'black', clubs:'black' };
|
||||
const VALUE_LABEL = { '7':'VII','8':'VIII','9':'IX','10':'X', under:'Sp', upper:'Sv', king:'Kr', ace:'Eso' };
|
||||
|
||||
// ── WebSocket ──────────────────────────────────────────────────────────
|
||||
function connect() {
|
||||
|
|
@ -1765,15 +1765,26 @@ function renderMyHand() {
|
|||
}
|
||||
|
||||
const mine = pending.player_id === myId;
|
||||
if (!mine) {
|
||||
const chooser = gameState.players[pending.player_index || 0];
|
||||
const chooserName = chooser ? chooser.name : 'soupeře';
|
||||
zone.innerHTML = `
|
||||
<div style="margin-top:10px; display:flex; flex-direction:column; gap:6px; align-items:center;">
|
||||
<div style="font-size:.82rem; color:rgba(255,255,255,.7)">Čeká se na volbu hráče: ${escHtml(chooserName)}</div>
|
||||
</div>
|
||||
`;
|
||||
return;
|
||||
}
|
||||
|
||||
const options = (pending.options || []).map((o) => {
|
||||
const safe = String(o || '').replace(/'/g, "\\'");
|
||||
return `<button class="btn btn-primary" style="width:auto;min-width:110px;" ${mine ? '' : 'disabled'} onclick="sendChoice('${safe}')">${escHtml(o)}</button>`;
|
||||
return `<button class="btn btn-primary" style="width:auto;min-width:110px;" onclick="sendChoice('${safe}')">${escHtml(o)}</button>`;
|
||||
}).join('');
|
||||
zone.innerHTML = `
|
||||
<div style="margin-top:10px; display:flex; flex-direction:column; gap:10px; align-items:center;">
|
||||
<div style="font-size:.85rem; color:rgba(255,255,255,.85)">${escHtml(pending.prompt || 'Vyber možnost')}</div>
|
||||
<div style="display:flex; gap:8px; flex-wrap:wrap; justify-content:center;">${options}</div>
|
||||
<div style="font-size:.75rem; color:rgba(255,255,255,.55)">${mine ? 'Vyber jednu možnost.' : 'Čeká se na volbu soupeře…'}</div>
|
||||
<div style="font-size:.75rem; color:rgba(255,255,255,.55)">Vyber jednu možnost.</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue