diff --git a/index.html b/index.html index 3390b91..02d736a 100644 --- a/index.html +++ b/index.html @@ -913,13 +913,20 @@ const UploadModal = ({ onClose, onUploaded, accent, categories, users }) => { ))} )} + {uploads.length > 0 && uploads.every(u => u.progress === 100 || u.progress < 0) && ( +
+ +
+ )} ); }; -const PreviewModal = ({ file, onClose, onDownload, onStar, accent, categories }) => { +const PreviewModal = ({ file, onClose, onDownload, onStar, onCopyLink, accent, categories }) => { if (!file) return null; return (
@@ -981,7 +988,7 @@ const PreviewModal = ({ file, onClose, onDownload, onStar, accent, categories }) {file.starred ? "즐겨찾기 해제" : "즐겨찾기 추가"} - +
@@ -1133,6 +1140,16 @@ function App() { } catch { showToast("오류가 발생했습니다"); } }; + const onCopyLink = async f => { + const url = `${window.location.origin}/api/files/${f.id}/download`; + try { + await navigator.clipboard.writeText(url); + showToast('링크가 클립보드에 복사되었습니다'); + } catch { + showToast('복사에 실패했습니다'); + } + }; + const onBulkDownload = () => { showToast(`${selected.size}개 파일을 ZIP으로 다운로드합니다`); setSelected(new Set()); }; const onBulkDelete = async () => { @@ -1204,6 +1221,7 @@ function App() { onClose={() => setPreviewing(null)} onDownload={f => { onDownload(f); setPreviewing(null); }} onStar={id => toggleStar(id)} + onCopyLink={onCopyLink} accent={t.accent} categories={categories} />