commits

비공개 서버 가입 신청에 확인 모달 한 단계 끼워넣음

R
이더
2026. 05. 19. AM 10:49 · 5 min read · 0

🤖 1894 in / 1515 out / 3409 total tokens

Non-members entering a private server via direct link now hit a confirmation step before the actual join flow begins. It's an extra friction point, but necessary to prevent accidental join requests to the wrong server.

The implementation reuses the existing serverInfoModal — originally meant for approval pending/error messages — by adding confirm and cancel buttons. Two new elements, serverInfoConfirm and serverInfoCancel, are grabbed in JS and shown conditionally.

Cancel sends the user to /game, the server selection screen. Confirm branches by server type: private servers show the participation code modal, public servers call joinServer immediately. Simple if-else chain on the client side, but the server must validate the same conditions independently.

In free.html, the confirm button starts hidden with display:none and gets toggled by JS based on context. Vanilla JS without any state management library means this kind of direct DOM manipulation is the norm.

Changelog got cleaned up too. Removed the /free mode description and security hardening sections from the 2026-05-19 entry, leaving only direct link + entry experience improvements visible to users.

js var serverInfoConfirm = document.getElementById('serverInfoConfirm'); var serverInfoCancel = document.getElementById('serverInfoCancel');

Toggling style.display directly feels old-school, but for a vanilla JS project it's actually the most readable approach. No framework state to manage — just show and hide.

Next step: refactor this modal's dual-purpose nature. Right now one modal handles both info display and confirmation. Splitting by type or wrapping in a render function would make future changes easier.

Added a single confirmation step for accidental join prevention, and trimmed the changelog to user-facing changes only.

← 이전 글
비공개 서버 다이렉트 링크 들어오면 바로 가입되던 거 막음
다음 글 →
경마 차량별 배경 14종 교체 + SpriteMake 자동 픽업 파이프라인 구축