From 9d27ad3d795533870094013de8dd204b3a039c8f Mon Sep 17 00:00:00 2001 From: "hehihoho3@gmail.com" Date: Thu, 13 Aug 2026 14:58:05 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=88=8F=ED=8F=BC=20=EC=9E=90=EB=A7=89?= =?UTF-8?q?=20=EA=B0=B1=EC=8B=A0=20=EC=A4=91=20=EC=B9=B4=EB=93=9C=20?= =?UTF-8?q?=ED=8E=BC=EC=B9=A8=20=EC=9C=A0=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/templates/shortform.html | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/main/resources/templates/shortform.html b/src/main/resources/templates/shortform.html index 7c2bee4..58acfea 100644 --- a/src/main/resources/templates/shortform.html +++ b/src/main/resources/templates/shortform.html @@ -78,6 +78,7 @@ let currentCategory = new URLSearchParams(location.search).get('category') === 'POLITICS' ? 'POLITICS' : 'ENTERTAINMENT'; let subtitlePollTimer = null; + const openJobIds = new Set(); async function api(path, opts) { const res = await fetch(path, Object.assign({ headers: { 'Content-Type': 'application/json' } }, opts)); @@ -132,6 +133,7 @@ e.stopPropagation(); if (!confirm('이 작업을 삭제할까요?')) return; await api('/api/shortform/jobs/' + id, { method: 'DELETE' }); + openJobIds.delete(id); loadJobs(); } @@ -146,8 +148,14 @@ } catch (err) { alert('되돌리기 실패: ' + err.message); } } - async function toggleJob(id, el) { - if (el.classList.contains('open')) { el.classList.remove('open'); return; } + async function toggleJob(id, el, restoreOpen = false) { + if (el.classList.contains('open')) { + if (!restoreOpen) { + el.classList.remove('open'); + openJobIds.delete(id); + } + return; + } const detail = await api('/api/shortform/jobs/' + id); const toolbar = `