Skip to content

Commit 2c4a4de

Browse files
authored
Merge pull request #161 from MetaCell/feature/160
#160 menu tutorial labels renamed
2 parents 0d70618 + 76af619 commit 2c4a4de

1 file changed

Lines changed: 15 additions & 5 deletions

File tree

webapp/components/topbar/menuConfiguration.js

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,31 @@ const firstItemCustom = { fontWeight: 'bold', paddingLeft: `calc(${gutter} / 2)`
6161

6262
const firstItemStyle = { standard: { ...topLevelMenuItemStyle.standard, ...firstItemCustom }, hover: { ...topLevelMenuItemStyle.hover, ...firstItemCustom } }
6363

64+
65+
const tutorialsList = {
66+
"tut1": "Tut 1: Simple cell network",
67+
"tut2": "Tut 2: Detailed cell network",
68+
"tut3": "Tut 3: Multiscale network",
69+
"tut3_ip3high": "Tut 3: Multiscale network (high IP3)"
70+
}
71+
6472
export const getTutorials = () => {
6573
const { tuts } = window
6674
if (!tuts) {
6775
return []
6876
}
69-
return tuts.sort().map(tutFile => (
70-
{
71-
label: tutFile.replace(".py", "").replace("gui", '').replace("_", " "),
77+
return tuts.sort().map(tutFile => {
78+
let tutName = tutFile.replace(".py", "").replace("gui", '').replace("_", "");
79+
let tutLabel = tutorialsList[tutName] !== undefined ? tutorialsList[tutName] : tutName;
80+
return {
81+
label: tutLabel,
7282
icon: "",
7383
action: {
7484
handlerAction: "redux",
7585
parameters: [loadTutorial, tutFile]
7686
}
7787
}
78-
))
88+
})
7989

8090
}
8191

@@ -374,4 +384,4 @@ export const getModelMenu = props => (
374384
},
375385

376386
]
377-
)
387+
)

0 commit comments

Comments
 (0)