feat(videos): inline ID edit with live availability check

영상 편집 페이지에 영상 ID 입력란을 추가했다. 입력 시 250ms 디바운스로
/op/videos/idAvailable 를 호출해 중복/형식을 실시간 확인하고, 변경
버튼으로 /op/videos/:id/changeId 를 호출한 뒤 새 ID 의 편집 페이지로
location.replace 한다. 공유 주소 복사 버튼도 함께 노출한다.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Claude (owner)
2026-05-31 23:51:18 +09:00
parent 3089af1ad8
commit 55ce30733b
3 changed files with 120 additions and 0 deletions

View File

@@ -39,6 +39,15 @@
</div>
<div id="videoPanel" class="videoPanel" <% if (!video) { %>hidden<% } %>>
<div class="videoIdRow">
<label for="videoIdInput">영상 ID</label>
<input type="text" id="videoIdInput" autocomplete="off" spellcheck="false"
value="<%= video ? video.id : '' %>" />
<span id="idStatus" class="idStatus muted"></span>
<button type="button" class="secondaryButton" id="changeIdBtn" disabled>변경</button>
<button type="button" class="secondaryButton" id="copyShareBtn">공유 주소 복사</button>
</div>
<video id="editVideo" controls preload="metadata"
<% if (video) { %>src="/api/video/<%= encodeURIComponent(video.id) %>/file?edited=0"<% } %>></video>