mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
23 lines
556 B
CoffeeScript
23 lines
556 B
CoffeeScript
View = require 'views/kinds/RootView'
|
|
template = require 'templates/account/home'
|
|
{me} = require 'lib/auth'
|
|
User = require 'models/User'
|
|
AuthModalView = require 'views/modal/auth_modal'
|
|
|
|
module.exports = class AccountHomeView extends View
|
|
id: 'account-home-view'
|
|
template: template
|
|
|
|
constructor: (options) ->
|
|
super options
|
|
return unless me
|
|
|
|
getRenderData: ->
|
|
c = super()
|
|
c.subs = {}
|
|
c.subs[sub] = 1 for sub in c.me.getEnabledEmails()
|
|
c
|
|
|
|
afterRender: ->
|
|
super()
|
|
@openModelView new AuthModalView if me.isAnonymous()
|