mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-14 07:00:01 -04:00
Made all of lib into a wad. Fixed AuthModal.
This commit is contained in:
parent
d2aabbdacc
commit
0bbcdd5698
15 changed files with 22 additions and 23 deletions
|
@ -7,8 +7,7 @@ LOG = false
|
|||
module.exports = ModuleLoader = class ModuleLoader extends CocoClass
|
||||
|
||||
@WADS = [
|
||||
'lib/world'
|
||||
'lib/surface'
|
||||
'lib'
|
||||
'views/play'
|
||||
'views/game-menu'
|
||||
'views/editor'
|
||||
|
@ -67,8 +66,8 @@ module.exports = ModuleLoader = class ModuleLoader extends CocoClass
|
|||
if @queue.progress is 1
|
||||
$('#module-loading-list').modal('hide')
|
||||
@recentPaths.sort()
|
||||
console.log @recentPaths.join('\n')
|
||||
console.log 'loaded', @recentPaths.length, 'files,', parseInt(@recentLoadedBytes/1024), 'KB'
|
||||
console.debug @recentPaths.join('\n')
|
||||
console.debug 'loaded', @recentPaths.length, 'files,', parseInt(@recentLoadedBytes/1024), 'KB'
|
||||
@trigger 'load-complete'
|
||||
|
||||
parseDependencies: (raw) ->
|
||||
|
@ -88,7 +87,7 @@ module.exports = ModuleLoader = class ModuleLoader extends CocoClass
|
|||
continue if dep is 'memwatch'
|
||||
continue if _.string.startsWith(dep, 'ace/')
|
||||
dependencies.push(dep)
|
||||
console.log dep if LOG
|
||||
console.debug dep if LOG
|
||||
console.groupEnd() if LOG
|
||||
return dependencies
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ block content
|
|||
| #{currentEditor}
|
||||
|
||||
if me.get('anonymous')
|
||||
a.btn.btn-primary.open-modal-button(data-toggle="coco-modal", data-target="modal/AuthModal", role="button", data-i18n="#{currentNewSignup}") Log in to Create a New Content
|
||||
a.btn.btn-primary.open-modal-button(data-toggle="coco-modal", data-target="core/AuthModal", role="button", data-i18n="#{currentNewSignup}") Log in to Create a New Content
|
||||
else
|
||||
a.btn.btn-primary.open-modal-button#new-model-button(data-i18n="#{currentNew}") Create a New Something
|
||||
input#search(data-i18n="[placeholder]#{currentSearch}")
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
- var i18nKey = 'game_menu.' + submenu.replace('-', '_');
|
||||
span(data-i18n='[title]' + i18nKey + '_caption;' + i18nKey + '_tab')
|
||||
if me.get('anonymous')
|
||||
li.auth-tab(data-toggle='coco-modal', data-target="modal/AuthModal")
|
||||
a(data-toggle='coco-modal', data-target="modal/AuthModal")
|
||||
li.auth-tab(data-toggle='coco-modal', data-target="core/AuthModal")
|
||||
a(data-toggle='coco-modal', data-target="core/AuthModal")
|
||||
span.glyphicon.glyphicon-pencil
|
||||
span(data-i18n='[title]game_menu.auth_caption;game_menu.auth_tab')
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ block modal-body-content
|
|||
br
|
||||
br
|
||||
| Already have a CodeCombat account?
|
||||
a.login-link(data-toggle="coco-modal", data-target="modal/AuthModal") Log in to continue!
|
||||
a.login-link(data-toggle="coco-modal", data-target="core/AuthModal") Log in to continue!
|
||||
else if !userIsAuthorized
|
||||
.modal-footer.linkedin
|
||||
p Please sign into your LinkedIn account to verify your identity.
|
||||
|
@ -50,7 +50,7 @@ block modal-footer
|
|||
if userIsAnonymous
|
||||
if userIsAuthorized
|
||||
.modal-footer.linkedin
|
||||
a.login-link(data-toggle="coco-modal", data-target="modal/AuthModal") Please log in to continue.
|
||||
a.login-link(data-toggle="coco-modal", data-target="core/AuthModal") Please log in to continue.
|
||||
else if !userIsAnonymous && !userIsAuthorized
|
||||
.modal-footer.linkedin
|
||||
else if userIsAuthorized && !userHasSignedContract
|
||||
|
|
|
@ -50,7 +50,7 @@ div#columns.row
|
|||
h4.friends-header(data-i18n="ladder.friends_playing") Friends Playing
|
||||
if me.get('anonymous')
|
||||
div.alert.alert-info
|
||||
a(data-toggle="coco-modal", data-target="modal/AuthModal", data-i18n="ladder.log_in_for_friends") Log in to play with your friends!
|
||||
a(data-toggle="coco-modal", data-target="core/AuthModal", data-i18n="ladder.log_in_for_friends") Log in to play with your friends!
|
||||
|
||||
else
|
||||
if !onFacebook || !onGPlus
|
||||
|
|
|
@ -38,4 +38,4 @@ else
|
|||
button.btn.btn-xs.btn-primary.banner#level-done-button(data-i18n="play_level.done") Done
|
||||
|
||||
if me.get('anonymous')
|
||||
button.btn.btn-xs.btn-primary.banner#control-bar-sign-up-button(data-toggle='coco-modal', data-target='modal/AuthModal', data-i18n="signup.sign_up")
|
||||
button.btn.btn-xs.btn-primary.banner#control-bar-sign-up-button(data-toggle='coco-modal', data-target='core/AuthModal', data-i18n="signup.sign_up")
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
button.btn.account(data-toggle='coco-modal', data-target='play/modal/PlayAccountModal', data-i18n="[title]play.account")
|
||||
button.btn.settings(data-toggle='coco-modal', data-target='play/modal/PlaySettingsModal', data-i18n="[title]play.settings")
|
||||
else if me.get('anonymous', true)
|
||||
button.btn.settings(data-toggle='coco-modal', data-target='modal/AuthModal', data-i18n="[title]play.settings")
|
||||
button.btn.settings(data-toggle='coco-modal', data-target='core/AuthModal', data-i18n="[title]play.settings")
|
||||
// Don't show these things, they are bad and take us out of the game. Just wait until the new ones work.
|
||||
//else
|
||||
// a.btn.achievements(href="/user/#{me.getSlugOrID()}/stats", data-i18n="[title]play.achievements")
|
||||
|
@ -63,7 +63,7 @@
|
|||
span.spr= me.level()
|
||||
if me.get('anonymous')
|
||||
span.spr(data-i18n="play.anonymous_player") Anonymous Player
|
||||
button.btn.btn-default.btn-flat.btn-sm(data-toggle='coco-modal', data-target='modal/AuthModal', data-i18n="login.log_in")
|
||||
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')
|
||||
button#logout-button.btn.btn-default.btn-flat.btn-sm(data-i18n="login.log_out") Log Out
|
||||
|
|
|
@ -3,7 +3,7 @@ template = require 'templates/account/account-settings-view'
|
|||
{me} = require 'core/auth'
|
||||
forms = require 'core/forms'
|
||||
User = require 'models/User'
|
||||
AuthModal = require 'views/modal/AuthModal'
|
||||
AuthModal = require 'views/core/AuthModal'
|
||||
|
||||
module.exports = class AccountSettingsView extends CocoView
|
||||
id: 'account-settings-view'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
ModalView = require 'views/core/ModalView'
|
||||
template = require 'templates/modal/auth'
|
||||
template = require 'templates/core/auth'
|
||||
{loginUser, createUser, me} = require 'core/auth'
|
||||
forms = require 'core/forms'
|
||||
User = require 'models/User'
|
|
@ -56,12 +56,12 @@ module.exports = class RootView extends CocoView
|
|||
@openModalView subview
|
||||
|
||||
onClickSignupButton: ->
|
||||
AuthModal = require 'views/modal/AuthModal'
|
||||
AuthModal = require 'views/core/AuthModal'
|
||||
window.tracker?.trackEvent 'Sign Up', category: 'Homepage', ['Google Analytics'] if @id is 'home-view'
|
||||
@openModalView new AuthModal {mode: 'signup'}
|
||||
|
||||
onClickLoginButton: ->
|
||||
AuthModal = require 'views/modal/AuthModal'
|
||||
AuthModal = require 'views/core/AuthModal'
|
||||
window.tracker?.trackEvent 'Login', category: 'Homepage', ['Google Analytics'] if @id is 'home-view'
|
||||
@openModalView new AuthModal {mode: 'login'}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
AuthModal = require 'views/modal/AuthModal'
|
||||
AuthModal = require 'views/core/AuthModal'
|
||||
|
||||
module.exports = class SignupModalView extends AuthModal
|
||||
mode: 'signup'
|
||||
|
|
|
@ -8,7 +8,7 @@ LevelSetupManager = require 'lib/LevelSetupManager'
|
|||
ThangType = require 'models/ThangType'
|
||||
MusicPlayer = require 'lib/surface/MusicPlayer'
|
||||
storage = require 'core/storage'
|
||||
AuthModal = require 'views/modal/AuthModal'
|
||||
AuthModal = require 'views/core/AuthModal'
|
||||
|
||||
trackedHourOfCode = false
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ module.exports = class LadderView extends RootView
|
|||
@openModalView modal
|
||||
|
||||
showApologeticSignupModal: ->
|
||||
AuthModal = require 'views/modal/AuthModal'
|
||||
AuthModal = require 'views/core/AuthModal'
|
||||
@openModalView(new AuthModal({showRequiredError: true}))
|
||||
|
||||
onClickedLink: (e) ->
|
||||
|
|
|
@ -70,8 +70,7 @@ exports.config =
|
|||
]
|
||||
|
||||
#- Wads. Groups of modules by folder which are loaded as a group when needed.
|
||||
'javascripts/app/lib/surface.js': regJoin('^app/lib/surface')
|
||||
'javascripts/app/lib/world.js': regJoin('^app/lib/world')
|
||||
'javascripts/app/lib.js': regJoin('^app/lib')
|
||||
'javascripts/app/views/play.js': regJoin('^app/views/play')
|
||||
'javascripts/app/views/game-menu.js': regJoin('^app/views/game-menu')
|
||||
'javascripts/app/views/editor.js': regJoin('^app/views/editor')
|
||||
|
@ -142,6 +141,7 @@ exports.config =
|
|||
defaultExtension: 'jade'
|
||||
joinTo:
|
||||
'javascripts/app.js': [
|
||||
regJoin('^app/templates/core')
|
||||
'app/templates/modal/error.jade'
|
||||
'app/templates/not_found.jade'
|
||||
'app/templates/achievements/achievement-popup.jade'
|
||||
|
|
Loading…
Reference in a new issue