type ThreadPageTemplateData struct {
Statuses []*mastodon.Status
- PostReply bool
ReplyToID string
ReplyContent string
ReplyMap map[string][]mastodon.ReplyInfo
NavbarData *NavbarTemplateData
}
-func NewThreadPageTemplateData(statuses []*mastodon.Status, postReply bool, replyToID string, replyContent string, replyMap map[string][]mastodon.ReplyInfo, navbarData *NavbarTemplateData) *ThreadPageTemplateData {
+func NewThreadPageTemplateData(statuses []*mastodon.Status, replyToID string, replyContent string, replyMap map[string][]mastodon.ReplyInfo, navbarData *NavbarTemplateData) *ThreadPageTemplateData {
return &ThreadPageTemplateData{
Statuses: statuses,
- PostReply: postReply,
ReplyToID: replyToID,
ReplyContent: replyContent,
ReplyMap: replyMap,
return
}
- data := renderer.NewThreadPageTemplateData(statuses, reply, replyToID, content, replyMap, navbarData)
+ data := renderer.NewThreadPageTemplateData(statuses, replyToID, content, replyMap, navbarData)
err = svc.renderer.RenderThreadPage(ctx, client, data)
if err != nil {
return
{{if eq .ID $.ReplyToID}}
<form class="timeline-post-form" action="/post" method="POST" enctype="multipart/form-data">
- <input type="hidden" name="reply_to_id" value="{{.ReplyToID}}" />
- <label for="post-content"> Reply to {{.Status.Account.DisplayName}} </label>
+ <input type="hidden" name="reply_to_id" value="{{$.ReplyToID}}" />
+ <label for="post-content"> Reply to {{.Account.DisplayName}} </label>
<br/>
- <textarea id="post-content" name="content" class="post-content" cols="50" rows="5">{{.ReplyContent}}</textarea>
+ <textarea id="post-content" name="content" class="post-content" cols="50" rows="5">{{$.ReplyContent}}</textarea>
<br/>
Attachments <input id="post-file-picker" type="file" name="attachments" multiple>
<br/>