From f85e261366b016cdd627c8835b7386bf9c15ff14 Mon Sep 17 00:00:00 2001 From: tolelom <98kimsungmin@naver.com> Date: Thu, 5 Mar 2026 13:49:05 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=9F=B0=EC=B2=98=20=EC=82=AD=EC=A0=9C?= =?UTF-8?q?=20=EC=8B=9C=20=EA=B2=8C=EC=9E=84=20=EC=8B=9C=EC=9E=91=20?= =?UTF-8?q?=EB=B6=88=EA=B0=80=20=EC=9D=B4=EC=8A=88=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit blur 이벤트 기반 런처 감지 로직을 제거하고 런처 다운로드 버튼을 항상 노출하도록 변경. 레지스트리만 남아있고 런처 파일이 없는 경우에도 사용자가 직접 런처를 재다운로드할 수 있도록 함. Co-Authored-By: Claude Opus 4.6 --- src/components/DownloadSection.css | 20 +++++++++++++++++ src/components/DownloadSection.jsx | 36 +++++++++++++----------------- 2 files changed, 36 insertions(+), 20 deletions(-) diff --git a/src/components/DownloadSection.css b/src/components/DownloadSection.css index f71dbdb..887f654 100644 --- a/src/components/DownloadSection.css +++ b/src/components/DownloadSection.css @@ -44,6 +44,26 @@ transform: none; } +.btn-launcher-download { + display: inline-block; + margin-left: 12px; + padding: 18px 32px; + background: transparent; + color: #BACDB0; + border: 1px solid rgba(186, 205, 176, 0.4); + border-radius: 8px; + font-size: 1rem; + font-weight: 600; + cursor: pointer; + transition: background 0.2s, transform 0.15s; + letter-spacing: 0.03em; +} + +.btn-launcher-download:hover { + background: rgba(186, 205, 176, 0.1); + transform: translateY(-1px); +} + .launch-hint { font-size: 0.78rem; color: rgba(255, 255, 255, 0.3); diff --git a/src/components/DownloadSection.jsx b/src/components/DownloadSection.jsx index f392eb4..6b0c6b6 100644 --- a/src/components/DownloadSection.jsx +++ b/src/components/DownloadSection.jsx @@ -7,7 +7,6 @@ import './DownloadSection.css'; export default function DownloadSection() { const [info, setInfo] = useState(null); const [ready, setReady] = useState(false); - const [launching, setLaunching] = useState(false); const { user } = useAuth(); const navigate = useNavigate(); @@ -23,24 +22,16 @@ export default function DownloadSection() { return; } - setLaunching(true); - - let launched = false; - const onBlur = () => { launched = true; }; - window.addEventListener('blur', onBlur); window.location.href = 'a301://launch?token=' + user.token; + }; - setTimeout(() => { - window.removeEventListener('blur', onBlur); - setLaunching(false); - if (!launched && info?.launcherUrl) { - // 런처 미설치 → launcher.exe 다운로드 - const a = document.createElement('a'); - a.href = info.launcherUrl; - a.download = 'launcher.exe'; - a.click(); - } - }, 2000); + const handleDownloadLauncher = () => { + if (info?.launcherUrl) { + const a = document.createElement('a'); + a.href = info.launcherUrl; + a.download = 'launcher.exe'; + a.click(); + } }; if (!ready) return null; @@ -54,11 +45,16 @@ export default function DownloadSection() {

{info.version} · {info.fileSize}

- + {info?.launcherUrl && ( + + )}

- 런처 미설치 시 자동으로 다운로드됩니다. 설치 후 다시 클릭하세요. + 처음이거나 게임이 실행되지 않으면 런처를 다운로드해주세요.

) : (