Phase 2.9 complete
This commit is contained in:
@@ -66,6 +66,38 @@
|
||||
<button type="submit" class="btn btn-primary"><i class="fas fa-check"></i> Save changes</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% if project.category == 'non_pack' %}
|
||||
<div class="card" style="margin-top: 20px;">
|
||||
<h2><i class="fas fa-film"></i> Animation Director ID</h2>
|
||||
<p class="bio-help">The <code>animationframework.id</code> that applications use to check for updates.</p>
|
||||
<form method="post" action="{% url 'library:regenerate_metadata' project.slug %}">
|
||||
{% csrf_token %}
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="edit_af_namespace">Namespace</label>
|
||||
<input type="text" id="edit_af_namespace" name="af_namespace" value="{{ anim_edit.namespace }}" autocomplete="off">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="edit_af_pack_id">Pack ID</label>
|
||||
<input type="text" id="edit_af_pack_id" name="af_pack_id" value="{{ anim_edit.pack_id }}" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<p class="bio-help">
|
||||
Current ID:
|
||||
{% if anim_edit.current %}
|
||||
<code>{{ anim_edit.current }}</code>
|
||||
{% else %}
|
||||
<em>none</em>
|
||||
{% endif %}
|
||||
· Full ID: <code id="edit-af-preview">{{ anim_edit.namespace }}:{{ anim_edit.pack_id }}</code>
|
||||
</p>
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-secondary"><i class="fas fa-sync"></i> Regenerate metadata</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
@@ -78,10 +110,19 @@
|
||||
(function () {
|
||||
const cat = document.getElementById('id_category');
|
||||
const group = document.getElementById('description-group');
|
||||
if (!cat || !group) return;
|
||||
function toggle() { group.style.display = cat.value === 'guide' ? 'none' : ''; }
|
||||
cat.addEventListener('change', toggle);
|
||||
toggle();
|
||||
if (cat && group) {
|
||||
function toggle() { group.style.display = cat.value === 'guide' ? 'none' : ''; }
|
||||
cat.addEventListener('change', toggle);
|
||||
toggle();
|
||||
}
|
||||
const ns = document.getElementById('edit_af_namespace');
|
||||
const pid = document.getElementById('edit_af_pack_id');
|
||||
const preview = document.getElementById('edit-af-preview');
|
||||
if (ns && pid && preview) {
|
||||
function update() { preview.textContent = ns.value + ':' + pid.value; }
|
||||
ns.addEventListener('input', update);
|
||||
pid.addEventListener('input', update);
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -38,6 +38,33 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if anim_meta.show_fields %}
|
||||
<div class="form-group">
|
||||
<label>Animation Director ID</label>
|
||||
<p class="anim-warning"><i class="fas fa-exclamation-triangle"></i> This pack has no <code>animationframework.id</code>. One will be added to the downloadable pack so applications can check for updates.</p>
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="af_namespace">Namespace</label>
|
||||
<input type="text" id="af_namespace" name="af_namespace" value="{{ anim_meta.namespace }}" autocomplete="off">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="af_pack_id">Pack ID</label>
|
||||
<input type="text" id="af_pack_id" name="af_pack_id" value="{{ anim_meta.pack_id }}" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<p class="bio-help">Full ID: <code id="af-preview">{{ anim_meta.namespace }}:{{ anim_meta.pack_id }}</code></p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if anim_meta.show_confirm %}
|
||||
<div class="form-group">
|
||||
<label>
|
||||
<input type="checkbox" name="confirm_replace_identity" value="1">
|
||||
Replace pack identity (the uploaded pack has a different <code>animationframework.id</code> than this project)
|
||||
</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="form-group">
|
||||
{{ version_form.changelog.errors }}
|
||||
<label for="{{ version_form.changelog.id_for_label }}">{{ version_form.changelog.label }}</label>
|
||||
@@ -55,4 +82,17 @@
|
||||
{{ pending_uploads|json_script:'packs-pending-uploads' }}
|
||||
<script src="{% static 'js/uploads.js' %}"></script>
|
||||
<script src="{% static 'js/version_upload.js' %}"></script>
|
||||
{% if anim_meta.show_fields %}
|
||||
<script>
|
||||
(function () {
|
||||
const ns = document.getElementById('af_namespace');
|
||||
const pid = document.getElementById('af_pack_id');
|
||||
const preview = document.getElementById('af-preview');
|
||||
if (!ns || !pid || !preview) return;
|
||||
function update() { preview.textContent = ns.value + ':' + pid.value; }
|
||||
ns.addEventListener('input', update);
|
||||
pid.addEventListener('input', update);
|
||||
})();
|
||||
</script>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user