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: subscriptions:
'achievements:new': 'handleNewAchievements' 'achievements:new': 'handleNewAchievements'
'modal:open-modal-view': 'onOpenModalView' 'modal:open-modal-view': 'onOpenModalView'
shortcuts: shortcuts:
'ctrl+shift+a': 'navigateToAdmin' 'ctrl+shift+a': 'navigateToAdmin'
@ -43,6 +43,7 @@ module.exports = class RootView extends CocoView
earnedAchievement.patch() earnedAchievement.patch()
return if achievement.get('collection') is 'level.sessions' and not achievement.get('query')?.team 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 @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 new AchievementPopup achievement: achievement, earnedAchievement: earnedAchievement
handleNewAchievements: (e) -> handleNewAchievements: (e) ->
@ -174,7 +175,7 @@ module.exports = class RootView extends CocoView
console.warn 'Error saving language:', errors console.warn 'Error saving language:', errors
res.success (model, response, options) -> res.success (model, response, options) ->
#console.log 'Saved language:', newLang #console.log 'Saved language:', newLang
isOldBrowser: -> isOldBrowser: ->
if $.browser if $.browser
majorVersion = $.browser.versionNumber majorVersion = $.browser.versionNumber
@ -189,4 +190,4 @@ module.exports = class RootView extends CocoView
navigateToAdmin: -> navigateToAdmin: ->
if window.amActually or me.isAdmin() if window.amActually or me.isAdmin()
application.router.navigate('/admin', {trigger: true}) application.router.navigate('/admin', {trigger: true})