import React, { PropTypes } from 'react' import Icon from '../Icon' import SpotifyAuthenticationFrame from '../Fields/SpotifyAuthenticationFrame' import LastfmAuthenticationFrame from '../Fields/LastfmAuthenticationFrame' import * as helpers from '../../helpers' export default class InitialSetupModal extends React.Component{ constructor(props){ super(props); this.state = { username: 'Anonymous', allow_reporting: this.props.allow_reporting, host: this.props.host, port: this.props.port, ssl: this.props.ssl } } handleSubmit(e){ e.preventDefault(); this.props.pusherActions.setUsername(this.state.username); this.props.uiActions.set({ initial_setup_complete: true, allow_reporting: this.state.allow_reporting }); this.props.mopidyActions.setConfig({ host: this.state.host, port: this.state.port, ssl: this.state.ssl }); this.setState({saving: true}); // Wait two seconds to allow our actions to complete // Then reload the interface setTimeout(function(){ window.location.reload(true); }, 2000); return false; } render(){ return (

Get started

this.handleSubmit(e)}>
Username this.setState({username: e.target.value.replace(/\W/g, '')})} value={this.state.username } />
A non-unique string used to identify this client (no special characters)
Host
this.setState({host: e.target.value})} value={ this.state.host } />
Port
this.setState({port: e.target.value})} value={ this.state.port } />
Encryption
Reporting
Google Analytics is used to collect usage data and errors to help trace issues and provide valuable insight into how we can continue to make improvements. Personal information is anonymized prior to collection.
) } }