whatapp-go-pvnet/frontend/templates/admin_conversations_thread.pages.tmpl
2025-05-09 15:31:20 +02:00

46 lines
943 B
Cheetah

{{ define "admin_conversations_thread.pages.tmpl" }}
<div class="chat-thread">
{{ range .Conversations }}
<div class="bubble {{ if eq .Direction "inbound" }}left{{ else }}right{{ end }}">
<div class="meta">
<small><strong>{{ .From }}</strong> — {{ .CreatedAt.Format "2006-01-02 15:04:05" }}</small>
</div>
<div class="content">
{{ .Content }}
</div>
</div>
{{ end }}
</div>
<style>
.chat-thread {
padding: 1rem;
background: #f5f5f5;
border: 1px solid #ccc;
border-radius: 0.5rem;
max-height: 400px;
overflow-y: auto;
}
.bubble {
padding: 0.5rem 1rem;
margin-bottom: 0.5rem;
border-radius: 1rem;
max-width: 75%;
clear: both;
display: inline-block;
}
.bubble.left {
background-color: #e0e0e0;
float: left;
}
.bubble.right {
background-color: #d1e7dd;
float: right;
}
.meta {
font-size: 0.75rem;
color: #666;
margin-bottom: 0.25rem;
}
</style>
{{ end }}