Show the seating editor as a centered popup

Add Fluid.Popup, a centered dialog with the same open/close API as
Sheet: it scales in like the confirm alert, fades out in place, and
closes on backdrop tap or Escape with focus trapped inside. The host's
seating editor now uses it instead of a bottom sheet; its list scrolls
inside the popup on short screens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
agomizi1cmandClaude Opus 5.5 committed 2026-10-23 12:19:10 +09:00
1 parent dd39c043c4
commit ed3d1e437e
4 files changed
+132 -13

No files matched your search

+8 -8
View File
@@ -31,7 +31,7 @@
const reviewSheet = Fluid.Sheet($('review-modal'));
const rankingSheet = Fluid.Sheet($('ranking-modal'));
const seatingSheet = Fluid.Sheet($('seating-modal'));
const seatingPopup = Fluid.Popup($('seating-modal'));
const nameSheet = Fluid.Sheet($('name-modal'), { dismissible: false, focus: '#name-input' });
// 払って閉じた・背景を押した・Esc のときも「戻る」と同じ
const betSheet = Fluid.Sheet($('bet-modal'), {
@@ -120,7 +120,7 @@
$('action-bar').hidden = true;
reviewSheet.close();
rankingSheet.close();
seatingSheet.close();
seatingPopup.close();
raising = false;
betSheet.close();
$('not-found').hidden = false;
@@ -268,7 +268,7 @@
else betSheet.close();
renderReview(s);
if (rankingSheet.isOpen) renderRanking(s);
if (seatingSheet.isOpen) syncSeating(s);
if (seatingPopup.isOpen) syncSeating(s);
renderTimer();
// 自分の番になったら知らせる
@@ -774,7 +774,7 @@
// 開いている間に座った人は最後に加え、いなくなった人は外す(並べた順は崩さない)。
// 次のハンドで席番号が振り直されたら読み込み直す
function syncSeating(s) {
if (!s.isHost) return seatingSheet.close();
if (!s.isHost) return seatingPopup.close();
if (seatDrag) return;
const occupied = occupiedSeats(s);
const renumbered =
@@ -962,10 +962,10 @@
$('seating-open').addEventListener('click', () => {
if (!state || !state.isHost) return;
loadSeating(state);
renderSeating(null); // 中身を入れてから開く(シートの高さを測るため)
seatingSheet.open();
renderSeating(null);
seatingPopup.open();
});
$('seating-cancel').addEventListener('click', () => seatingSheet.close());
$('seating-cancel').addEventListener('click', () => seatingPopup.close());
$('seating-save').addEventListener('click', () => {
if (!socket || !state) return;
const later = Boolean(state.hand); // ハンドがある間(結果の表示中を含む)は次のハンドから
@@ -978,7 +978,7 @@
if (state) syncSeating(state);
return;
}
seatingSheet.close();
seatingPopup.close();
toast(later ? '次のハンドから新しい席順になります' : '席順を変更しました');
});
});