()
| 40 | static initClass () { |
| 41 | this.prototype.routes = { |
| 42 | '' () { |
| 43 | if (utils.getQueryVariable('hour_of_code')) { |
| 44 | delete window.alreadyLoadedView |
| 45 | return this.navigate('/play?hour_of_code=true', { trigger: true, replace: true }) |
| 46 | } |
| 47 | |
| 48 | if (utils.isCodeCombat) { |
| 49 | if (utils.getQueryVariable('payment-homeSubscriptions')) { |
| 50 | return this.routeDirectly('HomeView') |
| 51 | } |
| 52 | if (!me.isAnonymous() && !me.isStudent() && !me.isTeacher() && !me.isAdmin() && !me.hasSubscription() && !me.isAPIClient() && !paymentUtils.hasTemporaryPremiumAccess() && !me.isParentHome()) { |
| 53 | delete window.alreadyLoadedView |
| 54 | return this.navigate('/premium', { trigger: true, replace: true }) |
| 55 | } |
| 56 | if (me.isAPIClient()) { |
| 57 | delete window.alreadyLoadedView |
| 58 | // return @navigate "/league/#{me.get('clans')?[0] ? ''}apiclient-data", {trigger: true, replace: true} # Once we make sure all students have been associated with their API creators |
| 59 | return this.navigate('/partner-dashboard', { trigger: true, replace: true }) |
| 60 | } |
| 61 | if (me.useChinaHomeView()) { |
| 62 | delete window.alreadyLoadedView |
| 63 | return this.routeDirectly('HomeCNView', []) |
| 64 | } |
| 65 | } |
| 66 | if (utils.isCodeCombat) { |
| 67 | return this.routeDirectly('HomeBeta', [], { vueRoute: true, baseTemplate: 'base-flat-vue' }) |
| 68 | } else { |
| 69 | return this.routeDirectly('HomeView', []) |
| 70 | } |
| 71 | }, |
| 72 | |
| 73 | about: go('AboutView'), |
| 74 | 'contact-cn': go('ContactCNView'), |
nothing calls this directly
no test coverage detected