Let admins delete tables from the lobby

Admins see a "削除" button on every table in the lobby. It calls the new
admin-only DELETE /api/tables/:id (404 for non-admins, same-origin only),
which closes the table the same way as when every human leaves. Players
and spectators still at the table are told "管理者がテーブルを削除しました。"

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
agomizi1cmandClaude Opus 5.5 committed 2026-10-19 23:03:24 +09:00
1 parent 3f2515a9fa
commit 0318ee2b5e
5 files changed
+53 -13

No files matched your search

+2
View File
@@ -115,6 +115,7 @@ input.invalid { border-color: var(--red); }
.btn-orange { background: var(--orange); }
.btn-blue { background: var(--blue); }
.btn-green { background: var(--green); }
.btn-red { background: var(--red); }
.btn-dark { background: var(--panel-2); color: var(--text); }
.btn-ghost { background: transparent; color: var(--muted); border: 2px solid var(--line); }
.btn-block { width: 100%; }
@@ -193,6 +194,7 @@ input.invalid { border-color: var(--red); }
}
.table-item .meta b { color: var(--text); font-weight: 700; }
.table-item .meta .gold { color: var(--gold); }
.table-item .buttons { display: flex; gap: 8px; flex-shrink: 0; }
.badge {
display: inline-block;