update admin und löschung
release-tag / release-image (push) Successful in 1m41s

This commit is contained in:
2026-05-15 09:08:50 +02:00
parent be7bd79fc7
commit 9ee6d3c919
10 changed files with 715 additions and 70 deletions
+21 -2
View File
@@ -12,7 +12,8 @@
<header class="topbar">
<a class="brand" href="/rooms">SEND.NRW Chat</a>
<form method="post" action="/logout">
<span class="user-pill">{{.Username}}</span>
{{if .CanAdmin}}<a class="ghost link-button" href="/admin">Admin</a>{{end}}
<span class="user-pill">{{.Username}} · {{.User.Role}}</span>
<button class="ghost" type="submit">Logout</button>
</form>
</header>
@@ -21,7 +22,7 @@
<div>
<p class="eyebrow">Räume</p>
<h1>Wähle einen Chatraum</h1>
<p class="muted">Nachrichten werden persistent gespeichert und live per Server-Sent Events verteilt.</p>
<p class="muted">Du siehst nur Räume, für die du Leserechte hast. Schreibrechte werden im Raum geprüft.</p>
</div>
</section>
@@ -30,18 +31,36 @@
<a class="room-card" href="/rooms/{{.ID}}">
<h2>{{.Name}}</h2>
<p>{{.Description}}</p>
<small>Lesen: {{.ReadAccess}} · Schreiben: {{.WriteAccess}}</small>
</a>
{{else}}
<div class="card"><p class="muted">Aktuell ist kein Raum für dich freigegeben.</p></div>
{{end}}
</section>
{{if .CanCreateRoom}}
<section class="card hero">
<h2>Neuen Raum erstellen</h2>
<form hx-post="/rooms" method="post" class="stack two-col-form">
<label>Name<input name="name" placeholder="Projekt Alpha" required minlength="2" maxlength="40"></label>
<label>Beschreibung<input name="description" placeholder="Worum geht es hier?" maxlength="120"></label>
<label>Wer darf sehen?
<select name="read_access">
{{range .AccessRules}}<option value="{{.}}">{{.}}</option>{{end}}
</select>
</label>
<label>Wer darf schreiben?
<select name="write_access">
{{range .AccessRules}}<option value="{{.}}">{{.}}</option>{{end}}
</select>
</label>
<label class="wide">Mitglieder für private Räume
<input name="members" placeholder="jan, anna, max">
</label>
<button type="submit">Raum erstellen</button>
</form>
</section>
{{end}}
</main>
</div>
</body>