게임·입장 UX와 물리/고지 개선을 반영한다.

비행기(세계여행) 칸 선택 이동, 주사위 무게감, 설정 패널·주사위 초기화,
개인정보 고지·파비콘·탭 제목을 정리하고 런타임 로그는 추적에서 제외한다.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
kimyu
2026-09-21 12:50:22 +09:00
parent 73520f9f06
commit 347dfc1f4a
21 changed files with 316 additions and 148 deletions

View File

@@ -1,5 +1,6 @@
'use client';
import Link from 'next/link';
import { useRouter } from 'next/navigation';
import { useEffect, useRef, useState } from 'react';
import {
@@ -147,7 +148,7 @@ function BoardEditor({
<div>
<h3 className="text-sm font-semibold text-white">주사위판 칸 (board)</h3>
<p className="text-[11px] text-white/50">
가로·세로로 판 크기를 바꾸고, 칸마다 이름·효과·이미지·내용 표시를 설정합니다. 0번(시작) 이름은
가로·세로로 판 크기를 바꾸고, 칸마다 이름·효과·이미지·텍스트 표시를 설정합니다. 0번(시작) 이름은
고정입니다.
</p>
</div>
@@ -157,14 +158,14 @@ function BoardEditor({
className="rounded bg-white/15 px-3 py-1.5 text-xs font-medium text-white hover:bg-white/25"
onClick={() => onChange(setAllCellsContentVisible(true, board))}
>
전체 내용 표시
전체 텍스트 표시
</button>
<button
type="button"
className="rounded bg-white/15 px-3 py-1.5 text-xs font-medium text-white hover:bg-white/25"
onClick={() => onChange(setAllCellsContentVisible(false, board))}
>
전체 내용 숨김
전체 텍스트 숨김
</button>
<button
type="button"
@@ -214,33 +215,30 @@ function BoardEditor({
{geo.map((g, index) => {
const cell = board.cells[index];
const active = selected === index;
const showContent = cell?.contentVisible !== false;
const showText = cell?.contentVisible !== false;
return (
<button
key={g.id}
type="button"
title={`#${index} ${cell?.type ?? ''}${showContent ? '' : ' (내용 숨김)'}`}
title={`#${index} ${cell?.type ?? ''}${showText ? '' : ' (텍스트 숨김)'}`}
onClick={() => setSelected(index)}
className="relative min-h-10 rounded px-0.5 text-[10px] font-semibold text-white sm:text-[11px]"
style={{
gridColumn: g.x + 1,
gridRow: g.y + 1,
backgroundColor: cellColorFor(cell?.eventId, index),
backgroundImage:
showContent && cell?.imageSrc ? `url(${cell.imageSrc})` : undefined,
backgroundImage: cell?.imageSrc ? `url(${cell.imageSrc})` : undefined,
backgroundSize: 'cover',
backgroundPosition: 'center',
textShadow:
showContent && cell?.imageSrc ? '0 1px 2px rgba(0,0,0,0.9)' : undefined,
textShadow: cell?.imageSrc ? '0 1px 2px rgba(0,0,0,0.9)' : undefined,
outline: active ? '2px solid #fde68a' : undefined,
outlineOffset: 1,
opacity: showContent ? 1 : 0.7,
}}
>
{index === 0 ? '시작' : cell?.type}
{!showContent && (
{!showText && (
<span className="absolute top-0.5 right-0.5 rounded bg-black/55 px-0.5 text-[8px] font-normal text-white/70">
숨김
텍스트숨김
</span>
)}
</button>
@@ -305,10 +303,10 @@ function BoardEditor({
)
}
/>
게임에서 이 칸 내용(이름·이미지) 표시
게임에서 이 칸 이름(텍스트) 표시
</label>
<p className="text-[11px] text-white/45">
끄면 판에는 색만 보이고, 착지 시 효과·안내는 그대로 동작합니다.
끄면 판에서 이름 글자만 숨깁니다. 이미지·색·착지 효과는 그대로입니다.
</p>
</div>
<div className="flex flex-col gap-2 sm:col-span-2">
@@ -376,6 +374,7 @@ export default function Home() {
const [roomCheesePerDice, setRoomCheesePerDice] = useState(1000);
const [roomMultiplyByCheese, setRoomMultiplyByCheese] = useState(true);
const [roomMaxMultiplier, setRoomMaxMultiplier] = useState(10);
const [resetDiceQueueOnJoin, setResetDiceQueueOnJoin] = useState(false);
const [joinChannelInput, setJoinChannelInput] = useState('');
const [roomBusy, setRoomBusy] = useState(false);
const [roomError, setRoomError] = useState<string | null>(null);
@@ -436,6 +435,7 @@ export default function Home() {
cheesePerDice: roomCheesePerDice,
multiplyByCheese: roomMultiplyByCheese,
maxMultiplier: roomMultiplyByCheese ? roomMaxMultiplier : 0,
resetDiceQueue: resetDiceQueueOnJoin,
});
const startChzzkLogin = () => {
@@ -444,6 +444,7 @@ export default function Home() {
cheesePerDice: String(opts.cheesePerDice),
multiplyByCheese: opts.multiplyByCheese ? '1' : '0',
maxMultiplier: String(opts.maxMultiplier),
resetDiceQueue: opts.resetDiceQueue ? '1' : '0',
});
window.location.href = `/api/chzzk/login?${q.toString()}`;
};
@@ -658,6 +659,15 @@ export default function Home() {
</span>
</label>
)}
<label className="flex items-center gap-2 text-sm sm:col-span-2">
<input
type="checkbox"
checked={resetDiceQueueOnJoin}
onChange={(e) => setResetDiceQueueOnJoin(e.target.checked)}
className="h-4 w-4"
/>
<span>남은 주사위 개수를 초기화</span>
</label>
</div>
<div className="flex flex-col gap-2 border-t border-white/10 pt-3">
@@ -790,10 +800,10 @@ export default function Home() {
</div>
</div>
<p className="text-xs text-white/45">
{/* <p className="text-xs text-white/45">
ZIP: manifest.json, board.json, cells/N.*, background.*, chessman.*,
dice/1|2/면.*, dice-floor.*
</p>
</p> */}
{error && (
<p className="rounded bg-red-900/70 px-3 py-2 text-sm text-white">{error}</p>
@@ -943,6 +953,26 @@ export default function Home() {
</div>
</section>
)}
<footer className="mt-auto border-t border-white/10 pt-6 pb-2 text-center text-[12px] text-white/45">
<div className="flex flex-wrap items-center justify-center gap-x-3 gap-y-1">
<Link
href="/privacy"
className="text-white/60 underline decoration-white/25 underline-offset-2 hover:text-white/85"
>
개인정보·쿠키 고지
</Link>
<span className="text-white/25" aria-hidden>
·
</span>
<a
href="mailto:kimyu@kimyu.xyz"
className="text-white/60 underline decoration-white/25 underline-offset-2 hover:text-white/85"
>
연락: kimyu@kimyu.xyz
</a>
</div>
</footer>
</div>
</div>
);