Skip to content

Commit

Permalink
feat: remove close button in CCG input settings window
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon committed Jan 27, 2020
1 parent 7d20317 commit d61dab7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
14 changes: 3 additions & 11 deletions client/components/CcgChannelSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface IChannelProps {
channelIndex: number
}

class CcgChannelSettings extends React.PureComponent<IChannelProps & IChannelSettingsInjectProps & Store> {
class CcgChannelInputSettings extends React.PureComponent<IChannelProps & IChannelSettingsInjectProps & Store> {
mixerProtocol: ICasparCGMixerGeometry | undefined;
channelIndex: number;

Expand All @@ -36,21 +36,13 @@ class CcgChannelSettings extends React.PureComponent<IChannelProps & IChannelSet
channel: this.channelIndex,
prop,
option
});
}

handleClose = () => {
this.props.dispatch({
type: TOGGLE_SHOW_OPTION,
channel: this.channelIndex
});
})
}

render() {
return (
<div className="channel-settings-body">
<h2>{this.props.label || ("CH " + (this.channelIndex + 1))}</h2>
<button className="close" onClick={() => this.handleClose()}>X</button>
{this.mixerProtocol &&
this.mixerProtocol.sourceOptions &&
Object.getOwnPropertyNames(this.mixerProtocol.sourceOptions.options).map(prop => {
Expand Down Expand Up @@ -82,4 +74,4 @@ const mapStateToProps = (state: any, props: any): IChannelSettingsInjectProps =>
}
}

export default connect<any, IChannelSettingsInjectProps>(mapStateToProps)(CcgChannelSettings) as any;
export default connect<any, IChannelSettingsInjectProps>(mapStateToProps)(CcgChannelInputSettings) as any;
4 changes: 2 additions & 2 deletions client/components/ChanStrip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from '../../server/reducers/settingsActions'
import { IFader } from '../../server/reducers/fadersReducer'
import { SOCKET_SET_THRESHOLD, SOCKET_SET_RATIO, SOCKET_SET_LOW, SOCKET_SET_LO_MID, SOCKET_SET_MID, SOCKET_SET_HIGH, SOCKET_SET_AUX_LEVEL } from '../../server/constants/SOCKET_IO_DISPATCHERS';
import CcgChannelSettings from './CcgChannelSettings';
import CcgChannelInputSettings from './CcgChannelSettings';

interface IChanStripInjectProps {
label: string,
Expand Down Expand Up @@ -281,7 +281,7 @@ class ChanStrip extends React.PureComponent<IChanStripProps & IChanStripInjectPr
parameters() {
if (this.props.selectedProtocol.includes("caspar")) {
return (
<CcgChannelSettings channelIndex={this.props.faderIndex} />
<CcgChannelInputSettings channelIndex={this.props.faderIndex} />
)
}
else {
Expand Down
2 changes: 0 additions & 2 deletions client/components/ChannelRouteSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import * as ClassNames from 'classnames';
import '../assets/css/ChannelRouteSettings.css';
import { Store } from 'redux';
import { connect } from 'react-redux';
import CcgChannelSettings from './CcgChannelSettings';
import { SET_ASSIGNED_FADER } from '../../server/reducers/channelActions'
import { TOGGLE_SHOW_OPTION } from '../../server/reducers/settingsActions'
import { SOCKET_SET_ASSIGNED_FADER } from '../../server/constants/SOCKET_IO_DISPATCHERS';

Expand Down

0 comments on commit d61dab7

Please sign in to comment.