|
|
@ -112,35 +112,34 @@ const RemixApp = (props: IRemixAppUi) => { |
|
|
|
setShowEnterDialog(false) |
|
|
|
setShowEnterDialog(false) |
|
|
|
localStorage.setItem('hadUsageTypeAsked', type) |
|
|
|
localStorage.setItem('hadUsageTypeAsked', type) |
|
|
|
|
|
|
|
|
|
|
|
await props.app.appManager.call('walkthrough', 'start') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Use the type to setup the UI accordingly
|
|
|
|
// Use the type to setup the UI accordingly
|
|
|
|
switch (type) { |
|
|
|
switch (type) { |
|
|
|
case UsageTypes.Beginner: { |
|
|
|
case UsageTypes.Beginner: { |
|
|
|
await props.app.appManager.call('manager', 'activatePlugin', 'LearnEth') |
|
|
|
await props.app.appManager.call('manager', 'activatePlugin', 'LearnEth') |
|
|
|
// const wName = 'Playground'
|
|
|
|
await props.app.appManager.call('walkthrough', 'start') |
|
|
|
// const workspaces = await props.app.appManager.call('filePanel', 'getWorkspaces')
|
|
|
|
// const wName = 'Playground'
|
|
|
|
// if (!workspaces.find((workspace) => workspace.name === wName)) {
|
|
|
|
// const workspaces = await props.app.appManager.call('filePanel', 'getWorkspaces')
|
|
|
|
// await props.app.appManager.call('filePanel', 'createWorkspace', wName, 'playground')
|
|
|
|
// if (!workspaces.find((workspace) => workspace.name === wName)) {
|
|
|
|
// }
|
|
|
|
// await props.app.appManager.call('filePanel', 'createWorkspace', wName, 'playground')
|
|
|
|
// await props.app.appManager.call('filePanel', 'switchToWorkspace', { name: wName, isLocalHost: false })
|
|
|
|
// }
|
|
|
|
|
|
|
|
// await props.app.appManager.call('filePanel', 'switchToWorkspace', { name: wName, isLocalHost: false })
|
|
|
|
_paq.push(['trackEvent', 'enterDialog', 'usageType', 'beginner']) |
|
|
|
|
|
|
|
break |
|
|
|
_paq.push(['trackEvent', 'enterDialog', 'usageType', 'beginner']) |
|
|
|
} |
|
|
|
break |
|
|
|
case UsageTypes.Advance: { |
|
|
|
} |
|
|
|
_paq.push(['trackEvent', 'enterDialog', 'usageType', 'tutor']) |
|
|
|
case UsageTypes.Advance: { |
|
|
|
break |
|
|
|
_paq.push(['trackEvent', 'enterDialog', 'usageType', 'tutor']) |
|
|
|
} |
|
|
|
break |
|
|
|
case UsageTypes.Prototyper: { |
|
|
|
} |
|
|
|
_paq.push(['trackEvent', 'enterDialog', 'usageType', 'prototyper']) |
|
|
|
case UsageTypes.Prototyper: { |
|
|
|
break |
|
|
|
_paq.push(['trackEvent', 'enterDialog', 'usageType', 'prototyper']) |
|
|
|
} |
|
|
|
break |
|
|
|
case UsageTypes.Production: { |
|
|
|
} |
|
|
|
_paq.push(['trackEvent', 'enterDialog', 'usageType', 'production']) |
|
|
|
case UsageTypes.Production: { |
|
|
|
break |
|
|
|
_paq.push(['trackEvent', 'enterDialog', 'usageType', 'production']) |
|
|
|
} |
|
|
|
break |
|
|
|
default: throw new Error() |
|
|
|
} |
|
|
|
|
|
|
|
default: throw new Error() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|