Add unreact and reaction count; added mark self reactions as "*"

This commit is contained in:
localhost_frssoft 2022-10-19 15:47:31 +03:00
parent 4e79142c93
commit 927bd6127c
4 changed files with 43 additions and 4 deletions

View file

@ -101,11 +101,19 @@
{{if .Pleroma.Reactions}}
<div class="pleroma-reactions">
{{range .Pleroma.Reactions}}
<form action="/react-with/{{$st_id}}?emoji={{.Name}}" method="post" target="_self" title="Who reacted:&#10;{{range .Accounts}}{{.Acct}}&#10;{{end}}">
{{if .Me}}
<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}}">
<input type="submit" value="{{.Name}}" class="pleroma-emoji">
<input type="submit" value="{{.Name}}{{.Count}}*" class="pleroma-emoji">
</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}}">
<input type="submit" value="{{.Name}}{{.Count}}" class="pleroma-emoji">
</form>
{{end}}
{{end}}
</div>
{{end}}