Adds the script type to the create-overlay modal (with an admin-only system-wide checkbox) and a script-section to the detail page: textarea for the bash body, Save / Rebuild / Wipe buttons, last_build_status badge, latest-build-job link, and a Wipe confirm modal. Removes the GlobalOverlaySource block. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
54 lines
2.1 KiB
HTML
54 lines
2.1 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Overlays | left4me{% endblock %}
|
|
|
|
{% block content %}
|
|
<section class="panel">
|
|
<div class="page-heading">
|
|
<h1>Overlays</h1>
|
|
<button type="button" data-modal-open="create-overlay-modal">+ Create</button>
|
|
</div>
|
|
|
|
<table class="table">
|
|
<thead><tr><th>Name</th><th>Type</th><th>Scope</th><th>Path</th></tr></thead>
|
|
<tbody>
|
|
{% for overlay in overlays %}
|
|
<tr>
|
|
<td><a href="/overlays/{{ overlay.id }}">{{ overlay.name }}</a></td>
|
|
<td>{{ overlay.type }}</td>
|
|
<td class="muted">{% if overlay.user_id %}private{% else %}system{% endif %}</td>
|
|
<td class="muted">{{ overlay.path }}</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr><td colspan="4" class="muted">No overlays yet.</td></tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
|
|
<dialog id="create-overlay-modal" class="modal" aria-labelledby="create-overlay-title">
|
|
<form method="post" action="/overlays" class="stack">
|
|
<div class="modal-header">
|
|
<h2 id="create-overlay-title">Create overlay</h2>
|
|
<button type="button" class="modal-close" data-modal-close aria-label="Close">×</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<input type="hidden" name="csrf_token" value="{{ session.get('csrf_token', '') }}">
|
|
<fieldset class="overlay-type-radio">
|
|
<legend>Type</legend>
|
|
<label><input type="radio" name="type" value="workshop" checked> Workshop (downloads from Steam)</label>
|
|
<label><input type="radio" name="type" value="script"> Script (runs sandboxed bash)</label>
|
|
</fieldset>
|
|
<label>Name <input name="name" required></label>
|
|
{% if g.user and g.user.admin %}
|
|
<label><input type="checkbox" name="system_wide" value="1"> System-wide (visible to all users)</label>
|
|
{% endif %}
|
|
<p class="muted">The path is generated automatically.</p>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="button-secondary" data-modal-close>Cancel</button>
|
|
<button type="submit">Create</button>
|
|
</div>
|
|
</form>
|
|
</dialog>
|
|
{% endblock %}
|