import React, { PropTypes } from 'react' import MarkdownPreview from 'browser/components/MarkdownPreview' import CodeEditor from 'browser/components/CodeEditor' export default class Tutorial extends React.Component { constructor (props) { super(props) this.state = { slideIndex: 0 } } handlePriorSlideClick () { if (this.state.slideIndex > 0) this.setState({slideIndex: this.state.slideIndex - 1}) } handleNextSlideClick () { if (this.state.slideIndex < 4) this.setState({slideIndex: this.state.slideIndex + 1}) } startButtonClick (e) { this.props.close() } render () { let content = this.renderContent(this.state.slideIndex) let dotElements = [] for (let i = 0; i < 5; i++) { dotElements.push() } return (
{content}
{dotElements}
) } renderContent (index) { switch (index) { case 0: return (
Welcome to Boost
Boost is a brand new note app for software
Don't waste time cleaning up your data.
devote that time to more creative work.
Hack your memory.
) case 1: let content = '## Boost is a note app for engineer.\n\n - Write with markdown\n - Stylize beautiful' return (
Write with Markdown
Markdown is available.
Your notes will be stylized beautifully and quickly.
{content}
) case 2: let code = 'import shell from \'shell\'\r\nvar React = require(\'react\')\r\nvar { PropTypes } = React\r\nimport markdown from \'boost\/markdown\'\r\nvar ReactDOM = require(\'react-dom\')\r\n\r\nfunction handleAnchorClick (e) {\r\n shell.openExternal(e.target.href)\r\n e.preventDefault()\r\n}\r\n\r\nexport default class MarkdownPreview extends React.Component {\r\n componentDidMount () {\r\n this.addListener()\r\n }\r\n\r\n componentDidUpdate () {\r\n this.addListener()\r\n }\r\n\r\n componentWillUnmount () {\r\n this.removeListener()\r\n }' return (
Beautiful code highlighting
Boost supports code syntax highlighting.
There are more than 100 different type of language.
) case 3: return (
Easy to access with Finder
The Finder helps you organize all of the files and documents.
There is a short-cut key [control + shift + tab] to open the Finder.
It is available to save your articles on the Clipboard
by selecting your file with pressing Enter key,
and to paste the contents of the Clipboard with [{process.platform === 'darwin' ? 'Command' : 'Control'}-V]
) case 4: return (
Are you ready?
) default: return null } } } Tutorial.propTypes = { close: PropTypes.func }