cmd/web: hide your profile pic if you authored the active paste

Closes #3

Signed-off-by: Xe Iaso <xe@tailscale.com>
This commit is contained in:
Xe Iaso 2023-02-22 15:36:26 +00:00
parent 4e3a9a3757
commit 7c9f31da09

View file

@ -1,6 +1,12 @@
{{template "header" .}}
{{if .UserInfo}}
{{if ne .PasterUserID .UserID}}
<div class="right">{{.PasterDisplayName}} <img style="width:32px;height:32px" src="{{.PasterProfilePicURL}}" /></div>
{{end}}
{{else}}
<div class="right">{{.PasterDisplayName}} <img style="width:32px;height:32px" src="{{.PasterProfilePicURL}}" /></div>
{{end}}
<p>Created at {{.CreatedAt}}</p>
@ -8,4 +14,5 @@
</code></pre>
<a href="/paste/{{.ID}}">Permalink</a> - <a href="/paste/{{.ID}}/dl">Download</a> - <a href="/paste/{{.ID}}/raw">Raw</a>{{if eq .UserID .PasterUserID}} - <a href="/api/delete/{{.ID}}">Delete</a>{{end}}
{{template "footer" .}}