From 2fecaf961845f6ae77f15d13d8b2934de4ac39aa Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Thu, 19 Nov 2015 15:18:53 -0800 Subject: [PATCH] Show AI flare in ladders. Show more players for league ladders. --- app/styles/play/ladder/ladder-tab-view.sass | 3 +++ app/templates/play/ladder/ladder-tab-view.jade | 4 ++-- app/views/ladder/LadderTabView.coffee | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/styles/play/ladder/ladder-tab-view.sass b/app/styles/play/ladder/ladder-tab-view.sass index c296a9770..aa68deb63 100644 --- a/app/styles/play/ladder/ladder-tab-view.sass +++ b/app/styles/play/ladder/ladder-tab-view.sass @@ -3,6 +3,9 @@ .name-col-cell max-width: 170px + &.ai + color: #3f44bf + .histogram-display height: 130px diff --git a/app/templates/play/ladder/ladder-tab-view.jade b/app/templates/play/ladder/ladder-tab-view.jade index 77cb556de..a5ee56927 100644 --- a/app/templates/play/ladder/ladder-tab-view.jade +++ b/app/templates/play/ladder/ladder-tab-view.jade @@ -31,7 +31,7 @@ td.hero-portrait-cell(style="background-image: url(/file/db/thang.type/#{(session.get('heroConfig') || {}).thangType || '529ffbf1cf1818f2be000001'}/portrait.png)") td.rank-cell= rank + 1 td.score-cell= Math.round(sessionStats.totalScore * 100) - td.name-col-cell= session.get('creatorName') || "Anonymous" + td(class='name-col-cell' + ((new RegExp('(Simple|Shaman|Brawler|Chieftain|Thoktar) AI')).test(session.get('creatorName')) ? ' ai' : ''))= session.get('creatorName') || "Anonymous" td.age-cell= moment(session.get('submitDate')).fromNow().replace('a few ', '') td.fight-cell a(href="/play/level/#{level.get('slug') || level.id}?team=#{team.otherTeam}&opponent=#{session.id}" + (league ? "&league=" + league.id : "")) @@ -51,7 +51,7 @@ td.hero-portrait-cell(style="background-image: url(/file/db/thang.type/#{(session.get('heroConfig') || {}).thangType || '529ffbf1cf1818f2be000001'}/portrait.png)") td.rank-cell= session.rank td.score-cell= Math.round(sessionStats.totalScore * 100) - td.name-col-cell= session.get('creatorName') || "Anonymous" + td(class='name-col-cell' + ((new RegExp('(Simple|Shaman|Brawler|Chieftain|Thoktar) AI')).test(session.get('creatorName')) ? ' ai' : ''))= session.get('creatorName') || "Anonymous" td.age-cell= moment(session.get('submitDate')).fromNow().replace('a few ', '') td.fight-cell a(href="/play/level/#{level.get('slug') || level.id}?team=#{team.otherTeam}&opponent=#{session.id}" + (league ? "&league=" + league.id : "")) diff --git a/app/views/ladder/LadderTabView.coffee b/app/views/ladder/LadderTabView.coffee index 10047ff61..0ce004143 100644 --- a/app/views/ladder/LadderTabView.coffee +++ b/app/views/ladder/LadderTabView.coffee @@ -150,7 +150,7 @@ module.exports = class LadderTabView extends CocoView refreshLadder: -> @supermodel.resetProgress() - @ladderLimit ?= parseInt @getQueryVariable('top_players', 20) + @ladderLimit ?= parseInt @getQueryVariable('top_players', if @options.league then 100 else 20) for team in @teams if oldLeaderboard = @leaderboards[team.id] @supermodel.removeModelResource oldLeaderboard