mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 10:06:08 -05:00
Merge branch 'master' into production
This commit is contained in:
commit
03e46cec22
6 changed files with 20 additions and 8 deletions
|
@ -1,7 +1,9 @@
|
||||||
#choose-language-modal
|
#choose-language-modal
|
||||||
button
|
button
|
||||||
margin: 20px 0 10px
|
margin: 20px 0 10px
|
||||||
|
img
|
||||||
|
width: 30px
|
||||||
|
|
||||||
.progress
|
.progress
|
||||||
width: 50%
|
width: 50%
|
||||||
margin: 50px 25%
|
margin: 50px 25%
|
||||||
|
|
|
@ -8,10 +8,14 @@ block modal-header-content
|
||||||
|
|
||||||
block modal-body-content
|
block modal-body-content
|
||||||
#choice-area.text-center
|
#choice-area.text-center
|
||||||
button.lang-choice-btn.btn.btn-success.btn-lg(data-language='python') Python
|
button.lang-choice-btn.btn.btn-success.btn-lg(data-language='python')
|
||||||
|
img(src="/images/common/code_languages/python_small.png")
|
||||||
|
span.spl Python
|
||||||
p(data-i18n="choose_hero.python_blurb")
|
p(data-i18n="choose_hero.python_blurb")
|
||||||
|
|
||||||
button.lang-choice-btn.btn.btn-default(data-language='javascript') JavaScript
|
button.lang-choice-btn.btn.btn-default(data-language='javascript')
|
||||||
|
img(src="/images/common/code_languages/javascript_small.png")
|
||||||
|
span.spl JavaScript
|
||||||
p(data-i18n="choose_hero.javascript_blurb")
|
p(data-i18n="choose_hero.javascript_blurb")
|
||||||
|
|
||||||
#saving-progress.progress.progress-striped.active.hide
|
#saving-progress.progress.progress-striped.active.hide
|
||||||
|
|
|
@ -18,7 +18,7 @@ block content
|
||||||
strong= me.get('name') || me.get('email')
|
strong= me.get('name') || me.get('email')
|
||||||
|
|
||||||
p
|
p
|
||||||
span.spr This isn't you?
|
span.spr Not you?
|
||||||
a#log-out-link Logout
|
a#log-out-link Logout
|
||||||
|
|
||||||
hr
|
hr
|
||||||
|
@ -34,7 +34,7 @@ block content
|
||||||
p
|
p
|
||||||
strong Hi adventurer, welcome back!
|
strong Hi adventurer, welcome back!
|
||||||
p
|
p
|
||||||
a#continue-playing-btn.btn.btn-default(href=view.continuePlayingLink()) Continue playing
|
a#continue-playing-btn.btn.btn-success.btn-lg(href=view.continuePlayingLink()) Continue Playing
|
||||||
p
|
p
|
||||||
em.spr
|
em.spr
|
||||||
span.spr Last Played:
|
span.spr Last Played:
|
||||||
|
@ -44,13 +44,13 @@ block content
|
||||||
p
|
p
|
||||||
strong More options:
|
strong More options:
|
||||||
p
|
p
|
||||||
button#start-new-game-btn.btn.btn-default Start New Game
|
button#start-new-game-btn.btn.btn-default.btn-lg Start New Game
|
||||||
|
|
||||||
if me.isAnonymous()
|
if me.isAnonymous()
|
||||||
p - OR -
|
p - OR -
|
||||||
|
|
||||||
p
|
p
|
||||||
button#log-in-btn.btn.btn-default(data-i18n="login.log_in")
|
button#log-in-btn.btn.btn-default.btn-lg(data-i18n="login.log_in")
|
||||||
|
|
||||||
#begin-hoc-area.hide
|
#begin-hoc-area.hide
|
||||||
h2.text-center(data-i18n="common.loading")
|
h2.text-center(data-i18n="common.loading")
|
||||||
|
|
|
@ -24,5 +24,7 @@ block modal-body-content
|
||||||
input#log-in-btn.btn.btn-default(data-i18n="[value]login.log_in", type="submit")
|
input#log-in-btn.btn.btn-default(data-i18n="[value]login.log_in", type="submit")
|
||||||
p
|
p
|
||||||
a#create-new-account-link(data-i18n="login.signup_switch")
|
a#create-new-account-link(data-i18n="login.signup_switch")
|
||||||
|
p
|
||||||
|
a(data-toggle="coco-modal", data-target="core/RecoverModal", data-i18n="login.forgot_password") Forgot your password?
|
||||||
|
|
||||||
block modal-footer-content
|
block modal-footer-content
|
|
@ -26,6 +26,10 @@ module.exports = class StudentSignInModal extends ModalView
|
||||||
auth.loginUser data, (jqxhr) =>
|
auth.loginUser data, (jqxhr) =>
|
||||||
error = jqxhr.responseJSON[0]
|
error = jqxhr.responseJSON[0]
|
||||||
message = _.filter([error.property, error.message]).join(' ')
|
message = _.filter([error.property, error.message]).join(' ')
|
||||||
|
if message is 'Missing credentials'
|
||||||
|
message = 'Enter both username and password'
|
||||||
|
# TODO: Make the server return better error message
|
||||||
|
message = _.string.capitalize(message)
|
||||||
@disableModalInProgress(@$el)
|
@disableModalInProgress(@$el)
|
||||||
@$('#errors-alert').text(message).removeClass('hide')
|
@$('#errors-alert').text(message).removeClass('hide')
|
||||||
|
|
||||||
|
|
|
@ -424,7 +424,7 @@ module.exports = class PlayLevelView extends RootView
|
||||||
@simulator.fetchAndSimulateOneGame()
|
@simulator.fetchAndSimulateOneGame()
|
||||||
|
|
||||||
shouldSimulate: ->
|
shouldSimulate: ->
|
||||||
return false # Performance is too bad right now, gotta fix it first.
|
return @getQueryVariable('simulate') is true # Performance is too bad right now, gotta fix it first.
|
||||||
# Crude heuristics are crude.
|
# Crude heuristics are crude.
|
||||||
defaultCores = 2
|
defaultCores = 2
|
||||||
cores = window.navigator.hardwareConcurrency or defaultCores # Available on Chrome/Opera, soon Safari
|
cores = window.navigator.hardwareConcurrency or defaultCores # Available on Chrome/Opera, soon Safari
|
||||||
|
|
Loading…
Reference in a new issue