Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions webapp/components/topbar/menuConfiguration.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,31 @@ const firstItemCustom = { fontWeight: 'bold', paddingLeft: `calc(${gutter} / 2)`

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


const tutorialsList = {
"tut1": "Tut 1: Simple cell network",
"tut2": "Tut 2: Detailed cell network",
"tut3": "Tut 3: Multiscale network",
"tut3_ip3high": "Tut 3: Multiscale network (high IP3)"
}

export const getTutorials = () => {
const { tuts } = window
if (!tuts) {
return []
}
return tuts.sort().map(tutFile => (
{
label: tutFile.replace(".py", "").replace("gui", '').replace("_", " "),
return tuts.sort().map(tutFile => {
let tutName = tutFile.replace(".py", "").replace("gui", '').replace("_", "");
let tutLabel = tutorialsList[tutName] !== undefined ? tutorialsList[tutName] : tutName;
return {
label: tutLabel,
icon: "",
action: {
handlerAction: "redux",
parameters: [loadTutorial, tutFile]
}
}
))
})

}

Expand Down Expand Up @@ -374,4 +384,4 @@ export const getModelMenu = props => (
},

]
)
)