Moving snapcast to debug (as beta)

This commit is contained in:
James Barnsley
2018-03-25 10:20:17 +13:00
parent e7abde42f8
commit 8db6e15e3e
11 changed files with 716 additions and 666 deletions

View File

@ -250,7 +250,9 @@ export function reorderTracklist(indexes, insert_before){
}
export function clearTracklist(){
return instruct('tracklist.clear')
return {
type: 'MOPIDY_CLEAR_TRACKLIST'
}
}

View File

@ -287,9 +287,11 @@ const MopidyMiddleware = (function(){
store.dispatch(pusherActions.deliverBroadcast(
'notification',
{
type: 'info',
content: store.getState().pusher.username +' paused playback',
icon: (store.getState().core.current_track ? helpers.getTrackIcon(store.getState().core.current_track, store.getState().core) : false)
notification: {
type: 'info',
content: store.getState().pusher.username +' paused playback',
icon: (store.getState().core.current_track ? helpers.getTrackIcon(store.getState().core.current_track, store.getState().core) : false)
}
}
));
break
@ -786,6 +788,19 @@ const MopidyMiddleware = (function(){
)
break;
case 'MOPIDY_CLEAR_TRACKLIST':
instruct(socket, store, 'tracklist.clear');
store.dispatch(pusherActions.deliverBroadcast(
'notification',
{
notification: {
type: 'info',
content: store.getState().pusher.username +' cleared queue'
}
}
));
break;
/**
* =============================================================== SEARCHING ============

View File

@ -12,6 +12,7 @@ import URISchemesList from '../components/URISchemesList'
import VersionManager from '../components/VersionManager'
import Header from '../components/Header'
import Thumbnail from '../components/Thumbnail'
import Snapcast from '../components/Snapcast'
import * as uiActions from '../services/ui/actions'
import * as pusherActions from '../services/pusher/actions'
@ -119,6 +120,11 @@ class Debug extends React.Component{
</div>
</form>
<h4 className="underline">Snapcast (beta)</h4>
<div className="field">
<Snapcast />
</div>
<h4 className="underline">Spotify</h4>
<div className="field">
<div className="name">Access token</div>

View File

@ -16,7 +16,6 @@ import Parallax from '../components/Parallax'
import Icon from '../components/Icon'
import Thumbnail from '../components/Thumbnail'
import URILink from '../components/URILink'
import Snapcast from '../components/Snapcast'
import * as coreActions from '../services/core/actions'
import * as uiActions from '../services/ui/actions'
@ -266,63 +265,6 @@ class Settings extends React.Component {
<section className="content-wrapper">
<h4 className="underline">Audio output</h4>
<div className="field">
<Snapcast />
</div>
<h4 className="underline">Streaming</h4>
<div className="field checkbox">
<div className="name">Enable</div>
<div className="input">
<label>
<input
type="checkbox"
name="ssl"
checked={this.props.core.http_streaming_enabled}
onChange={e => this.props.coreActions.set({http_streaming_enabled: !this.props.core.http_streaming_enabled})} />
<span className="label has-tooltip">
Stream audio to this browser
<span className="tooltip">Requires streaming service like Icecast2</span>
</span>
</label>
</div>
</div>
<div className="field radio">
<div className="name">Encoding</div>
<div className="input">
<label>
<input
type="radio"
name="http_streaming_encoding"
checked={this.props.core.http_streaming_encoding == 'mpeg'}
onChange={e => this.props.coreActions.set({http_streaming_encoding: 'mpeg'})} />
<span className="label">mpeg (mp3)</span>
</label>
<label>
<input
type="radio"
name="http_streaming_encoding"
checked={this.props.core.http_streaming_encoding == 'ogg'}
onChange={e => this.props.coreActions.set({http_streaming_encoding: 'ogg'})} />
<span className="label">ogg</span>
</label>
</div>
</div>
<div className="field">
<div className="name">Location</div>
<div className="input">
<input
type="text"
onChange={e => this.props.coreActions.set({http_streaming_url: e.target.value})}
value={this.props.core.http_streaming_url} />
<div className="description">
The full URL to your stream endpoint
</div>
</div>
</div>
<h4 className="underline">Server</h4>
<div className="field">
@ -389,7 +331,60 @@ class Settings extends React.Component {
</div>
</div>
{this.renderApplyButton()}
</form>
</form>
<h4 className="underline">Streaming</h4>
<div className="field checkbox">
<div className="name">Enable</div>
<div className="input">
<label>
<input
type="checkbox"
name="ssl"
checked={this.props.core.http_streaming_enabled}
onChange={e => this.props.coreActions.set({http_streaming_enabled: !this.props.core.http_streaming_enabled})} />
<span className="label has-tooltip">
Stream audio to this browser
<span className="tooltip">Requires streaming service like Icecast2</span>
</span>
</label>
</div>
</div>
<div className="field radio">
<div className="name">Encoding</div>
<div className="input">
<label>
<input
type="radio"
name="http_streaming_encoding"
checked={this.props.core.http_streaming_encoding == 'mpeg'}
onChange={e => this.props.coreActions.set({http_streaming_encoding: 'mpeg'})} />
<span className="label">mpeg (mp3)</span>
</label>
<label>
<input
type="radio"
name="http_streaming_encoding"
checked={this.props.core.http_streaming_encoding == 'ogg'}
onChange={e => this.props.coreActions.set({http_streaming_encoding: 'ogg'})} />
<span className="label">ogg</span>
</label>
</div>
</div>
<div className="field">
<div className="name">Location</div>
<div className="input">
<input
type="text"
onChange={e => this.props.coreActions.set({http_streaming_url: e.target.value})}
value={this.props.core.http_streaming_url} />
<div className="description">
The full URL to your stream endpoint
</div>
</div>
</div>
<h4 className="underline">Localization</h4>