var React = require('react') var Link = require('react-router').Link var Icon = require('icon.jsx') module.exports = React.createClass({ getInitialState () { return {} }, componentWillUnmount () { if (this.timer) clearTimeout(this.timer) }, componentWillReceiveProps (props) { this.init(props) }, componentDidMount () { this.init(this.props) }, init (props) { var boards = props.api if (this.timer) clearTimeout(this.timer) if (boards) { boards.getEventEmitter().on('init', (err, limited) => { if (!this.isMounted()) return if (err) { this.setState({ error: true, limited }) } else { this.setState({ connected: true }) } }) if (boards.isInit) { this.setState({ connected: true }) } else if (boards.limited) { this.setState({ error: true, limited: true }) } else this.startTimer() } else this.startTimer() }, startTimer () { console.log('start timer') this.timer = setTimeout(_ => { console.log('Connection to go-ipfs has timed out (probably due to CORS)') if (this.isMounted() && !this.state.connected && !this.state.limited) { this.setState({ long: true }) this.init(this.props) } }, 5000) }, getContent () { if (this.state.limited) { return

You're running in limited mode

Sorry, but at the moment an external application is needed to fully take advantage of the app

Only a few features are available in limited mode.

Why am I running in limited mode?
} else { return

Connection to IPFS not available

Sorry, but at the moment an external application is needed to try the Prototype

Tip: you can also run in limited mode by loading the app from an IPFS Gateway.

} }, render () { var opt = require('options.jsx').get() if (this.state.error || this.state.long) { return (
{this.getContent()}

You don't have an IPFS node running at {opt.addr}:{opt.port} or it is not reachable. The IPFS Boards prototype requires a full IPFS node. Please start one by following the go-ipfs documentation.

Do you have a running node but the app won't work?

It's probably one of these issues:

Still can't fix it? File a issue on GitHub, we'll be happy to help!

) } else if (this.state.connected) { return

You're connected!
} else { return

Connecting to IPFS

} } })