2016-10-17 10:39:11 +13:00
|
|
|
|
|
|
|
|
import React, { PropTypes } from 'react'
|
2017-08-05 22:25:25 +12:00
|
|
|
import { connect } from 'react-redux'
|
|
|
|
|
import { hashHistory, Link } from 'react-router'
|
|
|
|
|
import { bindActionCreators } from 'redux'
|
2016-11-29 15:36:01 +13:00
|
|
|
|
2018-04-19 13:34:16 +12:00
|
|
|
import ConfirmationButton from '../components/Fields/ConfirmationButton'
|
2017-08-05 22:25:25 +12:00
|
|
|
import PusherConnectionList from '../components/PusherConnectionList'
|
2018-05-28 21:06:00 +12:00
|
|
|
import SourcesPriority from '../components/Fields/SourcesPriority'
|
2016-10-23 23:48:06 +13:00
|
|
|
import Header from '../components/Header'
|
2017-08-05 22:25:25 +12:00
|
|
|
import Icon from '../components/Icon'
|
|
|
|
|
import Thumbnail from '../components/Thumbnail'
|
2017-11-03 09:06:41 +13:00
|
|
|
import URILink from '../components/URILink'
|
2018-03-30 22:37:38 +13:00
|
|
|
import Services from '../components/Services'
|
2016-10-17 10:39:11 +13:00
|
|
|
|
2018-06-29 14:26:06 +12:00
|
|
|
import * as helpers from '../helpers'
|
2017-08-05 22:25:25 +12:00
|
|
|
import * as coreActions from '../services/core/actions'
|
|
|
|
|
import * as uiActions from '../services/ui/actions'
|
|
|
|
|
import * as pusherActions from '../services/pusher/actions'
|
|
|
|
|
import * as mopidyActions from '../services/mopidy/actions'
|
2017-11-03 09:06:41 +13:00
|
|
|
import * as lastfmActions from '../services/lastfm/actions'
|
2017-08-05 22:25:25 +12:00
|
|
|
import * as spotifyActions from '../services/spotify/actions'
|
|
|
|
|
|
|
|
|
|
class Settings extends React.Component {
|
|
|
|
|
|
2017-10-10 13:05:28 +13:00
|
|
|
constructor(props){
|
2017-08-05 22:25:25 +12:00
|
|
|
super(props);
|
|
|
|
|
this.state = {
|
|
|
|
|
mopidy_host: this.props.mopidy.host,
|
|
|
|
|
mopidy_port: this.props.mopidy.port,
|
2017-11-27 16:38:33 +13:00
|
|
|
mopidy_ssl: this.props.mopidy.ssl,
|
2018-06-10 10:02:31 +12:00
|
|
|
mopidy_library_artists_uri: this.props.mopidy.library_artists_uri,
|
|
|
|
|
mopidy_library_albums_uri: this.props.mopidy.library_albums_uri,
|
2017-08-05 22:25:25 +12:00
|
|
|
pusher_username: this.props.pusher.username,
|
|
|
|
|
input_in_focus: null
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-06-28 08:12:03 +12:00
|
|
|
componentDidMount(){
|
|
|
|
|
this.props.uiActions.setWindowTitle("Settings");
|
|
|
|
|
}
|
|
|
|
|
|
2018-06-15 08:56:17 +12:00
|
|
|
componentWillReceiveProps(nextProps){
|
2017-08-05 22:25:25 +12:00
|
|
|
var changed = false
|
|
|
|
|
var state = this.state
|
|
|
|
|
|
2018-06-15 08:56:17 +12:00
|
|
|
if (nextProps.pusher.username != this.state.pusher_username && this.state.input_in_focus != 'pusher_username'){
|
|
|
|
|
state.pusher_username = nextProps.pusher.username
|
2017-08-05 22:25:25 +12:00
|
|
|
changed = true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (changed){
|
|
|
|
|
this.setState(state)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
resetAllSettings(){
|
|
|
|
|
localStorage.clear();
|
|
|
|
|
window.location = '#'
|
|
|
|
|
window.location.reload(true)
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2017-11-27 16:38:33 +13:00
|
|
|
setConfig(e){
|
|
|
|
|
this.setState({input_in_focus: null});
|
2017-08-05 22:25:25 +12:00
|
|
|
e.preventDefault();
|
2017-11-27 16:38:33 +13:00
|
|
|
|
2018-06-10 10:02:31 +12:00
|
|
|
this.props.mopidyActions.set({
|
2017-11-27 16:38:33 +13:00
|
|
|
host: this.state.mopidy_host,
|
|
|
|
|
port: this.state.mopidy_port,
|
|
|
|
|
ssl: this.state.mopidy_ssl
|
|
|
|
|
});
|
|
|
|
|
|
2017-08-05 22:25:25 +12:00
|
|
|
window.location.reload(true);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2018-06-10 10:02:31 +12:00
|
|
|
handleBlur(service, name, value){
|
|
|
|
|
this.setState({input_in_focus: null});
|
|
|
|
|
var data = {};
|
|
|
|
|
data[name] = value;
|
|
|
|
|
this.props[service+'Actions'].set(data);
|
|
|
|
|
|
|
|
|
|
// Any per-field actions
|
|
|
|
|
switch (name){
|
|
|
|
|
case 'library_albums_uri':
|
|
|
|
|
this.props.mopidyActions.clearLibraryAlbums();
|
|
|
|
|
break;
|
|
|
|
|
case 'library_artists_uri':
|
|
|
|
|
this.props.mopidyActions.clearLibraryArtists();
|
|
|
|
|
break;
|
|
|
|
|
}
|
2017-08-05 22:25:25 +12:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
handleUsernameChange(username){
|
|
|
|
|
this.setState({pusher_username: username.replace(/\W/g, '')})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
handleUsernameBlur(e){
|
|
|
|
|
this.setState({input_in_focus: null})
|
|
|
|
|
this.props.pusherActions.setUsername(this.state.pusher_username)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
renderApplyButton(){
|
2017-11-27 16:38:33 +13:00
|
|
|
if (this.props.mopidy.host == this.state.mopidy_host &&
|
|
|
|
|
this.props.mopidy.port == this.state.mopidy_port &&
|
|
|
|
|
this.props.mopidy.ssl == this.state.mopidy_ssl){
|
|
|
|
|
return null;
|
|
|
|
|
}
|
2017-06-27 09:07:25 +12:00
|
|
|
|
|
|
|
|
return (
|
2017-08-05 22:25:25 +12:00
|
|
|
<div className="field">
|
|
|
|
|
<div className="name"></div>
|
|
|
|
|
<div className="input">
|
|
|
|
|
<button type="submit" className="secondary">Apply and reload</button>
|
|
|
|
|
</div>
|
2017-06-27 09:07:25 +12:00
|
|
|
</div>
|
|
|
|
|
)
|
2017-02-21 08:35:24 +13:00
|
|
|
}
|
|
|
|
|
|
2017-11-13 16:52:53 +13:00
|
|
|
renderServerStatus(){
|
|
|
|
|
var colour = 'grey';
|
2018-05-20 20:42:20 +12:00
|
|
|
var icon = 'help';
|
2017-11-13 16:52:53 +13:00
|
|
|
var status = 'Unknown';
|
|
|
|
|
|
|
|
|
|
if (this.props.mopidy.connecting || this.props.pusher.connecting){
|
2018-05-20 20:42:20 +12:00
|
|
|
icon = 'autorenew';
|
2017-11-13 16:52:53 +13:00
|
|
|
status = 'Connecting...'
|
|
|
|
|
} else if (!this.props.mopidy.connected || !this.props.pusher.connected){
|
|
|
|
|
colour = 'red';
|
|
|
|
|
icon = 'close';
|
|
|
|
|
status = 'Disconnected';
|
|
|
|
|
} else if (this.props.mopidy.connected && this.props.pusher.connected){
|
|
|
|
|
colour = 'green';
|
|
|
|
|
icon = 'check';
|
|
|
|
|
status = 'Connected';
|
2017-08-04 09:19:19 +12:00
|
|
|
}
|
2017-08-06 12:20:43 +12:00
|
|
|
|
|
|
|
|
return (
|
2017-11-13 16:52:53 +13:00
|
|
|
<span className={colour+'-text'}>
|
2018-05-20 20:42:20 +12:00
|
|
|
<Icon name={icon} />{status}
|
2017-11-13 16:52:53 +13:00
|
|
|
</span>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2017-08-04 09:19:19 +12:00
|
|
|
render(){
|
2017-08-05 22:25:25 +12:00
|
|
|
|
|
|
|
|
var options = (
|
|
|
|
|
<span>
|
|
|
|
|
<button className="no-hover" onClick={e => hashHistory.push(global.baseURL+'settings/debug')}>
|
2018-05-19 11:15:10 +12:00
|
|
|
<Icon name="code" />Debug
|
2017-08-05 22:25:25 +12:00
|
|
|
</button>
|
|
|
|
|
<a className="no-hover button" href="https://github.com/jaedb/Iris/wiki" target="_blank">
|
2018-05-19 11:15:10 +12:00
|
|
|
<Icon name="help" />Help
|
2017-08-05 22:25:25 +12:00
|
|
|
</a>
|
|
|
|
|
</span>
|
|
|
|
|
)
|
|
|
|
|
|
2018-04-16 21:58:38 +12:00
|
|
|
|
|
|
|
|
if (this.props.mopidy.upgrading){
|
|
|
|
|
var upgrade_button = (
|
|
|
|
|
<button className="alternative working">
|
|
|
|
|
Upgrading...
|
|
|
|
|
</button>
|
|
|
|
|
);
|
|
|
|
|
} else if (this.props.pusher.version.upgrade_available){
|
2018-04-21 21:59:40 +12:00
|
|
|
var upgrade_button = <button className="alternative" onClick={e => this.props.pusherActions.upgrade()}>Upgrade to { this.props.pusher.version.latest }</button>;
|
2018-04-16 21:58:38 +12:00
|
|
|
} else {
|
2018-04-23 09:07:48 +12:00
|
|
|
var upgrade_button = null;
|
2018-04-16 21:58:38 +12:00
|
|
|
}
|
|
|
|
|
|
2017-08-04 09:19:19 +12:00
|
|
|
return (
|
|
|
|
|
<div className="view settings-view">
|
2018-08-27 08:21:41 +12:00
|
|
|
<Header options={options} uiActions={this.props.uiActions}>
|
2018-05-15 21:30:57 +12:00
|
|
|
<Icon name="settings" type="material" />
|
|
|
|
|
Settings
|
|
|
|
|
</Header>
|
2016-10-29 22:40:02 +13:00
|
|
|
|
2017-08-04 16:08:57 +12:00
|
|
|
<section className="content-wrapper">
|
2017-01-04 16:14:10 +13:00
|
|
|
|
2017-11-13 16:52:53 +13:00
|
|
|
<h4 className="underline">Server</h4>
|
2017-11-04 14:03:59 +13:00
|
|
|
|
2017-11-13 16:52:53 +13:00
|
|
|
<div className="field">
|
|
|
|
|
<div className="name">Status</div>
|
|
|
|
|
<div className="input">
|
|
|
|
|
<div className="text">
|
|
|
|
|
{this.renderServerStatus()}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2017-08-05 22:25:25 +12:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="field">
|
|
|
|
|
<div className="name">Username</div>
|
|
|
|
|
<div className="input">
|
|
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
onChange={e => this.handleUsernameChange(e.target.value)}
|
|
|
|
|
onFocus={e => this.setState({input_in_focus: 'pusher_username'})}
|
|
|
|
|
onBlur={e => this.handleUsernameBlur(e)}
|
|
|
|
|
value={this.state.pusher_username } />
|
2017-09-27 15:39:55 +13:00
|
|
|
<div className="description">
|
|
|
|
|
A non-unique string used to identify this client (no special characters)
|
|
|
|
|
</div>
|
2017-08-05 22:25:25 +12:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2017-11-27 16:38:33 +13:00
|
|
|
<form onSubmit={(e) => this.setConfig(e)}>
|
2017-08-05 22:25:25 +12:00
|
|
|
<div className="field">
|
|
|
|
|
<div className="name">Host</div>
|
|
|
|
|
<div className="input">
|
|
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
onChange={ e => this.setState({mopidy_host: e.target.value})}
|
|
|
|
|
onFocus={e => this.setState({input_in_focus: 'mopidy_host'})}
|
|
|
|
|
onBlur={e => this.setState({input_in_focus: null})}
|
|
|
|
|
value={ this.state.mopidy_host } />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="field">
|
|
|
|
|
<div className="name">Port</div>
|
|
|
|
|
<div className="input">
|
|
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
onChange={ e => this.setState({mopidy_port: e.target.value})}
|
|
|
|
|
onFocus={e => this.setState({input_in_focus: 'mopidy_port'})}
|
|
|
|
|
onBlur={e => this.setState({input_in_focus: null})}
|
|
|
|
|
value={ this.state.mopidy_port } />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2017-11-27 16:38:33 +13:00
|
|
|
<div className="field checkbox">
|
|
|
|
|
<div className="name">Encryption</div>
|
|
|
|
|
<div className="input">
|
|
|
|
|
<label>
|
|
|
|
|
<input
|
|
|
|
|
type="checkbox"
|
|
|
|
|
name="ssl"
|
|
|
|
|
checked={this.state.mopidy_ssl}
|
|
|
|
|
onChange={e => this.setState({mopidy_ssl: !this.state.mopidy_ssl})} />
|
|
|
|
|
<span className="label has-tooltip">
|
|
|
|
|
Enable SSL
|
|
|
|
|
<span className="tooltip">Requires SSL proxy</span>
|
|
|
|
|
</span>
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2017-08-05 22:25:25 +12:00
|
|
|
{this.renderApplyButton()}
|
2018-03-30 22:37:38 +13:00
|
|
|
</form>
|
2017-08-05 22:25:25 +12:00
|
|
|
|
2018-03-30 22:37:38 +13:00
|
|
|
<h4 className="underline">Services</h4>
|
2018-04-03 17:01:40 +12:00
|
|
|
<Services active={this.props.params.sub_view} />
|
2017-11-02 21:20:56 +13:00
|
|
|
|
2018-09-18 21:38:37 +12:00
|
|
|
<h4 className="underline">Interface</h4>
|
2017-08-05 22:25:25 +12:00
|
|
|
|
2018-08-24 16:10:41 +12:00
|
|
|
<div className="field radio">
|
|
|
|
|
<div className="name">
|
|
|
|
|
Theme
|
|
|
|
|
</div>
|
|
|
|
|
<div className="input">
|
|
|
|
|
<label>
|
|
|
|
|
<input
|
|
|
|
|
type="radio"
|
|
|
|
|
name="theme"
|
|
|
|
|
value="dark"
|
|
|
|
|
checked={this.props.ui.theme == 'dark'}
|
|
|
|
|
onChange={ e => this.props.uiActions.set({theme: e.target.value})} />
|
|
|
|
|
<span className="label">Dark</span>
|
|
|
|
|
</label>
|
|
|
|
|
<label>
|
|
|
|
|
<input
|
|
|
|
|
type="radio"
|
|
|
|
|
name="theme"
|
|
|
|
|
value="light"
|
|
|
|
|
checked={this.props.ui.theme == 'light'}
|
|
|
|
|
onChange={e => this.props.uiActions.set({theme: e.target.value})} />
|
|
|
|
|
<span className="label">Light</span>
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2017-08-05 22:25:25 +12:00
|
|
|
<div className="field checkbox">
|
2018-09-18 21:38:37 +12:00
|
|
|
<div className="name">Behavior</div>
|
2017-08-05 22:25:25 +12:00
|
|
|
<div className="input">
|
|
|
|
|
<label>
|
|
|
|
|
<input
|
|
|
|
|
type="checkbox"
|
|
|
|
|
name="log_actions"
|
|
|
|
|
checked={ this.props.ui.clear_tracklist_on_play }
|
|
|
|
|
onChange={ e => this.props.uiActions.set({ clear_tracklist_on_play: !this.props.ui.clear_tracklist_on_play })} />
|
2017-11-19 20:38:36 +13:00
|
|
|
<span className="label has-tooltip">
|
|
|
|
|
Clear tracklist on play of URI(s)
|
|
|
|
|
<span className="tooltip">Playing one or more URIs will clear the current play queue first</span>
|
|
|
|
|
</span>
|
|
|
|
|
</label>
|
2018-06-29 15:00:23 +12:00
|
|
|
<label>
|
|
|
|
|
<input
|
|
|
|
|
type="checkbox"
|
|
|
|
|
name="shortkeys_enabled"
|
|
|
|
|
checked={ this.props.ui.shortkeys_enabled }
|
|
|
|
|
onChange={ e => this.props.uiActions.set({ shortkeys_enabled: !this.props.ui.shortkeys_enabled })} />
|
|
|
|
|
<span className="label">
|
|
|
|
|
Enable shortkeys
|
|
|
|
|
</span>
|
|
|
|
|
</label>
|
2018-09-17 08:18:07 +12:00
|
|
|
<label>
|
|
|
|
|
<input
|
|
|
|
|
type="checkbox"
|
|
|
|
|
name="shortkeys_enabled"
|
|
|
|
|
checked={ this.props.ui.disable_parallax }
|
|
|
|
|
onChange={ e => this.props.uiActions.set({ disable_parallax: !this.props.ui.disable_parallax })} />
|
|
|
|
|
<span className="label has-tooltip">
|
|
|
|
|
Disable parallax
|
|
|
|
|
<span className="tooltip">Improves scroll performance on low-powered devices</span>
|
|
|
|
|
</span>
|
|
|
|
|
</label>
|
2017-08-05 22:25:25 +12:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2018-06-11 08:15:55 +12:00
|
|
|
<div className="field sources-priority">
|
2018-09-18 21:38:37 +12:00
|
|
|
<div className="name">
|
2018-06-11 08:15:55 +12:00
|
|
|
Sources priority
|
|
|
|
|
</div>
|
|
|
|
|
<div className="input">
|
|
|
|
|
<SourcesPriority
|
|
|
|
|
uri_schemes={this.props.mopidy.uri_schemes ? this.props.mopidy.uri_schemes : []}
|
|
|
|
|
uri_schemes_priority={this.props.ui.uri_schemes_priority ? this.props.ui.uri_schemes_priority : []}
|
|
|
|
|
uiActions={this.props.uiActions}
|
|
|
|
|
/>
|
2018-09-18 21:38:37 +12:00
|
|
|
<div className="description">
|
|
|
|
|
Drag-and-drop to prioritize search providers and results
|
|
|
|
|
</div>
|
2018-06-11 08:15:55 +12:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2018-09-18 21:38:37 +12:00
|
|
|
{helpers.isHosted() ? null : <div className="field checkbox">
|
|
|
|
|
<div className="name">Reporting</div>
|
|
|
|
|
<div className="input">
|
|
|
|
|
<label>
|
|
|
|
|
<input
|
|
|
|
|
type="checkbox"
|
|
|
|
|
name="allow_reporting"
|
|
|
|
|
checked={ this.props.ui.allow_reporting }
|
|
|
|
|
onChange={ e => this.props.uiActions.set({ allow_reporting: !this.props.ui.allow_reporting })} />
|
|
|
|
|
<span className="label">
|
|
|
|
|
Allow reporting of anonymous usage statistics
|
|
|
|
|
</span>
|
|
|
|
|
</label>
|
|
|
|
|
<div className="description">Anonymous usage data is used to identify errors and potential features that make Iris better for everyone. Read the <a href="https://github.com/jaedb/Iris/wiki/Terms-of-use#privacy-policy" target="_blank">privacy policy</a>.</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>}
|
|
|
|
|
|
|
|
|
|
<h4 className="underline">Advanced</h4>
|
|
|
|
|
|
2018-06-10 10:02:31 +12:00
|
|
|
<div className="field">
|
|
|
|
|
<div className="name">Artist library URI</div>
|
|
|
|
|
<div className="input">
|
|
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
value={this.state.mopidy_library_artists_uri}
|
|
|
|
|
onChange={e => this.setState({mopidy_library_artists_uri: e.target.value})}
|
|
|
|
|
onBlur={e => this.handleBlur('mopidy', 'library_artists_uri', e.target.value)}
|
|
|
|
|
/>
|
|
|
|
|
<div className="description">
|
|
|
|
|
URI used for collecting library artists
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="field">
|
|
|
|
|
<div className="name">Album library URI</div>
|
|
|
|
|
<div className="input">
|
|
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
value={this.state.mopidy_library_albums_uri}
|
|
|
|
|
onChange={e => this.setState({mopidy_library_albums_uri: e.target.value})}
|
|
|
|
|
onBlur={e => this.handleBlur('mopidy', 'library_albums_uri', e.target.value)}
|
|
|
|
|
/>
|
|
|
|
|
<div className="description">
|
|
|
|
|
URI used for collecting library albums
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2017-08-05 22:25:25 +12:00
|
|
|
<div className="field pusher-connections">
|
|
|
|
|
<div className="name">Connections</div>
|
|
|
|
|
<div className="input">
|
2017-08-06 21:12:57 +12:00
|
|
|
<div className="text">
|
2017-08-05 22:25:25 +12:00
|
|
|
<PusherConnectionList />
|
2017-08-06 21:12:57 +12:00
|
|
|
</div>
|
2017-08-05 22:25:25 +12:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2017-08-06 21:12:57 +12:00
|
|
|
<div className="field">
|
|
|
|
|
<div className="name">Version</div>
|
|
|
|
|
<div className="input">
|
2018-04-16 21:58:38 +12:00
|
|
|
<span className="text">
|
2018-05-20 20:42:20 +12:00
|
|
|
{this.props.pusher.version.current} installed {this.props.pusher.version.upgrade_available ? <span className="flag blue">Upgrade available</span> : <span className="flag dark"><Icon type="fontawesome" name="check" className="green-text" /> Up-to-date</span>}
|
2018-04-16 21:58:38 +12:00
|
|
|
</span>
|
2017-08-05 22:25:25 +12:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="field">
|
2018-07-23 21:05:29 +12:00
|
|
|
<button onClick={e => this.props.ui.install_prompt.prompt()} disabled={this.props.ui.install_prompt ? false : true}>Install as App</button>
|
2018-04-16 21:58:38 +12:00
|
|
|
{upgrade_button}
|
2018-04-21 21:59:40 +12:00
|
|
|
<button className={"destructive"+(this.props.mopidy.restarting ? ' working' : '')} onClick={e => this.props.pusherActions.restart()}>{this.props.mopidy.restarting ? 'Restarting...' : 'Restart server'}</button>
|
2018-04-16 21:58:38 +12:00
|
|
|
<ConfirmationButton className="destructive" content="Reset all settings" confirmingContent="Are you sure?" onConfirm={() => this.resetAllSettings()} />
|
2017-08-05 22:25:25 +12:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h4 className="underline">About</h4>
|
|
|
|
|
|
|
|
|
|
<div className="field">
|
|
|
|
|
<div>
|
|
|
|
|
<em><a href="https://github.com/jaedb/Iris" target="_blank">Iris</a></em> is an open-source project by <a href="https://github.com/jaedb" target="_blank">James Barnsley</a>. It is provided free and with absolutely no warranty. If you paid someone for this software, please let me know.
|
|
|
|
|
</div>
|
|
|
|
|
<br /><br />
|
|
|
|
|
<div>
|
|
|
|
|
<a className="button" href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=james%40barnsley%2enz&lc=NZ&item_name=James%20Barnsley¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted" target="_blank">
|
2018-05-29 08:06:46 +12:00
|
|
|
<Icon type="fontawesome" name="paypal" /> Donate
|
2017-08-05 22:25:25 +12:00
|
|
|
</a>
|
|
|
|
|
<a className="button" href="https://github.com/jaedb/Iris" target="_blank">
|
2018-05-29 08:06:46 +12:00
|
|
|
<Icon type="fontawesome" name="github" /> GitHub
|
2017-08-05 22:25:25 +12:00
|
|
|
</a>
|
2018-05-20 20:42:20 +12:00
|
|
|
<a className="button" href="http://creativecommons.org/licenses/by-nc/4.0/" target="_blank"><Icon type="fontawesome" name="creative-commons" /> Licence</a>
|
2017-08-05 22:25:25 +12:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</section>
|
2016-10-17 10:39:11 +13:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
2017-08-05 22:25:25 +12:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const mapStateToProps = (state, ownProps) => {
|
|
|
|
|
return state;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const mapDispatchToProps = (dispatch) => {
|
|
|
|
|
return {
|
|
|
|
|
coreActions: bindActionCreators(coreActions, dispatch),
|
|
|
|
|
uiActions: bindActionCreators(uiActions, dispatch),
|
|
|
|
|
pusherActions: bindActionCreators(pusherActions, dispatch),
|
|
|
|
|
mopidyActions: bindActionCreators(mopidyActions, dispatch),
|
2017-11-03 09:06:41 +13:00
|
|
|
lastfmActions: bindActionCreators(lastfmActions, dispatch),
|
2017-08-05 22:25:25 +12:00
|
|
|
spotifyActions: bindActionCreators(spotifyActions, dispatch)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(Settings)
|