Limit to showing 6 concepts. For now, show the last 6 in the array.
This commit is contained in:
parent
b6cbf84f48
commit
11aeb05e66
2 changed files with 9 additions and 4 deletions
app
|
@ -39,9 +39,9 @@ if campaign
|
||||||
a.spr(href="/contribute/adventurer")
|
a.spr(href="/contribute/adventurer")
|
||||||
strong(data-i18n="play.awaiting_levels_adventurer") Sign up as an Adventurer
|
strong(data-i18n="play.awaiting_levels_adventurer") Sign up as an Adventurer
|
||||||
span.spl(data-i18n="play.awaiting_levels_adventurer_suffix") to be the first to play new levels.
|
span.spl(data-i18n="play.awaiting_levels_adventurer_suffix") to be the first to play new levels.
|
||||||
if level.concepts && level.concepts.length
|
if level.displayConcepts && level.displayConcepts.length
|
||||||
p
|
p
|
||||||
for concept in level.concepts
|
for concept in level.displayConcepts
|
||||||
kbd(data-i18n="concepts." + concept)
|
kbd(data-i18n="concepts." + concept)
|
||||||
|
|
||||||
if !level.disabled && !level.locked
|
if !level.disabled && !level.locked
|
||||||
|
|
|
@ -275,6 +275,11 @@ module.exports = class CampaignView extends RootView
|
||||||
if level.unlocksHero
|
if level.unlocksHero
|
||||||
level.purchasedHero = level.unlocksHero in (me.get('purchased')?.heroes or [])
|
level.purchasedHero = level.unlocksHero in (me.get('purchased')?.heroes or [])
|
||||||
level.hidden = level.locked
|
level.hidden = level.locked
|
||||||
|
if level.concepts?.length
|
||||||
|
level.displayConcepts = level.concepts
|
||||||
|
maxConcepts = 6
|
||||||
|
if level.displayConcepts.length > maxConcepts
|
||||||
|
level.displayConcepts = level.displayConcepts.slice -maxConcepts
|
||||||
level
|
level
|
||||||
|
|
||||||
countLevels: (levels) ->
|
countLevels: (levels) ->
|
||||||
|
|
Reference in a new issue