import { Button, Classes, Dialog } from '@blueprintjs/core'; import { observer } from 'mobx-react'; import * as React from 'react'; import { AppState } from '../state'; import { Tour, TourScriptStep, TourStepGetButtonParams } from './tour'; interface WelcomeTourProps { appState: AppState; } interface WelcomeTourState { isTourStarted: boolean; } /** * This is our "Welcome to Electron Fiddle" Tour. It includes both an intro to * the app and a short intro to Electron. * * @returns {Set} */ export function getWelcomeTour(): Set { return new Set([ { name: 'fiddle-editors', selector: 'div.mosaic-root', title: 'πŸ“ Fiddle Editors', content: ( <>

Electron Fiddle allows you to build little experiments and mini-apps with Electron. Each Fiddle has at least three of these files: A main script, a renderer script, a preload script, and an HTML file.

If you require() a module, Fiddle will install it automatically. It will also automatically provide you with autocomplete information for the electron module.

), }, { name: 'select-versions', selector: 'button.version-chooser', title: 'πŸ“‡ Choose an Electron Version', content: ( <>

Electron Fiddle knows about all released Electron versions, downloading your versions automatically in the background.

Open the preferences to see all available versions and delete those previously downloaded.

), }, { name: 'button-run', selector: '.button-run', title: 'πŸš€ Run Your Fiddle', content:

Hit this button to give your Fiddle a try and start it.

, }, { name: 'button-publish', selector: '.button-publish', title: 'πŸ—Ί Share Your Fiddle', content: ( <>

Like what you've built? You can save your Fiddle as a public GitHub Gist, allowing other users to load it by pasting the URL into the address bar. If they don't have Electron Fiddle, they can see and download your code directly from GitHub.

You can also package your Fiddle as a standalone binary or as an installer from the "Tasks" menu.

), }, { name: 'first-time-electron', selector: 'div.mosaic-root', title: 'πŸ‘‹ Getting Started With Electron?', content: (

We've finished our tour of Electron Fiddle, but if this is your first time using Electron, we could introduce you to its basics. Interested?

), getButtons: ({ stop, advance, }: TourStepGetButtonParams): Array => { return [