From 7a14b5ef532a646aa71fb343b00424a263247515 Mon Sep 17 00:00:00 2001 From: Olzzon Date: Thu, 19 Dec 2019 09:43:03 +0100 Subject: [PATCH] chore: client cleanup - remove snaps --- src/components/Channel.tsx | 52 +----------------------------- src/components/Channels.tsx | 64 ------------------------------------- storage/default.shot | 2 +- 3 files changed, 2 insertions(+), 116 deletions(-) diff --git a/src/components/Channel.tsx b/src/components/Channel.tsx index a2d5513e..8037d6dd 100644 --- a/src/components/Channel.tsx +++ b/src/components/Channel.tsx @@ -10,9 +10,6 @@ import ReactSlider from 'react-slider' //assets: import '../assets/css/Channel.css'; import { SOCKET_TOGGLE_PGM, SOCKET_TOGGLE_VO, SOCKET_TOGGLE_PST, SOCKET_TOGGLE_PFL, SOCKET_TOGGLE_MUTE, SOCKET_SET_FADERLEVEL } from '../../server/constants/SOCKET_IO_DISPATCHERS' -import { - TOGGLE_SNAP -} from '../../server/reducers/faderActions' import { IFader } from '../../server/reducers/fadersReducer'; import { IChannels } from '../../server/reducers/channelsReducer'; import { ISettings } from '../../server/reducers/settingsReducer'; @@ -24,7 +21,6 @@ interface IChannelInjectProps { settings: ISettings channelType: number, channelTypeIndex: number, - snapOn: boolean[], } interface IChannelProps { @@ -41,12 +37,6 @@ class Channel extends React.Component { - if (snapOn === this.props.snapOn[index]) { - snapChanged = true; - } - }) return ( nextProps.fader.pgmOn != this.props.fader.pgmOn || nextProps.fader.pstOn != this.props.fader.pstOn || @@ -57,8 +47,7 @@ class Channel extends React.Component { - if (this.props.settings.showSnaps) { - return ( -
- -
-
- ) - } else { - return("") - } - } - render() { return ( this.props.fader.showChannel === false ? @@ -260,7 +219,6 @@ class Channel extends React.Component @@ -294,13 +252,6 @@ class Channel extends React.Component -
- {this.props.snapOn - .map((none: any, index: number) => { - return this.snapButton(index) - }) - } -
) } @@ -313,7 +264,6 @@ const mapStateToProps = (state: any, props: any): IChannelInjectProps => { settings: state.settings[0], channelType: 0, /* TODO: state.channels[0].channel[props.channelIndex].channelType, */ channelTypeIndex: props.faderIndex ,/* TODO: state.channels[0].channel[props.channelIndex].channelTypeIndex, */ - snapOn: state.faders[0].fader[props.faderIndex].snapOn.map((item: number) => {return item}), } } diff --git a/src/components/Channels.tsx b/src/components/Channels.tsx index 879da4d0..1f4d26be 100644 --- a/src/components/Channels.tsx +++ b/src/components/Channels.tsx @@ -6,12 +6,8 @@ import * as ClassNames from 'classnames'; import Channel from './Channel'; import '../assets/css/Channels.css'; import { Store } from 'redux'; -import { - SNAP_RECALL -} from '../../server/reducers/faderActions' import { TOGGLE_SHOW_SETTINGS, - TOGGLE_SHOW_SNAPS, TOGGLE_SHOW_STORAGE } from '../../server/reducers/settingsActions' import ChannelRouteSettings from './ChannelRouteSettings'; @@ -31,7 +27,6 @@ interface IChannelsInjectProps { class Channels extends React.Component { constructor(props: any) { super(props); - this.props.settings.showChanStrip = -1 this.props.settings.showMonitorOptions = -1 } @@ -43,7 +38,6 @@ class Channels extends React.Component { || this.props.faders.length !== nextProps.faders.length; } - handleMix() { window.socketIoClient.emit(SOCKET_NEXT_MIX) } @@ -52,19 +46,6 @@ class Channels extends React.Component { window.socketIoClient.emit(SOCKET_CLEAR_PST) } - handleSnapMix(snapIndex: number) { - this.props.dispatch({ - type: SNAP_RECALL, - snapIndex: snapIndex - }); - } - - handleShowSnaps() { - this.props.dispatch({ - type: TOGGLE_SHOW_SNAPS, - }); - } - handleReconnect() { if (window.confirm('Are you sure you will restart server?')) { window.socketIoClient.emit(SOCKET_RESTART_SERVER) @@ -84,20 +65,6 @@ class Channels extends React.Component { }); } - snapMixButton(snapIndex: number) { - return ( -
- -
-
- ) - } - render() { return (
@@ -150,20 +117,6 @@ class Channels extends React.Component { RESTART SERVER } - {(this.props.settings.automationMode || - this.props.settings.offtubeMode) ? - null - : - {} -
-
- } }
- - {(this.props.settings.automationMode || - this.props.settings.offtubeMode) ? - null - : -
- {this.snapMixButton(0)} - {this.snapMixButton(1)} - {this.snapMixButton(2)} - {this.snapMixButton(3)} - {this.snapMixButton(4)} - {this.snapMixButton(5)} - {this.snapMixButton(6)} - {this.snapMixButton(7)} -
-
- }
) diff --git a/storage/default.shot b/storage/default.shot index a8cc7cdb..c0561418 100644 --- a/storage/default.shot +++ b/storage/default.shot @@ -1 +1 @@ -{"faderState":{"vuMeters":[{"vuVal":0},{"vuVal":0},{"vuVal":0},{"vuVal":0},{"vuVal":0},{"vuVal":0},{"vuVal":0},{"vuVal":0}],"fader":[{"faderLevel":0.5270000100135803,"label":"","pgmOn":true,"voOn":false,"pstOn":false,"pstVoOn":false,"pflOn":false,"muteOn":false,"low":0.75,"mid":0.75,"high":0.75,"threshold":0.75,"ratio":0.75,"monitor":1,"showChannel":true,"snapOn":[false,false,false,false,false,false,false,false]},{"faderLevel":0.75,"label":"","pgmOn":false,"voOn":false,"pstOn":false,"pstVoOn":false,"pflOn":false,"muteOn":false,"low":0.75,"mid":0.75,"high":0.75,"threshold":0.75,"ratio":0.75,"monitor":2,"showChannel":true,"snapOn":[false,false,false,false,false,false,false,false]},{"faderLevel":0.92,"label":"","pgmOn":false,"voOn":false,"pstOn":false,"pstVoOn":false,"pflOn":false,"muteOn":false,"low":0.75,"mid":0.75,"high":0.75,"threshold":0.75,"ratio":0.75,"monitor":3,"showChannel":true,"snapOn":[false,false,false,false,false,false,false,false]},{"faderLevel":0.75,"label":"","pgmOn":false,"voOn":false,"pstOn":false,"pstVoOn":false,"pflOn":false,"muteOn":false,"low":0.75,"mid":0.75,"high":0.75,"threshold":0.75,"ratio":0.75,"monitor":4,"showChannel":true,"snapOn":[false,false,false,false,false,false,false,false]},{"faderLevel":0.62,"label":"","pgmOn":false,"voOn":false,"pstOn":false,"pstVoOn":false,"pflOn":false,"muteOn":false,"low":0.75,"mid":0.75,"high":0.75,"threshold":0.75,"ratio":0.75,"monitor":5,"showChannel":true,"snapOn":[false,false,false,false,false,false,false,false]},{"faderLevel":0.75,"label":"","pgmOn":false,"voOn":false,"pstOn":false,"pstVoOn":false,"pflOn":false,"muteOn":false,"low":0.75,"mid":0.75,"high":0.75,"threshold":0.75,"ratio":0.75,"monitor":6,"showChannel":true,"snapOn":[false,false,false,false,false,false,false,false]},{"faderLevel":0.75,"label":"","pgmOn":false,"voOn":false,"pstOn":false,"pstVoOn":false,"pflOn":false,"muteOn":false,"low":0.75,"mid":0.75,"high":0.75,"threshold":0.75,"ratio":0.75,"monitor":7,"showChannel":true,"snapOn":[false,false,false,false,false,false,false,false]},{"faderLevel":0.75,"label":"","pgmOn":false,"voOn":false,"pstOn":false,"pstVoOn":false,"pflOn":false,"muteOn":false,"low":0.75,"mid":0.75,"high":0.75,"threshold":0.75,"ratio":0.75,"monitor":8,"showChannel":true,"snapOn":[false,false,false,false,false,false,false,false]}]},"channelState":{"channel":[{"channelType":0,"channelTypeIndex":0,"assignedFader":0,"fadeActive":false,"outputLevel":0.5270000100135803,"auxLevel":[]},{"channelType":0,"channelTypeIndex":1,"assignedFader":1,"fadeActive":false,"outputLevel":0,"auxLevel":[]},{"channelType":0,"channelTypeIndex":2,"assignedFader":2,"fadeActive":false,"outputLevel":0,"auxLevel":[]},{"channelType":0,"channelTypeIndex":3,"assignedFader":3,"fadeActive":false,"outputLevel":0,"auxLevel":[]},{"channelType":0,"channelTypeIndex":4,"assignedFader":4,"fadeActive":false,"outputLevel":0,"auxLevel":[]},{"channelType":0,"channelTypeIndex":5,"assignedFader":5,"fadeActive":false,"outputLevel":0,"auxLevel":[]},{"channelType":0,"channelTypeIndex":6,"assignedFader":6,"fadeActive":false,"outputLevel":0,"auxLevel":[]},{"channelType":0,"channelTypeIndex":7,"assignedFader":7,"fadeActive":false,"outputLevel":0,"auxLevel":[]}]}} \ No newline at end of file +{"faderState":{"vuMeters":[{"vuVal":0.7691009640693665},{"vuVal":0},{"vuVal":0},{"vuVal":0},{"vuVal":0},{"vuVal":0},{"vuVal":0},{"vuVal":0}],"fader":[{"faderLevel":0.68,"label":"","pgmOn":true,"voOn":false,"pstOn":false,"pstVoOn":false,"pflOn":false,"muteOn":false,"low":0.75,"mid":0.75,"high":0.75,"threshold":0.75,"ratio":0.75,"monitor":1,"showChannel":true,"snapOn":[false,false,false,false,false,false,false,false]},{"faderLevel":0.75,"label":"","pgmOn":false,"voOn":false,"pstOn":false,"pstVoOn":false,"pflOn":false,"muteOn":false,"low":0.75,"mid":0.75,"high":0.75,"threshold":0.75,"ratio":0.75,"monitor":2,"showChannel":true,"snapOn":[false,false,false,false,false,false,false,false]},{"faderLevel":0.75,"label":"","pgmOn":false,"voOn":false,"pstOn":false,"pstVoOn":false,"pflOn":false,"muteOn":false,"low":0.75,"mid":0.75,"high":0.75,"threshold":0.75,"ratio":0.75,"monitor":3,"showChannel":true,"snapOn":[false,false,false,false,false,false,false,false]},{"faderLevel":0.75,"label":"","pgmOn":false,"voOn":false,"pstOn":false,"pstVoOn":false,"pflOn":false,"muteOn":false,"low":0.75,"mid":0.75,"high":0.75,"threshold":0.75,"ratio":0.75,"monitor":4,"showChannel":true,"snapOn":[false,false,false,false,false,false,false,false]},{"faderLevel":0.62,"label":"","pgmOn":false,"voOn":false,"pstOn":false,"pstVoOn":false,"pflOn":false,"muteOn":false,"low":0.75,"mid":0.75,"high":0.75,"threshold":0.75,"ratio":0.75,"monitor":5,"showChannel":true,"snapOn":[false,false,false,false,false,false,false,false]},{"faderLevel":0.75,"label":"","pgmOn":false,"voOn":false,"pstOn":false,"pstVoOn":false,"pflOn":false,"muteOn":false,"low":0.75,"mid":0.75,"high":0.75,"threshold":0.75,"ratio":0.75,"monitor":6,"showChannel":true,"snapOn":[false,false,false,false,false,false,false,false]},{"faderLevel":0.75,"label":"","pgmOn":false,"voOn":false,"pstOn":false,"pstVoOn":false,"pflOn":false,"muteOn":false,"low":0.75,"mid":0.75,"high":0.75,"threshold":0.75,"ratio":0.75,"monitor":7,"showChannel":true,"snapOn":[false,false,false,false,false,false,false,false]},{"faderLevel":0.75,"label":"","pgmOn":false,"voOn":false,"pstOn":false,"pstVoOn":false,"pflOn":false,"muteOn":false,"low":0.75,"mid":0.75,"high":0.75,"threshold":0.75,"ratio":0.75,"monitor":8,"showChannel":true,"snapOn":[false,false,false,false,false,false,false,false]}]},"channelState":{"channel":[{"channelType":0,"channelTypeIndex":0,"assignedFader":0,"fadeActive":false,"outputLevel":0.68,"auxLevel":[]},{"channelType":0,"channelTypeIndex":1,"assignedFader":1,"fadeActive":false,"outputLevel":0,"auxLevel":[]},{"channelType":0,"channelTypeIndex":2,"assignedFader":2,"fadeActive":false,"outputLevel":0,"auxLevel":[]},{"channelType":0,"channelTypeIndex":3,"assignedFader":3,"fadeActive":false,"outputLevel":0,"auxLevel":[]},{"channelType":0,"channelTypeIndex":4,"assignedFader":4,"fadeActive":false,"outputLevel":0,"auxLevel":[]},{"channelType":0,"channelTypeIndex":5,"assignedFader":5,"fadeActive":false,"outputLevel":0,"auxLevel":[]},{"channelType":0,"channelTypeIndex":6,"assignedFader":6,"fadeActive":false,"outputLevel":0,"auxLevel":[]},{"channelType":0,"channelTypeIndex":7,"assignedFader":7,"fadeActive":false,"outputLevel":0,"auxLevel":[]}]}} \ No newline at end of file