mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
Merge branch 'master' of https://github.com/codecombat/codecombat
This commit is contained in:
commit
371127a368
7 changed files with 45 additions and 6 deletions
|
@ -69,6 +69,11 @@
|
|||
change_hero: "Change Hero" # Go back from choose inventory to choose hero
|
||||
choose_inventory: "Equip Items"
|
||||
buy_gems: "Buy Gems"
|
||||
campaign_forest: "Forest Campaign"
|
||||
campaign_dungeon: "Dungeon Campaign"
|
||||
subscription_required: "Subscription Required"
|
||||
free: "Free"
|
||||
subscribed: "Subscribed"
|
||||
older_campaigns: "Older Campaigns"
|
||||
anonymous: "Anonymous Player"
|
||||
level_difficulty: "Difficulty: "
|
||||
|
@ -90,8 +95,6 @@
|
|||
campaign_player_created_description: "... in which you battle against the creativity of your fellow <a href=\"/contribute#artisan\">Artisan Wizards</a>."
|
||||
campaign_classic_algorithms: "Classic Algorithms"
|
||||
campaign_classic_algorithms_description: "... in which you learn the most popular algorithms in Computer Science."
|
||||
campaign_forest: "Forest Campaign"
|
||||
campaign_dungeon: "Dungeon Campaign"
|
||||
|
||||
login:
|
||||
sign_up: "Create Account"
|
||||
|
|
|
@ -466,7 +466,7 @@ module.exports = nativeDescription: "español (América Latina)", englishDescrip
|
|||
new_password: "Nueva Contraseña"
|
||||
new_password_verify: "Verificar"
|
||||
email_subscriptions: "Suscripciones de Email"
|
||||
email_subscriptions_none: "No tienes subcripciones."
|
||||
email_subscriptions_none: "No tienes suscripciones."
|
||||
email_announcements: "Noticias"
|
||||
email_announcements_description: "Recibe correos electrónicos con las últimas noticias y desarrollos de CodeCombat."
|
||||
email_notifications: "Notificaciones"
|
||||
|
|
|
@ -56,6 +56,8 @@ module.exports =
|
|||
'buy-gems-modal:purchase-initiated': c.object {required: ['productID']},
|
||||
productID: { type: 'string' }
|
||||
|
||||
'subscribe-modal:subscribed': c.object {}
|
||||
|
||||
'stripe:received-token': c.object { required: ['token'] },
|
||||
token: { type: 'object', properties: {
|
||||
id: {type: 'string'}
|
||||
|
|
|
@ -240,8 +240,8 @@ $gameControlMargin: 30px
|
|||
transform: rotate(-35deg)
|
||||
|
||||
&#dungeon-link
|
||||
left: 26.6%
|
||||
top: 43%
|
||||
left: 13.01%
|
||||
top: 58%
|
||||
transform: rotate(180deg)
|
||||
|
||||
.game-controls
|
||||
|
@ -332,6 +332,18 @@ $gameControlMargin: 30px
|
|||
&.vol-down .glyphicon.glyphicon-volume-down
|
||||
display: inline-block
|
||||
|
||||
#campaign-status
|
||||
position: absolute
|
||||
left: 0
|
||||
top: 15px
|
||||
width: 100%
|
||||
margin: 0
|
||||
text-align: center
|
||||
color: rgb(254,188,68)
|
||||
font-size: 30px
|
||||
text-shadow: black 2px 2px 0, black -2px -2px 0, black 2px -2px 0, black -2px 2px 0, black 2px 0px 0, black 0px -2px 0, black -2px 0px 0, black 0px 2px 0
|
||||
|
||||
|
||||
body:not(.ipad) #world-map-view
|
||||
.level-info-container
|
||||
pointer-events: none
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
span.spl.spr(data-i18n="general.player_level")
|
||||
span.spr= me.level()
|
||||
if me.get('anonymous')
|
||||
span.spr(data-i18n="play.anonymous_player") Anonymous Player
|
||||
span.spr(data-i18n="play.anonymous") Anonymous Player
|
||||
button.btn.btn-default.btn-flat.btn-sm(data-toggle='coco-modal', data-target='core/AuthModal', data-i18n="login.log_in")
|
||||
else
|
||||
span.spr= me.get('name')
|
||||
|
@ -72,3 +72,16 @@ button.btn.btn-lg.btn-inverse#volume-button(title="Adjust volume")
|
|||
.glyphicon.glyphicon-volume-off
|
||||
.glyphicon.glyphicon-volume-down
|
||||
.glyphicon.glyphicon-volume-up
|
||||
|
||||
h1#campaign-status
|
||||
if mapType == 'dungeon'
|
||||
span.spr(data-i18n="play.campaign_dungeon")
|
||||
else if mapType == 'forest'
|
||||
span.spr(data-i18n="play.campaign_forest")
|
||||
| -
|
||||
if requiresSubscription
|
||||
span.spl(data-i18n="play.subscription_required")
|
||||
else if mapType == 'dungeon'
|
||||
span.spl(data-i18n="play.free")
|
||||
else
|
||||
span.spl(data-i18n="play.subscribed")
|
|
@ -25,6 +25,9 @@ module.exports = class WorldMapView extends RootView
|
|||
id: 'world-map-view'
|
||||
template: template
|
||||
|
||||
subscriptions:
|
||||
'subscribe-modal:subscribed': 'onSubscribed'
|
||||
|
||||
events:
|
||||
'click .map-background': 'onClickMap'
|
||||
'click .level a': 'onClickLevel'
|
||||
|
@ -118,6 +121,10 @@ module.exports = class WorldMapView extends RootView
|
|||
if @requiresSubscription
|
||||
_.delay (=> @openModalView? new SubscribeModal() unless window.currentModal), 2000
|
||||
|
||||
onSubscribed: ->
|
||||
@requiresSubscription = false
|
||||
@render()
|
||||
|
||||
getRenderData: (context={}) ->
|
||||
context = super(context)
|
||||
context.campaign = _.find campaigns, { id: @terrain }
|
||||
|
@ -140,6 +147,7 @@ module.exports = class WorldMapView extends RootView
|
|||
context.mapType = _.string.slugify @terrain
|
||||
context.nextLevel = @nextLevel
|
||||
context.forestIsAvailable = @startedForestLevel or '541b67f71ccc8eaae19f3c62' in (me.get('earned')?.levels or [])
|
||||
context.requiresSubscription = @requiresSubscription
|
||||
context
|
||||
|
||||
afterRender: ->
|
||||
|
|
|
@ -69,6 +69,7 @@ module.exports = class SubscribeModal extends ModalView
|
|||
|
||||
onSubscriptionSuccess: ->
|
||||
application.tracker?.trackEvent 'Finished subscription purchase', {}
|
||||
Backbone.Mediator.publish 'subscribe-modal:subscribed', {}
|
||||
@playSound 'victory'
|
||||
@hide()
|
||||
|
||||
|
|
Loading…
Reference in a new issue