Files
minecraft_launcher/views/op/termsEditor.ejs
claude-bot 9ba5dc6b7b terms: per-term installer visibility toggles + universal delete (v0.3.4)
- _meta.json: customLabels -> terms.{label,showInInstaller,showInInstallerRp}
- Drop builtin protection; any term kind can be deleted/added/toggled
- New public route /manifest/terms/<pack>/index.json for installer term lists
- Installers fetch terms:list dynamically; skip agreement step if list empty
- Term editor: 2 visibility checkboxes (설치기 / 리소스팩 설치기), multi-select
- Migration from old schema preserves custom labels (default: visible in both)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 10:14:42 +09:00

64 lines
2.8 KiB
Plaintext

<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title><%= t('terms.editorBrowserTitle', { label: label }) %></title>
<link rel="stylesheet" href="/static/styles.css" />
<link rel="stylesheet" href="/static/termsEditor.css" />
</head>
<body class="siteBody">
<%- include('../partials/navbar', { userId }) %>
<main class="pageWrap">
<section class="dashboardHeader">
<div>
<a class="ghostLink" href="/op/agreement/<%= packKey %>"><%= t('common.back') %></a>
<h1 style="margin-top:20px;"><%= t('terms.editorTitle', { label: label }) %></h1>
<p class="muted"><%= pack.name %> · <%= kind %>.md</p>
</div>
<div class="dirtyMark" id="dirty-mark" hidden>*</div>
</section>
<div class="listActionsRow" style="align-items:center;">
<button type="button" class="primaryButton" id="saveBtn"><%= t('terms.save') %></button>
<div class="tabBar" style="margin:0 0 0 12px;">
<button type="button" class="tabBtn active" data-mode="edit"><%= t('terms.edit') %></button>
<button type="button" class="tabBtn" data-mode="preview"><%= t('terms.preview') %></button>
</div>
<span class="statusText" id="status"></span>
</div>
<!-- 표시 대상 토글: 어느 인스톨러에서 이 약관을 보여줄지 (중복 선택 가능). -->
<fieldset class="termsVisibility" style="margin-top:16px; padding:10px 14px; border:1px solid var(--border, #30363d); border-radius:8px;">
<legend style="padding:0 6px; font-size:12px; color:var(--text-muted);"><%= t('terms.visibilityHeading') %></legend>
<label style="display:inline-flex; align-items:center; gap:6px; margin-right:18px;">
<input type="checkbox" id="visInstaller" <%= showInInstaller ? 'checked' : '' %> />
<span><%= t('terms.visibilityInstaller') %></span>
</label>
<label style="display:inline-flex; align-items:center; gap:6px;">
<input type="checkbox" id="visInstallerRp" <%= showInInstallerRp ? 'checked' : '' %> />
<span><%= t('terms.visibilityInstallerRp') %></span>
</label>
</fieldset>
<p class="muted" style="font-size:12px;"><%= t('terms.slashHint') %></p>
<div id="editorWrap" class="termsEditorWrap">
<textarea id="editor" class="termsEditor" spellcheck="false"></textarea>
<div id="preview" class="termsPreview" hidden></div>
<div id="slashMenu" class="slashMenu" hidden></div>
</div>
</main>
<script>
var PACK_KEY = <%- JSON.stringify(packKey) %>;
var TERM_KIND = <%- JSON.stringify(kind) %>;
var INITIAL = <%- JSON.stringify(content) %>;
var I18N = <%- JSON.stringify(localeDict.terms) %>;
I18N.common = <%- JSON.stringify(localeDict.common) %>;
</script>
<script src="/static/termsEditor.js"></script>
</body>
</html>