Support akkoma custom reactions, worst quality

This commit is contained in:
localhost_frssoft 2022-10-23 02:43:38 +03:00
parent cbbebe6b15
commit b07793e986
3 changed files with 15 additions and 0 deletions

View File

@ -20,6 +20,9 @@ type ReactionsPleroma struct {
Count int `json:"count"`
Me bool `json:"me"`
Name string `json:"name"`
// For support akkoma reactions :)
Url *string `json:"url"`
}
type ReplyInfo struct {

View File

@ -20,7 +20,11 @@
<div class="page-title"> Who reacted </div>
{{range .Reactions}}
{{if .Url}}
<div class="page-title"><img src="{{.Url}}" height=32 width=32></img></div>
{{else}}
<div class="page-title">{{.Name}}</div>
{{end}}
{{template "userlist.tmpl" (WithContext .Accounts $.Ctx)}}
{{end}}
{{end}}

View File

@ -105,13 +105,21 @@
<form action="/unreact-with/{{$st_id}}?emoji={{.Name}}" method="post" target="_self">
<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
<input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
{{if .Url}}
<input type="image" src="{{.Url}}" alt="{{.Name}}{{.Count}}*" height=36 width=36 class="pleroma-emoji">
{{else}}
<input type="submit" value="{{.Name}}{{.Count}}*" class="pleroma-emoji">
{{end}}
</form>
{{else}}
<form action="/react-with/{{$st_id}}?emoji={{.Name}}" method="post" target="_self">
<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
<input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
{{if .Url}}
<input type="image" src="{{.Url}}" alt="{{.Name}}{{.Count}}" height=32 width=32 class="pleroma-emoji">
{{else}}
<input type="submit" value="{{.Name}}{{.Count}}" class="pleroma-emoji">
{{end}}
</form>
{{end}}
{{end}}