more user profile fixes

async-profile
Thibault Duplessis 2017-07-22 22:15:50 +02:00
parent 62a4a9cd1e
commit f455f3072f
4 changed files with 3 additions and 5 deletions

View File

@ -60,7 +60,7 @@ object User extends LilaController {
}
private def renderShow(u: UserModel, status: Results.Status = Results.Ok)(implicit ctx: Context) =
if (HTTPRequest.isSynchronousHttp(ctx.req)) for {
as <- Env.activity.read.recent(u.id, 30)
as <- Env.activity.read.recent(u.id, 7)
info Env.current.userInfo(u, ctx)
social Env.current.socialInfo(u, ctx)
} yield status(html.user.show.activity(u, as, info, social))

View File

@ -6,7 +6,6 @@
@if(!u.lame || ctx.is(u) || isGranted(_.UserSpy)) {
@if(filters.current.name == "search") {
@jsTag("search.js")
@jsTag("userShow.js")
}
@info.ratingChart.map { ratingChart =>
@jsTag("chart/ratingHistory.js")

View File

@ -2,7 +2,7 @@
<div class="content_box_inter tabs" id="games">
@filters.list.map { f =>
<a class="intertab@{ (filters.current == f).??(" active") }" href="@routes.User.games(u.username, f.name)">
<a class="intertab to_@f.name@if(filters.current == f){ active}" href="@routes.User.games(u.username, f.name)">
@userGameFilterTitle(info, f)
</a>
}
@ -15,7 +15,6 @@
<div class="search_result">
@if(filterName == "search") {
<div class="search_result">
@if(pager.nbResults > 0) {
<div class="search_status">
<strong>@pager.nbResults.localize games found</strong>
@ -35,7 +34,6 @@
<a class="permalink" href="@routes.User.games(u.username, filterName)">Permalink</a>
</div>
}
</div>
} else {
<div class="games infinitescroll @if(filterName == "playing" && pager.nbResults > 2) {game_list playing center}">
@pager.nextPage.map { np =>

View File

@ -122,6 +122,7 @@ $(function() {
return false;
});
$('.user_show').on('click', '#games a', function() {
if ($('#games .to_search').hasClass('active') || $(this).hasClass('to_search')) return true;
$filters = $(this).parent();
$(this).addClass('active');
browseTo($(this).attr('href'));