mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
5b8d66cd1c
Don't show grey border around Anya in signup modal Refactor reload handling Fix courses page updating to chosen hero
20 lines
659 B
Text
20 lines
659 B
Text
mixin heroOption(hero)
|
|
- var heroOriginal = hero.get('original')
|
|
- var selectedState
|
|
if state.get('selectedHeroOriginal') === heroOriginal
|
|
- selectedState = 'selected'
|
|
else if view.options.showCurrentHero && state.get('currentHeroOriginal') === heroOriginal
|
|
- selectedState = 'current'
|
|
else
|
|
- selectedState = ''
|
|
.hero-option(data-hero-original=heroOriginal, class=selectedState)
|
|
.hero-avatar
|
|
img(src=hero.getPortraitURL())
|
|
.text-h5.hero-name
|
|
span= hero.getHeroShortName()
|
|
|
|
.hero-list
|
|
if view.heroes.loaded
|
|
each hero in view.heroes.models
|
|
if hero.get('heroClass') === 'Warrior'
|
|
+heroOption(hero)
|