fix: use anchor tag for backend download to show link on hover

This commit is contained in:
backuppc
2026-01-19 14:28:38 +09:00
parent cbeb55daf1
commit 37bb2890ce

18
App.tsx
View File

@@ -321,16 +321,7 @@ const App: React.FC = () => {
};
}, [addLog]); // Intentionally minimal deps
// --- Backend Download Logic ---
const handleDownloadBackend = () => {
addLog('info', '백엔드 실행 파일 다운로드를 시작합니다 (v1.3)...');
const a = document.createElement('a');
a.href = './webftp-backend.exe';
a.download = 'webftp-backend.exe';
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
};
// --- Connection Handlers ---
@@ -686,13 +677,14 @@ const App: React.FC = () => {
{connection.connecting ? <div className="w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin" /> : (connection.connected ? <><WifiOff size={16} /> </> : '빠른 연결')}
</button>
<button
onClick={handleDownloadBackend}
<a
href={`${import.meta.env.BASE_URL}webftp-backend.exe`}
download="webftp-backend.exe"
className={`h-[30px] flex items-center justify-center px-3 rounded bg-emerald-600 hover:bg-emerald-500 text-white border border-emerald-500 shadow-md shadow-emerald-500/20 transition-all ${!connection.connected ? 'animate-pulse ring-2 ring-emerald-400/50' : ''}`}
title="백엔드 다운로드"
>
<Download size={14} className="mr-1.5" />
</button>
</a>
<button
onClick={() => setShowHelp(true)}