From bc265c09ff68584517d4209998bb3693fa2339e0 Mon Sep 17 00:00:00 2001 From: KOUNOIKE Date: Sat, 9 Feb 2019 11:01:48 +0900 Subject: [PATCH] add avatar to username completion --- .../scala/gitbucket/core/controller/IndexController.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/scala/gitbucket/core/controller/IndexController.scala b/src/main/scala/gitbucket/core/controller/IndexController.scala index e55386440..2c3d4c8ad 100644 --- a/src/main/scala/gitbucket/core/controller/IndexController.scala +++ b/src/main/scala/gitbucket/core/controller/IndexController.scala @@ -10,6 +10,7 @@ import gitbucket.core.service._ import gitbucket.core.util.Implicits._ import gitbucket.core.util.SyntaxSugars._ import gitbucket.core.util._ +import gitbucket.core.view.helpers._ import org.scalatra.Ok import org.scalatra.forms._ @@ -206,7 +207,8 @@ trait IndexControllerBase extends ControllerBase { } .map { t => Map( - "label" -> s"@${StringUtil.escapeHtml(t.userName)} ${StringUtil.escapeHtml(t.fullName)}", + "label" -> s"${avatar(t.userName, 16)}@${StringUtil.escapeHtml(t.userName)} ${StringUtil + .escapeHtml(t.fullName)}", "value" -> t.userName ) }