mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 05:53:39 -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()
|
||||
@preloadTopHeroes() unless me.get('heroConfig')?.thangType
|
||||
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: ->
|
||||
@requiresSubscription = false
|
||||
|
@ -205,7 +206,8 @@ module.exports = class WorldMapView extends RootView
|
|||
@endHighlight()
|
||||
else
|
||||
if @requiresSubscription
|
||||
@openModalView new SubscribeModal()
|
||||
modal = if me.get('anonymous') then AuthModal else SubscribeModal
|
||||
@openModalView new modal()
|
||||
else if $(e.target).attr('disabled')
|
||||
Backbone.Mediator.publish 'router:navigate', route: '/contribute/adventurer'
|
||||
return
|
||||
|
|
|
@ -2,6 +2,7 @@ CocoView = require 'views/core/CocoView'
|
|||
template = require 'templates/play/level/level_loading'
|
||||
utils = require 'core/utils'
|
||||
SubscribeModal = require 'views/play/modal/SubscribeModal'
|
||||
AuthModal = require 'views/core/AuthModal'
|
||||
|
||||
module.exports = class LevelLoadingView extends CocoView
|
||||
id: 'level-loading-view'
|
||||
|
@ -109,7 +110,8 @@ module.exports = class LevelLoadingView extends CocoView
|
|||
@$el.find('.subscription-required').show()
|
||||
|
||||
onClickStartSubscription: (e) ->
|
||||
@openModalView new SubscribeModal()
|
||||
modal = if me.get('anonymous') then AuthModal else SubscribeModal
|
||||
@openModalView new modal()
|
||||
|
||||
onSubscribed: ->
|
||||
document.location.reload()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue