Files
make_video_site/views/op/dashboard.ejs
Claude c5faa8808c feat(folders): nested folder tree (max depth 2) + id-based mutations
- new storeDb.ts: DB+FS layer (folders w/ parent_id, videos w/ global id)
- depth cap: sub-folder cannot have children (enforced in createFolder)
- video id: editable anytime (changeVideoId), uniqueness via PK
- routes:
  - public /folder/:topName[/:subName], /video/:topName[/:subName]/:videoId
  - admin /op/folder/:topName[/:subName], id-based /op/folders/:id/*
    and /op/videos/:id/* (rename/changeId/delete/save + idAvailable check)
- views: breadcrumb + subFolder grid; 플레이리스트 추가 button shows at 2단계
- client JS: id-based mutation endpoints, share URL data attribute,
  in-site player pushes share URL to address bar
- store.ts slimmed to Account + readAccounts (FS layer moved to storeDb)
- pickIntId accepts numeric JSON bodies

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 23:36:02 +09:00

57 lines
1.9 KiB
Plaintext

<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>관리자 · 폴더</title>
<link rel="stylesheet" href="/static/styles.css" />
</head>
<body class="siteBody">
<%- include('../partials/navbar', { userId }) %>
<main class="pageWrap">
<section class="dashboardHeader">
<h1>폴더</h1>
<div class="dashboardActions">
<button type="button" class="primaryButton" id="addFolderBtn">폴더 추가</button>
</div>
</section>
<section class="folderGrid" id="folderGrid">
<% if (folders.length === 0) { %>
<p class="muted">아직 폴더가 없습니다. 우측 상단에서 폴더를 추가해 주세요.</p>
<% } %>
<% folders.forEach(function (f) { %>
<div class="folderCard adminFolder" data-folder-id="<%= f.id %>" data-name="<%= f.name %>">
<a class="folderCardLink" href="/op/folder/<%= encodeURIComponent(f.name) %>">
<span class="folderIcon">📁</span>
<span class="folderName"><%= f.name %></span>
</a>
</div>
<% }) %>
</section>
</main>
<div class="ctxMenu" id="ctxMenu" hidden>
<button type="button" data-action="rename">이름 변경</button>
<button type="button" data-action="delete" class="dangerLink">삭제</button>
</div>
<div class="modalOverlay" id="addFolderModal" hidden>
<div class="modalCard">
<h2>폴더 추가</h2>
<label>
<span>폴더 이름</span>
<input type="text" id="addFolderInput" autofocus />
</label>
<div class="modalActions">
<button type="button" class="secondaryButton" id="addFolderCancel">취소</button>
<button type="button" class="primaryButton" id="addFolderConfirm">생성</button>
</div>
</div>
</div>
<script src="/static/dashboard.js"></script>
</body>
</html>