Don't show misc achievements in picoCTF mode

This commit is contained in:
Nick Winter 2016-03-07 09:54:29 -08:00
parent 78379f2e6a
commit 6a9a36b1eb

View file

@ -34,7 +34,7 @@ module.exports = class RootView extends CocoView
subscriptions:
'achievements:new': 'handleNewAchievements'
'modal:open-modal-view': 'onOpenModalView'
shortcuts:
'ctrl+shift+a': 'navigateToAdmin'
@ -43,6 +43,7 @@ module.exports = class RootView extends CocoView
earnedAchievement.patch()
return if achievement.get('collection') is 'level.sessions' and not achievement.get('query')?.team
#return if @isIE() # Some bugs in IE right now, TODO fix soon! # Maybe working now with not caching achievement fetches in CocoModel?
return if window.serverConfig.picoCTF
new AchievementPopup achievement: achievement, earnedAchievement: earnedAchievement
handleNewAchievements: (e) ->
@ -174,7 +175,7 @@ module.exports = class RootView extends CocoView
console.warn 'Error saving language:', errors
res.success (model, response, options) ->
#console.log 'Saved language:', newLang
isOldBrowser: ->
if $.browser
majorVersion = $.browser.versionNumber
@ -189,4 +190,4 @@ module.exports = class RootView extends CocoView
navigateToAdmin: ->
if window.amActually or me.isAdmin()
application.router.navigate('/admin', {trigger: true})
application.router.navigate('/admin', {trigger: true})