fix user mini box relation controls
This commit is contained in:
parent
7349cc1ba2
commit
9ef9783474
|
@ -27,9 +27,11 @@ object User extends LilaController {
|
|||
OptionFuResult(UserRepo named username) { user =>
|
||||
GameRepo nowPlaying user.id zip
|
||||
(ctx.userId ?? { relationApi.blocks(user.id, _) }) zip
|
||||
(ctx.userId ?? { relationApi.follows(user.id, _) }) map {
|
||||
case ((game, blocked), followed) =>
|
||||
Ok(html.user.mini(user, game, blocked, followed)).withHeaders(CACHE_CONTROL -> "max-age=60")
|
||||
(ctx.userId ?? { relationApi.follows(user.id, _) }) zip
|
||||
(ctx.userId ?? { relationApi.relation(_, user.id) }) map {
|
||||
case (((game, blocked), followed), relation) =>
|
||||
Ok(html.user.mini(user, game, blocked, followed, relation))
|
||||
.withHeaders(CACHE_CONTROL -> "max-age=60")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@(u: User, playing: Option[Game], blocked: Boolean, followed: Boolean)(implicit ctx: Context)
|
||||
@(u: User, playing: Option[Game], blocked: Boolean, followed: Boolean, rel: Option[lila.relation.Relation])(implicit ctx: Context)
|
||||
<div class="title">
|
||||
@userLink(u, withPowerTip = false)
|
||||
@if(u.engine && ctx.me.fold(true)(u !=)) {
|
||||
|
@ -41,7 +41,7 @@
|
|||
</td>
|
||||
}
|
||||
}
|
||||
<td class="relation_actions">@relation.mini(u.id)</td>
|
||||
<td class="relation_actions">@relation.mini(u.id, rel)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
Loading…
Reference in a new issue