Files
make_video_site/views/op/folder.ejs
claude-bot e77c18a83e feat(op/folder): click video card to open inline player
관리자 폴더 화면에서도 영상 카드를 좌클릭하면 공개 폴더와 동일한
내부 팝업 플레이어로 재생되도록 함. 우클릭 컨텍스트 메뉴 (수정/이름
변경/삭제) 는 그대로 유지.

- 카드에 data-video-id 추가해 기존 player.js 가 인식하게 함
- 페이지에 playerOverlay HTML 과 player.js 스크립트 포함
- window.__SITE__.folder 도 함께 노출해 player.js 의 가정 충족

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 18:39:50 +09:00

61 lines
2.2 KiB
Plaintext

<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>관리자 · <%= folder %></title>
<link rel="stylesheet" href="/static/styles.css" />
</head>
<body class="siteBody">
<%- include('../partials/navbar', { userId }) %>
<main class="pageWrap">
<section class="dashboardHeader">
<div>
<a class="muted" href="/op/dashboard">← 폴더 목록</a>
<h1>📁 <%= folder %></h1>
</div>
<div class="dashboardActions">
<a class="primaryButton" href="/op/folder/<%= encodeURIComponent(folder) %>/video/editor">영상 추가</a>
</div>
</section>
<section class="videoGrid" id="videoGrid">
<% if (videos.length === 0) { %>
<p class="muted">이 폴더에 영상이 없습니다. 우측 상단에서 영상을 추가하세요.</p>
<% } %>
<% videos.forEach(function (v) { %>
<div class="videoCard adminVideo" data-id="<%= v.id %>" data-video-id="<%= v.id %>" data-title="<%= v.title %>">
<div class="videoThumb">▶</div>
<div class="videoTitle"><%= v.title %></div>
<% if (v.sourceType === 'youtube' && !v.originalFile.includes('original.') === false) { %>
<div class="muted">YouTube</div>
<% } %>
</div>
<% }) %>
</section>
</main>
<div class="ctxMenu" id="ctxMenu" hidden>
<button type="button" data-action="edit">수정</button>
<button type="button" data-action="rename">이름 변경</button>
<button type="button" data-action="delete" class="dangerLink">삭제</button>
</div>
<div class="playerOverlay" id="playerOverlay" hidden>
<div class="playerModal" role="dialog" aria-modal="true">
<button type="button" class="playerClose" id="playerClose" aria-label="닫기">✕</button>
<div class="playerTitle" id="playerTitle"></div>
<video id="playerVideo" controls preload="metadata"></video>
</div>
</div>
<script>
window.__OP__ = { folder: <%- jsonForScript(folder) %> }
window.__SITE__ = { folder: <%- jsonForScript(folder) %> }
</script>
<script src="/static/folder.js"></script>
<script src="/static/player.js"></script>
</body>
</html>