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>
This commit is contained in:
@@ -21,11 +21,19 @@
|
||||
.termsRow .termsRowLabel h2 { margin: 0; font-size: 16px; }
|
||||
.termsRow .termsRowSub { color: var(--text-muted); font-size: 12px; margin-top: 2px; }
|
||||
.termsRow .termsRowActions { display: flex; gap: 8px; align-items: center; }
|
||||
.builtinBadge {
|
||||
display: inline-block; padding: 2px 8px; border-radius: 999px;
|
||||
background: rgba(255,255,255,0.08); color: var(--text-muted);
|
||||
.visibilityBadges {
|
||||
display: flex; gap: 6px; flex-wrap: wrap;
|
||||
}
|
||||
.visibilityBadge {
|
||||
display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px;
|
||||
background: rgba(76, 175, 80, 0.15); color: #8ed68f;
|
||||
border: 1px solid rgba(76, 175, 80, 0.35);
|
||||
font-size: 11px;
|
||||
}
|
||||
.visibilityBadge.off {
|
||||
background: rgba(255,255,255,0.05); color: var(--text-muted);
|
||||
border-color: rgba(255,255,255,0.12);
|
||||
}
|
||||
.termsSideBySide {
|
||||
display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px;
|
||||
}
|
||||
@@ -76,21 +84,20 @@
|
||||
<a class="termsRowMain" href="/op/agreement/<%= packKey %>/<%= item.kind %>" style="text-decoration:none; color:inherit;">
|
||||
<div class="termsRowLabel">
|
||||
<h2><%= item.label %></h2>
|
||||
<% if (item.builtin) { %>
|
||||
<span class="builtinBadge"><%= t('terms.builtinBadge') %></span>
|
||||
<% } %>
|
||||
<span class="visibilityBadges">
|
||||
<span class="visibilityBadge <%= item.showInInstaller ? '' : 'off' %>"><%= t('terms.visibilityInstallerShort') %></span>
|
||||
<span class="visibilityBadge <%= item.showInInstallerRp ? '' : 'off' %>"><%= t('terms.visibilityInstallerRpShort') %></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="termsRowSub"><%= item.kind %>.md</div>
|
||||
</a>
|
||||
<div class="termsRowActions">
|
||||
<a class="secondaryButton" href="/op/agreement/<%= packKey %>/<%= item.kind %>"><%= t('terms.edit') %></a>
|
||||
<% if (!item.builtin) { %>
|
||||
<form method="post" action="/op/agreement/<%= packKey %>/<%= item.kind %>/delete"
|
||||
onsubmit="return confirm('<%= t('terms.deleteConfirm', { label: item.label }).replace(/'/g, "\\'") %>');"
|
||||
style="margin:0;">
|
||||
<button type="submit" class="dangerButton"><%= t('terms.deleteButton') %></button>
|
||||
</form>
|
||||
<% } %>
|
||||
<form method="post" action="/op/agreement/<%= packKey %>/<%= item.kind %>/delete"
|
||||
onsubmit="return confirm('<%= t('terms.deleteConfirm', { label: item.label }).replace(/'/g, "\\'") %>');"
|
||||
style="margin:0;">
|
||||
<button type="submit" class="dangerButton"><%= t('terms.deleteButton') %></button>
|
||||
</form>
|
||||
</div>
|
||||
</article>
|
||||
<% }) %>
|
||||
|
||||
Reference in New Issue
Block a user