Wait for the host to press "next hand" on every table
Previously only the review CPU table paused after each hand; cash-only, friends and CPU tables moved on automatically after a short delay. Now every table keeps the result on screen until the host presses 次のハンドへ, and the next hand is dealt right away. If the host has left, the new host presses it; with no human seated the table still advances on its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
22ee28ba03
commit
f64c502086
8 files changed
+103
-31
No files matched your search
+16
-8
@@ -464,9 +464,12 @@
|
||||
let status = '';
|
||||
if (!s.started) status = s.isHost ? '2人以上揃ったら START を押してください' : 'ホストの開始を待っています';
|
||||
else if (s.paused) status = '一時停止中';
|
||||
else if (s.review && s.review.waiting) status = 'レビューを確認したら「次のハンドへ」を押してください';
|
||||
else if (s.awaitingNext && s.isHost) {
|
||||
status = s.review ? 'レビューを確認したら「次のハンドへ」を押してください' : '「次のハンドへ」を押すと次のハンドを始めます';
|
||||
}
|
||||
else if (m.sittingOut) status = '離席中です。復帰すると次のハンドから参加します';
|
||||
else if (m.canRebuy) status = 'チップがなくなりました';
|
||||
else if (s.awaitingNext) status = 'ホストが次のハンドを始めるのを待っています';
|
||||
else if (o) status = o.canCheck ? 'あなたの番です' : `あなたの番です(コール ${chips(o.toCall)})`;
|
||||
else if (awaiting) status = m.canAward ? 'カードを見せ合って、勝った人を選んでください' : 'ホストが勝者を選んでいます';
|
||||
else if (h && !h.finished && s.toAct != null) {
|
||||
@@ -488,15 +491,19 @@
|
||||
if (awarding) renderAwardPanel(h.pots);
|
||||
|
||||
// ボタン
|
||||
const reviewWaiting = Boolean(s.review && s.review.waiting);
|
||||
const alt = (m.sittingOut || m.canRebuy) && !awarding && !reviewWaiting;
|
||||
// ハンドが終わったら、ホストが「次のハンドへ」を押すまで待つ(レビュー付きCPU戦はレビューも開ける)
|
||||
const nexting = Boolean(s.awaitingNext && s.isHost && !s.paused);
|
||||
const alt = (m.sittingOut || m.canRebuy) && !awarding;
|
||||
if (!o) raising = false;
|
||||
$('review-actions').hidden = !reviewWaiting;
|
||||
$('next-actions').hidden = !nexting;
|
||||
$('next-actions').classList.toggle('raising', Boolean(s.review));
|
||||
$('next-actions').classList.toggle('single', !s.review);
|
||||
$('review-show').hidden = !s.review;
|
||||
$('alt-actions').hidden = !alt;
|
||||
$('sit-in').hidden = !m.sittingOut;
|
||||
$('rebuy').hidden = !m.canRebuy;
|
||||
$('rebuy').textContent = `リバイ(${chips(s.startingStack)})`;
|
||||
$('actions').hidden = alt || awarding || reviewWaiting;
|
||||
$('actions').hidden = alt || awarding || nexting;
|
||||
if (raising && o && !alt) {
|
||||
renderRaisePanel(o);
|
||||
betSheet.open();
|
||||
@@ -593,7 +600,8 @@
|
||||
// 同じタブで開き、レビューの画面の「テーブル」で戻ってこられるようにテーブルIDを渡す
|
||||
const back = `t=${encodeURIComponent(tableId)}`;
|
||||
$('review-link').href = r.sessionId ? `/review?s=${encodeURIComponent(r.sessionId)}&${back}` : `/review?${back}`;
|
||||
$('review-modal-next').hidden = !r.waiting;
|
||||
const waiting = Boolean(s.awaitingNext && s.isHost);
|
||||
$('review-modal-next').hidden = !waiting;
|
||||
const key = JSON.stringify(r);
|
||||
if (key !== reviewKey) {
|
||||
reviewKey = key;
|
||||
@@ -602,7 +610,7 @@
|
||||
// 新しいハンドのレビューが届いたら自動で開く
|
||||
if (r.last.number !== seenReview) {
|
||||
seenReview = r.last.number;
|
||||
if (r.waiting) reviewSheet.open();
|
||||
if (waiting) reviewSheet.open();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -626,7 +634,7 @@
|
||||
emit('table:next');
|
||||
};
|
||||
$('review-copy').addEventListener('click', () => copyHandPrompt(state && state.review));
|
||||
$('review-next').addEventListener('click', nextHand);
|
||||
$('next-hand').addEventListener('click', nextHand);
|
||||
$('review-modal-next').addEventListener('click', nextHand);
|
||||
|
||||
// ---------- ランキング(スタック順・収支順を切り替える) ----------
|
||||
|
||||
+3
-3
@@ -96,9 +96,9 @@
|
||||
<button class="btn act-call" id="act-call" disabled>Check</button>
|
||||
<button class="btn act-raise" id="act-raise" disabled>Raise</button>
|
||||
</div>
|
||||
<div class="actions raising" id="review-actions" hidden>
|
||||
<button class="btn" id="review-show">レビュー</button>
|
||||
<button class="btn btn-tint" id="review-next">次のハンドへ</button>
|
||||
<div class="actions single" id="next-actions" hidden>
|
||||
<button class="btn" id="review-show" hidden>レビュー</button>
|
||||
<button class="btn btn-tint" id="next-hand">次のハンドへ</button>
|
||||
</div>
|
||||
<div class="actions single" id="alt-actions" hidden>
|
||||
<button class="btn btn-tint" id="sit-in">復帰する</button>
|
||||
|
||||
Reference in new issue
Block a user