From 59a475163f90351e476cd9e466909b7f05f51e49 Mon Sep 17 00:00:00 2001 From: James Anderson Date: Mon, 10 Aug 2015 10:40:07 -0500 Subject: [PATCH 1/2] Hide avatar-changing instructions unless it's your profile (resolves #1107) --- templates/user/profile.tmpl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl index c8b7c591..c799bedc 100644 --- a/templates/user/profile.tmpl +++ b/templates/user/profile.tmpl @@ -4,12 +4,14 @@
- {{if .Owner.UseCustomAvatar}} + {{if and (.Owner.UseCustomAvatar) (eq .SignedUser.Id .Owner.Id)}} - {{else}} + {{else if eq .SignedUser.Id .Owner.Id}} + {{else}} + {{end}} - +
{{if .Owner.FullName}}{{.Owner.FullName}}
{{end}} @@ -17,7 +19,7 @@
-
+
    {{if .Owner.Location}}
  •   {{.Owner.Location}}
  • From e5146155a0bd4415cc274c6f67218293715183a2 Mon Sep 17 00:00:00 2001 From: James Anderson Date: Mon, 10 Aug 2015 10:43:14 -0500 Subject: [PATCH 2/2] Resize avatars to the same size they are displayed --- models/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/user.go b/models/user.go index 3b28f5ed..88889672 100644 --- a/models/user.go +++ b/models/user.go @@ -194,7 +194,7 @@ func (u *User) UploadAvatar(data []byte) error { if err != nil { return err } - m := resize.Resize(200, 200, img, resize.NearestNeighbor) + m := resize.Resize(234, 234, img, resize.NearestNeighbor) sess := x.NewSession() defer sess.Close()