@@ -5,7 +5,15 @@ import router from 'kolibri.coreVue.router';
55import Vue from 'kolibri.lib.vue' ;
66
77import RootVue from './views' ;
8- import * as actions from './state/actions' ;
8+ import * as actions from './state/actions/main' ;
9+ import {
10+ showLearnChannel ,
11+ showPopularPage ,
12+ showNextStepsPage ,
13+ showResumePage ,
14+ showFeaturedPage ,
15+ showLearnContent ,
16+ } from './state/actions/recommended' ;
917import store from './state/store' ;
1018import { PageNames } from './constants' ;
1119
@@ -71,14 +79,42 @@ class LearnModule extends KolibriModule {
7179 path : '/:channel_id/recommended' ,
7280 handler : ( toRoute , fromRoute ) => {
7381 const cursor = toRoute . query . cursor ;
74- actions . showLearnChannel ( store , toRoute . params . channel_id , cursor ) ;
82+ showLearnChannel ( store , toRoute . params . channel_id , cursor ) ;
83+ } ,
84+ } ,
85+ {
86+ name : PageNames . RECOMMENDED_POPULAR ,
87+ path : '/:channel_id/recommended/popular' ,
88+ handler : ( toRoute , fromRoute ) => {
89+ showPopularPage ( store , toRoute . params . channel_id ) ;
90+ } ,
91+ } ,
92+ {
93+ name : PageNames . RECOMMENDED_RESUME ,
94+ path : '/:channel_id/recommended/resume' ,
95+ handler : ( toRoute , fromRoute ) => {
96+ showResumePage ( store , toRoute . params . channel_id ) ;
97+ } ,
98+ } ,
99+ {
100+ name : PageNames . RECOMMENDED_NEXT_STEPS ,
101+ path : '/:channel_id/recommended/nextsteps' ,
102+ handler : ( toRoute , fromRoute ) => {
103+ showNextStepsPage ( store , toRoute . params . channel_id ) ;
104+ } ,
105+ } ,
106+ {
107+ name : PageNames . RECOMMENDED_FEATURED ,
108+ path : '/:channel_id/recommended/featured' ,
109+ handler : ( toRoute , fromRoute ) => {
110+ showFeaturedPage ( store , toRoute . params . channel_id ) ;
75111 } ,
76112 } ,
77113 {
78114 name : PageNames . LEARN_CONTENT ,
79115 path : '/:channel_id/recommended/:id' ,
80116 handler : ( toRoute , fromRoute ) => {
81- actions . showLearnContent ( store , toRoute . params . channel_id , toRoute . params . id ) ;
117+ showLearnContent ( store , toRoute . params . channel_id , toRoute . params . id ) ;
82118 } ,
83119 } ,
84120 {
0 commit comments