- 공개 폴더(/folder/:name): 새 ctxMenu + public-folder.js 로 우클릭 메뉴 신설
("영상 주소 복사" 만 포함). 좌클릭 재생 기능은 그대로 유지.
- 관리자 폴더(/op/folder/:name): 기존 ctxMenu 에 "영상 주소 복사" 항목과
folder.js 에 copyUrl 핸들러 추가.
- 양쪽 모두 navigator.clipboard.writeText(origin + "/player/" + id) 사용,
실패하면 hidden textarea + execCommand("copy") fallback, 그것도 실패하면
window.prompt 으로 직접 복사 안내. 성공 시 flashToast 로 피드백.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
62 lines
2.3 KiB
Plaintext
62 lines
2.3 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="copyUrl">영상 주소 복사</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>
|