All checks were successful
release-tag / release-image (push) Successful in 1m41s
68 lines
2.4 KiB
HTML
68 lines
2.4 KiB
HTML
<!doctype html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>{{.Title}} · SEND.NRW Chat</title>
|
|
<script src="https://unpkg.com/htmx.org@1.9.12"></script>
|
|
<link rel="stylesheet" href="/static/app.css">
|
|
</head>
|
|
<body>
|
|
<div class="shell">
|
|
<header class="topbar">
|
|
<a class="brand" href="/rooms">SEND.NRW Chat</a>
|
|
<form method="post" action="/logout">
|
|
{{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>
|
|
<main class="grid-page">
|
|
<section class="hero card">
|
|
<div>
|
|
<p class="eyebrow">Räume</p>
|
|
<h1>Wähle einen Chatraum</h1>
|
|
<p class="muted">Du siehst nur Räume, für die du Leserechte hast. Schreibrechte werden im Raum geprüft.</p>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="room-grid">
|
|
{{range .Rooms}}
|
|
<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>
|
|
</html>
|