Delete rooms done
This commit is contained in:
+26
-4
@@ -50,14 +50,16 @@
|
||||
{{if .Rooms}}
|
||||
<div class="rooms-grid">
|
||||
{{range .Rooms}}
|
||||
<a href="/rooms/{{.ID}}" class="room-card">
|
||||
<div class="room-header">
|
||||
<div class="room-card">
|
||||
<a href="/rooms/{{.ID}}" style="position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 1;"></a>
|
||||
<div class="room-header" style="position: relative; z-index: 2; pointer-events: none;">
|
||||
<span class="room-name">{{.Name}}</span>
|
||||
<div
|
||||
style="
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
align-items: center;
|
||||
pointer-events: auto;
|
||||
"
|
||||
>
|
||||
{{if .IsOwner}}
|
||||
@@ -73,15 +75,35 @@
|
||||
</span>
|
||||
{{end}}
|
||||
<span class="room-code">{{.Code}}</span>
|
||||
{{if .IsOwner}}
|
||||
<button
|
||||
type="button"
|
||||
class="story-action-btn story-action-delete"
|
||||
hx-post="/rooms/{{.ID}}/delete"
|
||||
hx-target="closest .room-card"
|
||||
hx-swap="outerHTML"
|
||||
hx-confirm="Delete this room?"
|
||||
title="Delete Room"
|
||||
aria-label="Delete Room"
|
||||
>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M3 6h18" />
|
||||
<path d="M8 6V4h8v2" />
|
||||
<path d="M19 6l-1 14H6L5 6" />
|
||||
<path d="M10 11v6" />
|
||||
<path d="M14 11v6" />
|
||||
</svg>
|
||||
</button>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="room-meta">
|
||||
<div class="room-meta" style="position: relative; z-index: 2; pointer-events: none;">
|
||||
<span class="room-scale">{{.Scale}}</span>
|
||||
<span class="room-members"
|
||||
>{{.MemberCount}} members</span
|
||||
>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{else}}
|
||||
|
||||
Reference in New Issue
Block a user