Add template file for previous commit
This commit is contained in:
parent
62500d69dd
commit
47dbd4fe42
@ -0,0 +1,22 @@
|
||||
{{/*
|
||||
Equivalent of an "author info", but for chats; could be an author info or a group-chat.
|
||||
*/}}
|
||||
{{define "chat-profile-image"}}
|
||||
{{if (eq .Type "ONE_TO_ONE")}}
|
||||
{{range .Participants}}
|
||||
{{if (ne .UserID (active_user).ID)}}
|
||||
<!-- This is some fuckery; I have no idea why "hx-target" is needed, but otherwise it targets the #chat-view. -->
|
||||
<div class="click-eater" hx-trigger="click consume" hx-target="body">
|
||||
{{template "author-info" (user .UserID)}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{else}}
|
||||
<div class="groupchat-info row">
|
||||
{{template "circle-profile-img-no-link" (dict "IsContentDownloaded" false "ProfileImageUrl" .AvatarImageRemoteURL)}}
|
||||
<div class="click-eater" hx-trigger="click consume" hx-target="body">
|
||||
<div class="groupchat-info__display-name">{{.Name}}</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
@ -549,8 +549,6 @@ func (p Profile) NextDMPage(c DMCursor) DMChatView {
|
||||
` + c.SortOrder.OrderByClause() + `
|
||||
limit ?
|
||||
`
|
||||
fmt.Printf("query: %s\n", q)
|
||||
fmt.Printf("Bind values: %#v\n", bind_values)
|
||||
|
||||
err := p.DB.Select(&msgs, q, bind_values...)
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user