Merge branch 'develop' of https://github.com/Superalgos/Superalgos into develop
This commit is contained in:
commit
6885c2ded8
255 files changed
+16484
-2566
No files matched your search
@@ -18,9 +18,40 @@ function newEducationActionSwitch() {
|
||||
|
||||
async function executeAction(action) {
|
||||
switch (action.name) {
|
||||
case 'Action Name': {
|
||||
// Example: return UI.projects.foundations.functionLibraries.onFocus.getNodeThatIsOnFocus(action.node)
|
||||
}
|
||||
case 'Play Tutorial':
|
||||
{
|
||||
UI.projects.education.spaces.tutorialSpace.playTutorial(action.node)
|
||||
}
|
||||
break
|
||||
case 'Play Tutorial Topic':
|
||||
{
|
||||
UI.projects.education.spaces.tutorialSpace.playTutorialTopic(action.node)
|
||||
}
|
||||
break
|
||||
case 'Play Tutorial Step':
|
||||
{
|
||||
UI.projects.education.spaces.tutorialSpace.playTutorialStep(action.node)
|
||||
}
|
||||
break
|
||||
case 'Resume Tutorial':
|
||||
{
|
||||
UI.projects.education.spaces.tutorialSpace.resumeTutorial(action.node)
|
||||
}
|
||||
break
|
||||
case 'Resume Tutorial Topic':
|
||||
{
|
||||
UI.projects.education.spaces.tutorialSpace.resumeTutorialTopic(action.node)
|
||||
}
|
||||
break
|
||||
case 'Resume Tutorial Step':
|
||||
{
|
||||
UI.projects.education.spaces.tutorialSpace.resumeTutorialStep(action.node)
|
||||
}
|
||||
break
|
||||
case 'Reset Tutorial Progress':
|
||||
{
|
||||
UI.projects.education.spaces.tutorialSpace.resetTutorialProgress(action.node)
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
@@ -854,7 +854,7 @@ function newFoundationsDocsDocumentPage() {
|
||||
if (appSchemaDocument === undefined || appSchemaDocument.menuItems === undefined) { return }
|
||||
for (let i = 0; i < appSchemaDocument.menuItems.length; i++) {
|
||||
let menuItem = appSchemaDocument.menuItems[i]
|
||||
let collectionImage = getIcon()
|
||||
let collectionImage = getIcon(appSchemaDocument.menuItems[i].relatedUiObjectProject, appSchemaDocument.menuItems[i].actionProject)
|
||||
if (collectionImage === undefined) {
|
||||
continue
|
||||
}
|
||||
@@ -866,12 +866,23 @@ function newFoundationsDocsDocumentPage() {
|
||||
let dummyImage = parentElement.childNodes[0]
|
||||
parentElement.replaceChild(imageElement, dummyImage)
|
||||
|
||||
function getIcon() {
|
||||
function getIcon(relatedUiObjectProject, actionProject) {
|
||||
let project
|
||||
if (menuItem.relatedUiObject !== undefined) {
|
||||
return UI.projects.foundations.spaces.designSpace.getIconByProjectAndType(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project, menuItem.relatedUiObject)
|
||||
if (relatedUiObjectProject !== undefined) {
|
||||
project = relatedUiObjectProject
|
||||
} else {
|
||||
project = UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project
|
||||
}
|
||||
return UI.projects.foundations.spaces.designSpace.getIconByProjectAndType(project, menuItem.relatedUiObject)
|
||||
} else {
|
||||
if (actionProject !== undefined) {
|
||||
project = actionProject
|
||||
} else {
|
||||
project = UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project
|
||||
}
|
||||
if (menuItem.iconPathOn !== undefined) {
|
||||
return UI.projects.foundations.spaces.designSpace.getIconByProjectAndName(UI.projects.education.spaces.docsSpace.currentDocumentBeingRendered.project, menuItem.iconPathOn)
|
||||
return UI.projects.foundations.spaces.designSpace.getIconByProjectAndName(project, menuItem.iconPathOn)
|
||||
} else {
|
||||
return UI.projects.foundations.spaces.designSpace.getIconByProjectAndName('Foundations', 'bitcoin')
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user