SielBotWebsite/templates/tempvoice.html
Maaxxs 387d7bd80e Meldungen: Text und Knopf des Melde-Panels frei gestaltbar (Editor mit Vorschau, Platzhalter)
Platzhalter {leitung} {punkte} {schwelle} {stunden} {tage} zeigen die aktuellen
Werte; ein gepostetes Panel wird nach dem Speichern ohne neuen Ping angepasst.
Der Editor nimmt dafuer optional ctx.fill fuer eigene Platzhalter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 07:18:01 +02:00

62 lines
3.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends "base.html" %}
{% block title %}Sprachkanäle{% endblock %}
{% block content %}
<div class="page-head">
<h1>Temporäre Sprachkanäle</h1>
<p class="muted">Wer einen Auslösekanal betritt, bekommt einen eigenen Sprachkanal – ist er leer, verschwindet er wieder. Im Raum stellt der Ersteller mit <code>/raum</code> Name, Limit und Zugang ein.</p>
</div>
{% if error %}<div class="flash flash-error">{{ error }}</div>{% endif %}
<section class="panel" id="offen">
<div class="panel-head">
<h2>Gerade offen <span class="muted">({{ data.channels | length }})</span></h2>
<a href="/sprachkanaele#offen" class="btn btn-sm btn-secondary">Aktualisieren</a>
</div>
{% if data.channels %}
<div class="table-wrap">
<table class="table">
<thead><tr><th>Kanal</th><th>Leitung</th><th>Drin</th><th>Offen seit</th><th>Über</th><th></th></tr></thead>
<tbody>
{% for c in data.channels %}
<tr>
<td><strong>{{ c.name }}</strong>{% if c.locked %} <span class="tag">🔒 gesperrt</span>{% endif %}
<div class="muted small">{{ c.category or "ohne Kategorie" }}{% if c.limit %} · Limit {{ c.limit }}{% endif %}</div></td>
<td>{{ c.owner_name }}</td>
<td>{{ c.members | length }}{% if c.members %}<div class="muted small">{{ c.members | join(", ") }}</div>{% endif %}</td>
<td class="small nowrap">{{ c.created_at | datetime }}</td>
<td class="small">{{ c.trigger or "–" }}</td>
<td>
<form method="post" action="/sprachkanaele/{{ c.channel_id }}/schliessen" data-confirm="„{{ c.name }}“ schließen? Alle darin fliegen aus dem Sprachkanal.">
<input type="hidden" name="csrf" value="{{ csrf }}">
<button type="submit" class="btn btn-sm btn-danger">Schließen</button>
</form>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<p class="muted">Gerade ist kein temporärer Sprachkanal offen.</p>
{% endif %}
</section>
{% if guild %}
<script type="application/json" id="tv-data">{{ {"generators": data.settings.generators, "channels": guild.channels} | tojson }}</script>
<form method="post" action="/sprachkanaele" class="panel" id="tv-form">
<input type="hidden" name="csrf" value="{{ csrf }}">
<input type="hidden" name="payload" id="tv-payload">
<h2>Auslösekanäle</h2>
<p class="muted small">Leg dafür in Discord einen normalen Sprachkanal an, z. B. „➕ Raum erstellen“, und wähle ihn hier aus. Im Namen ersetzt Siel <code>{user}</code> durch den Namen und <code>{nummer}</code> durch eine laufende Nummer.</p>
<div id="tv-list" class="tv-list"></div>
<button type="button" class="btn btn-sm btn-ghost" id="tv-add">+ Auslösekanal hinzufügen</button>
<div class="savebar">
<span class="muted small" id="dirty-note"></span>
<button type="submit" class="btn">Speichern</button>
</div>
</form>
<script src="/static/js/embed-editor.js?v=3"></script>
<script src="/static/js/tempvoice.js?v=1"></script>
{% endif %}
<script src="/static/js/confirm.js?v=1"></script>
{% endblock %}