Version manager for pusher; Local spotify tokens
This commit is contained in:
@ -7,6 +7,7 @@ import FontAwesome from 'react-fontawesome'
|
||||
import SpotifyAuthenticationFrame from '../components/SpotifyAuthenticationFrame'
|
||||
import ConfirmationButton from '../components/ConfirmationButton'
|
||||
import PusherConnectionList from '../components/PusherConnectionList'
|
||||
import VersionManager from '../components/VersionManager'
|
||||
import Header from '../components/Header'
|
||||
|
||||
import * as pusherActions from '../services/pusher/actions'
|
||||
@ -142,9 +143,13 @@ class Settings extends React.Component{
|
||||
|
||||
<SpotifyAuthenticationFrame />
|
||||
|
||||
<ConfirmationButton content="Reset all settings" confirmingContent="Are you sure?" onConfirm={() => this.resetAllSettings()} />
|
||||
|
||||
<h3 className="underline">Advanced</h3>
|
||||
<label>
|
||||
<div className="label">Version</div>
|
||||
<div className="input">
|
||||
<VersionManager />
|
||||
</div>
|
||||
</label>
|
||||
<label>
|
||||
<div className="label">Connections</div>
|
||||
<div className="input">
|
||||
@ -152,6 +157,8 @@ class Settings extends React.Component{
|
||||
</div>
|
||||
</label>
|
||||
|
||||
<ConfirmationButton content="Reset all settings" confirmingContent="Are you sure?" onConfirm={() => this.resetAllSettings()} />
|
||||
|
||||
</section>
|
||||
</div>
|
||||
);
|
||||
|
||||
@ -18,16 +18,21 @@ class LibraryPlaylists extends React.Component{
|
||||
|
||||
// on render
|
||||
componentDidMount(){
|
||||
if( this.props.mopidy.connected ) this.loadPlaylists();
|
||||
if( this.props.mopidy.connected ){
|
||||
this.props.mopidyActions.getPlaylists();
|
||||
}
|
||||
if( this.props.spotify.authorized ){
|
||||
this.props.spotifyActions.getLibraryPlaylists();
|
||||
}
|
||||
}
|
||||
|
||||
componentWillReceiveProps( nextProps ){
|
||||
if( !this.props.mopidy.connected && nextProps.mopidy.connected ) this.loadPlaylists();
|
||||
}
|
||||
|
||||
loadPlaylists(){
|
||||
this.props.spotifyActions.getLibraryPlaylists();
|
||||
this.props.mopidyActions.getPlaylists();
|
||||
if( !this.props.mopidy.connected && nextProps.mopidy.connected ){
|
||||
this.props.mopidyActions.getPlaylists();
|
||||
}
|
||||
if( !this.props.spotify.authorized && nextProps.spotify.authorized ){
|
||||
this.props.spotifyActions.getLibraryPlaylists();
|
||||
}
|
||||
}
|
||||
|
||||
compiledPlaylistSources(){
|
||||
|
||||
Reference in New Issue
Block a user