파일 삭제 기능 추가, undo / redo 기능에 적용

This commit is contained in:
2026-05-15 23:32:29 +09:00
parent 1e88859484
commit 999cc9f3fb
12 changed files with 289 additions and 34 deletions
+7
View File
@@ -59,6 +59,12 @@ export function createCard(file, idx) {
checkBadge.className = 'card-check';
checkBadge.textContent = '✓';
const deleteBtn = document.createElement('button');
deleteBtn.className = 'card-delete';
deleteBtn.title = '삭제';
deleteBtn.textContent = '×';
deleteBtn.draggable = false;
// src 없이 생성 — IntersectionObserver가 뷰포트 진입 시 로딩
const thumb = document.createElement('img');
thumb.className = 'card-thumb';
@@ -78,6 +84,7 @@ export function createCard(file, idx) {
body.appendChild(newNameEl);
card.appendChild(numBadge);
card.appendChild(checkBadge);
card.appendChild(deleteBtn);
card.appendChild(thumb);
card.appendChild(body);