@@ -17,7 +17,9 @@ import {
1717 showNetwork ,
1818 setTheme ,
1919} from '../../redux/actions/general' ;
20- import { TOPBAR_CONSTANTS , MODEL_STATE , THEMES } from '../../constants' ;
20+ import {
21+ TOPBAR_CONSTANTS , MODEL_STATE , THEMES , TUTORIALS_LIST ,
22+ } from '../../constants' ;
2123
2224const checkedIcon = 'fa fa-check secondary' ;
2325
@@ -69,15 +71,6 @@ const firstItemStyle = {
6971 hover : { ...topLevelMenuItemStyle . hover , ...firstItemCustom } ,
7072} ;
7173
72- const tutorialsList = {
73- tut1 : 'Tut 1: Simple cell network' ,
74- tut2 : 'Tut 2: Detailed cell network' ,
75- tut3 : 'Tut 3a: Multiscale network (low IP3)' ,
76- tut3_ip3high : 'Tut 3b: Multiscale network (high IP3)' ,
77- tut3_norxd : 'Tut 3c: Multiscale network (no RxD) (edited)' ,
78- tut_osc : 'Tut 4: Simple oscillatory network' ,
79- } ;
80-
8174export const getTutorials = ( ) => {
8275 const { tuts } = window ;
8376 if ( ! tuts ) {
@@ -88,7 +81,7 @@ export const getTutorials = () => {
8881 const tutName = tutFile . replace ( '.py' , '' )
8982 . replace ( 'gui' , '' )
9083 . replace ( '_' , '' ) ;
91- const tutLabel = tutorialsList [ tutName ] !== undefined ? tutorialsList [ tutName ] : tutName ;
84+ const tutLabel = TUTORIALS_LIST [ tutName ] !== undefined ? TUTORIALS_LIST [ tutName ] : tutName ;
9285 return {
9386 label : tutLabel ,
9487 icon : '' ,
@@ -162,16 +155,10 @@ export default {
162155 {
163156 label : 'New' ,
164157 icon : '' ,
165- list : [
166- {
167- label : 'Blank' ,
168- icon : '' ,
169- action : {
170- handlerAction : 'redux' ,
171- parameters : [ openTopbarDialog , TOPBAR_CONSTANTS . NEW_MODEL ] ,
172- } ,
173- } ,
174- ] ,
158+ action : {
159+ handlerAction : 'redux' ,
160+ parameters : [ openTopbarDialog , TOPBAR_CONSTANTS . NEW_MODEL ] ,
161+ } ,
175162 } ,
176163 {
177164 label : 'Open...' ,
@@ -296,7 +283,8 @@ export const getViewMenu = (props) => {
296283 const networkAction = ( ) => {
297284 if ( instantiate && props . automaticSimulation ) {
298285 return createAndSimulateNetwork ;
299- } if ( instantiate ) {
286+ }
287+ if ( instantiate ) {
300288 return createNetwork ;
301289 }
302290 return showNetwork ;
0 commit comments