mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-04 17:19:47 -04:00
Fixed a few UX issues Chloe found.
This commit is contained in:
parent
c16b0f97bf
commit
f16c1b5030
5 changed files with 25 additions and 11 deletions
app
models
styles
templates/play
views/play/modal
|
@ -389,7 +389,12 @@ module.exports = class ThangType extends CocoModel
|
|||
props = props.concat config.programmableSnippets
|
||||
for stat, value of stats when not value?
|
||||
stats[stat] = name: stat, display: '???'
|
||||
props: props, stats: stats
|
||||
statKeys = _.keys(stats)
|
||||
statKeys.sort()
|
||||
props.sort()
|
||||
sortedStats = {}
|
||||
sortedStats[key] = stats[key] for key in statKeys
|
||||
props: props, stats: sortedStats
|
||||
|
||||
formatStatDisplay: (name, modifiers) ->
|
||||
i18nKey = {
|
||||
|
@ -402,6 +407,7 @@ module.exports = class ThangType extends CocoModel
|
|||
visualRange: 'range'
|
||||
throwDamage: 'attack'
|
||||
throwRange: 'range'
|
||||
bashDamage: 'attack'
|
||||
}[name]
|
||||
|
||||
if i18nKey
|
||||
|
|
|
@ -296,6 +296,9 @@ $itemSlotGridHeight: 70px
|
|||
width: $itemSlotSize * 1.2
|
||||
height: $itemSlotSize * 1.2
|
||||
|
||||
button
|
||||
display: none
|
||||
|
||||
|
||||
//- Available equipment
|
||||
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
@import "app/styles/mixins"
|
||||
|
||||
#play-achievements-modal
|
||||
.modal-dialog
|
||||
width: 800px
|
||||
|
||||
.modal-header
|
||||
padding-bottom: 20px
|
||||
|
@ -16,6 +20,7 @@
|
|||
position: relative
|
||||
border: 2px solid rgb(75,75,75)
|
||||
padding: 2px
|
||||
@include opacity(0.75)
|
||||
|
||||
h3
|
||||
margin: 0 0 0 50px
|
||||
|
@ -27,7 +32,7 @@
|
|||
|
||||
.panel-body
|
||||
padding: 5px 150px 5px 5px
|
||||
border: 2px solid rgb(150,150,150)
|
||||
//border: 2px solid rgb(150,150,150) // Chloe's suggestion to not have this
|
||||
|
||||
.created
|
||||
position: absolute
|
||||
|
@ -43,6 +48,7 @@
|
|||
background: rgb(50,40,33)
|
||||
border: 5px solid rgb(26,21,17)
|
||||
padding: 0
|
||||
@include opacity(1)
|
||||
|
||||
h3
|
||||
color: white
|
||||
|
@ -79,4 +85,4 @@
|
|||
|
||||
img
|
||||
width: 12px
|
||||
height: 12px
|
||||
height: 12px
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
|
||||
- var seenNext = nextLevel;
|
||||
each level in campaign.levels
|
||||
if true || !level.hidden
|
||||
if !level.hidden
|
||||
- var next = level.id == nextLevel || (!seenNext && levelStatusMap[level.id] != "complete" && !level.locked && !level.disabled && (!level.practice || me.getBranchingGroup() == 'all-practice'));
|
||||
- seenNext = seenNext || next;
|
||||
div(style="left: #{level.x}%; bottom: #{level.y}%; background-color: #{level.color}", class="level" + (next ? " next" : "") + (level.disabled ? " disabled" : "") + (level.locked ? " locked" : "") + " " + levelStatusMap[level.id] || "", data-level-id=level.id, title=level.name)
|
||||
div(style="left: #{level.x}%; bottom: #{level.y}%; background-color: #{level.color}", class="level" + (next ? " next" : "") + (level.disabled ? " disabled" : "") + (level.locked ? " locked" : "") + " " + levelStatusMap[level.id] || "", data-level-id=level.id, title=level.name + (level.disabled ? ' (Coming Soon to Adventurers)' : ''))
|
||||
a(href=level.type == 'hero' ? '#' : level.disabled ? "/play" : "/play/#{level.levelPath || 'level'}/#{level.id}", disabled=level.disabled, data-level-id=level.id, data-level-path=level.levelPath || 'level', data-level-name=level.name)
|
||||
div(style="left: #{level.x}%; bottom: #{level.y}%", class="level-shadow" + (next ? " next" : "") + " " + levelStatusMap[level.id] || "")
|
||||
.level-info-container(data-level-id=level.id, data-level-path=level.levelPath || 'level', data-level-name=level.name)
|
||||
|
|
|
@ -11,17 +11,16 @@ PAGE_SIZE = 200
|
|||
module.exports = class PlayAchievementsModal extends ModalView
|
||||
className: 'modal fade play-modal'
|
||||
template: template
|
||||
modalWidthPercent: 90
|
||||
id: 'play-achievements-modal'
|
||||
plain: true
|
||||
|
||||
|
||||
earnedMap: {}
|
||||
|
||||
constructor: (options) ->
|
||||
super options
|
||||
@achievements = new Backbone.Collection()
|
||||
earnedMap = {}
|
||||
|
||||
|
||||
achievementsFetcher = new CocoCollection([], {url: '/db/achievement', model: Achievement})
|
||||
achievementsFetcher.setProjection([
|
||||
'name'
|
||||
|
@ -32,10 +31,10 @@ module.exports = class PlayAchievementsModal extends ModalView
|
|||
'rewards'
|
||||
'collection'
|
||||
])
|
||||
|
||||
|
||||
earnedAchievementsFetcher = new CocoCollection([], {url: '/db/earned_achievement', model: EarnedAchievement})
|
||||
earnedAchievementsFetcher.setProjection([ 'achievement' ])
|
||||
|
||||
|
||||
achievementsFetcher.skip = 0
|
||||
achievementsFetcher.fetch({data: {skip: 0, limit: PAGE_SIZE}})
|
||||
earnedAchievementsFetcher.skip = 0
|
||||
|
@ -46,7 +45,7 @@ module.exports = class PlayAchievementsModal extends ModalView
|
|||
|
||||
@supermodel.loadCollection(achievementsFetcher, 'achievement')
|
||||
@supermodel.loadCollection(earnedAchievementsFetcher, 'achievement')
|
||||
|
||||
|
||||
@onEverythingLoaded = _.after(2, @onEverythingLoaded)
|
||||
|
||||
onAchievementsLoaded: (fetcher) ->
|
||||
|
|
Loading…
Add table
Reference in a new issue