Add configurable max revisions limit with customer counter and operator override

This commit is contained in:
Troll (Hermes Agent) 2026-08-01 21:36:23 +00:00
parent 5b6012aa3d
commit 506d07179a
5 changed files with 99 additions and 22 deletions

View file

@ -194,6 +194,18 @@
<p><strong>Uploads:</strong><br><span class="path">{{ upload_path }}</span></p>
</div>
<!-- Settings controls -->
<div class="section">
<h2>Booth Settings</h2>
<form method="POST">
<input type="hidden" name="action" value="save_max_revisions">
<label for="max_revisions">Maximum customer revisions allowed</label>
<input type="number" id="max_revisions" name="max_revisions" min="0" value="{{ current_max_revisions }}">
<p class="copy-hint">Set to 0 to disable customer-submitted revisions. Operators can still upload new versions manually.</p>
<button type="submit">Save Revision Limit</button>
</form>
</div>
<!-- System reset -->
<div class="danger-zone">
<h2>⚠️ Reset System</h2>

View file

@ -130,14 +130,19 @@
</div>
</form>
{% if revisions_left > 0 %}
<!-- Revision form: customer asks for changes -->
<form method="POST" action="{{ url_for('revise', token=req.player_token) }}">
<p style="color:#93c5fd;font-weight:600">Revisions remaining: {{ revisions_left }}</p>
<label for="revision_note">Or ask for changes:</label>
<textarea id="revision_note" name="revision_note" placeholder="e.g. make the chorus louder, swap a lyric..."></textarea>
<div class="actions">
<button type="submit" class="revision">Request Changes</button>
</div>
</form>
{% else %}
<p style="margin-top:1rem;color:#f87171;font-weight:600">No revisions remaining. Please speak to the booth operator if you need further changes.</p>
{% endif %}
{% endif %}
</div>