Clients to have access to broadcast and send_message as it now uses data as dict, not python params
This commit is contained in:
@ -17,7 +17,14 @@ class AuthorizationModal_Send extends React.Component{
|
||||
|
||||
handleClick(e, connection_id){
|
||||
e.preventDefault()
|
||||
this.props.pusherActions.sendAuthorization(connection_id, this.props.authorization, this.props.me )
|
||||
this.props.pusherActions.deliverMessage(
|
||||
connection_id,
|
||||
'spotify.authorizationReceived',
|
||||
{
|
||||
authorization: this.props.authorization,
|
||||
me: this.props.me
|
||||
}
|
||||
);
|
||||
this.props.uiActions.closeModal()
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -26,29 +26,36 @@ class PusherConnectionList extends React.Component{
|
||||
}
|
||||
|
||||
render(){
|
||||
if (!this.props.connected ) return <div className="pusher-connection-list grey-text">Not connected</div>
|
||||
if (!this.props.connected){
|
||||
return <div className="pusher-connection-list grey-text">Not connected</div>;
|
||||
}
|
||||
|
||||
var connections = []
|
||||
var connections = [];
|
||||
for (var connection_id in this.props.connections){
|
||||
if (this.props.connections.hasOwnProperty(connection_id)){
|
||||
connections.push(this.props.connections[connection_id])
|
||||
connections.push(this.props.connections[connection_id]);
|
||||
}
|
||||
}
|
||||
|
||||
if (connections.length <= 0) return <div className="pusher-connection-list grey-text">No connections</div>;
|
||||
if (connections.length <= 0){
|
||||
return <div className="pusher-connection-list grey-text">No connections</div>;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="pusher-connection-list">
|
||||
{
|
||||
connections.map((connection, index) => {
|
||||
connections.map(connection => {
|
||||
var is_me = false;
|
||||
if (connection.connection_id == this.props.connection_id ) is_me = true;
|
||||
if (connection.connection_id == this.props.connection_id){
|
||||
is_me = true;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={ is_me ? 'connection cf me': 'connection cf'} key={connection.connection_id}>
|
||||
<div className="col w30">{ connection.username } { is_me ? <span>(you)</span> : null }</div>
|
||||
<div className={is_me ? 'connection cf me':'connection cf'} key={connection.connection_id}>
|
||||
<div className="col w30">{ connection.username } {is_me ? <span>(you)</span> : null }</div>
|
||||
<div className="col w70">
|
||||
{ connection.ip }
|
||||
<span className="grey-text"> ({ connection.connection_id })</span>
|
||||
{connection.ip}
|
||||
<span className="grey-text"> ({connection.connection_id})</span>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user