mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-05-02 17:03:42 -04:00
Show an AuthModal instead of a SubscribeModal to anonymous players.
This commit is contained in:
parent
0f706bfdf6
commit
4d72c1c84b
2 changed files with 7 additions and 3 deletions
app/views/play
|
@ -119,7 +119,8 @@ module.exports = class WorldMapView extends RootView
|
||||||
@render()
|
@render()
|
||||||
@preloadTopHeroes() unless me.get('heroConfig')?.thangType
|
@preloadTopHeroes() unless me.get('heroConfig')?.thangType
|
||||||
if @requiresSubscription
|
if @requiresSubscription
|
||||||
_.delay (=> @openModalView? new SubscribeModal() unless window.currentModal), 2000
|
modal = if me.get('anonymous') then AuthModal else SubscribeModal
|
||||||
|
_.delay (=> @openModalView? new modal() unless window.currentModal), 2000
|
||||||
|
|
||||||
onSubscribed: ->
|
onSubscribed: ->
|
||||||
@requiresSubscription = false
|
@requiresSubscription = false
|
||||||
|
@ -205,7 +206,8 @@ module.exports = class WorldMapView extends RootView
|
||||||
@endHighlight()
|
@endHighlight()
|
||||||
else
|
else
|
||||||
if @requiresSubscription
|
if @requiresSubscription
|
||||||
@openModalView new SubscribeModal()
|
modal = if me.get('anonymous') then AuthModal else SubscribeModal
|
||||||
|
@openModalView new modal()
|
||||||
else if $(e.target).attr('disabled')
|
else if $(e.target).attr('disabled')
|
||||||
Backbone.Mediator.publish 'router:navigate', route: '/contribute/adventurer'
|
Backbone.Mediator.publish 'router:navigate', route: '/contribute/adventurer'
|
||||||
return
|
return
|
||||||
|
|
|
@ -2,6 +2,7 @@ CocoView = require 'views/core/CocoView'
|
||||||
template = require 'templates/play/level/level_loading'
|
template = require 'templates/play/level/level_loading'
|
||||||
utils = require 'core/utils'
|
utils = require 'core/utils'
|
||||||
SubscribeModal = require 'views/play/modal/SubscribeModal'
|
SubscribeModal = require 'views/play/modal/SubscribeModal'
|
||||||
|
AuthModal = require 'views/core/AuthModal'
|
||||||
|
|
||||||
module.exports = class LevelLoadingView extends CocoView
|
module.exports = class LevelLoadingView extends CocoView
|
||||||
id: 'level-loading-view'
|
id: 'level-loading-view'
|
||||||
|
@ -109,7 +110,8 @@ module.exports = class LevelLoadingView extends CocoView
|
||||||
@$el.find('.subscription-required').show()
|
@$el.find('.subscription-required').show()
|
||||||
|
|
||||||
onClickStartSubscription: (e) ->
|
onClickStartSubscription: (e) ->
|
||||||
@openModalView new SubscribeModal()
|
modal = if me.get('anonymous') then AuthModal else SubscribeModal
|
||||||
|
@openModalView new modal()
|
||||||
|
|
||||||
onSubscribed: ->
|
onSubscribed: ->
|
||||||
document.location.reload()
|
document.location.reload()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue