Skip to content

Commit

Permalink
feat: channel strip follows PFL
Browse files Browse the repository at this point in the history
  • Loading branch information
Balte de Wit committed Jun 18, 2020
1 parent 4ae5cac commit 3f3b867
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
7 changes: 7 additions & 0 deletions client/components/Channel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ class Channel extends React.Component<

handlePfl() {
window.socketIoClient.emit(SOCKET_TOGGLE_PFL, this.faderIndex)
if (
this.props.settings.chanStripFollowsPFL &&
!this.props.fader.pflOn &&
this.props.settings.showChanStrip !== this.faderIndex
) {
this.handleShowChanStrip()
}
}

handleMute() {
Expand Down
3 changes: 2 additions & 1 deletion client/components/Channels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ class Channels extends React.Component<IChannelsInjectProps & Store> {
this.handlePages(PageType.NumberedPage, i)
}}
>
CH{i * pageLength + 1}-{(i + 1) * pageLength}
CH{i * pageLength + 1}-
{Math.min((i + 1) * pageLength, numberOfFaders)}
</button>
)
}
Expand Down
10 changes: 10 additions & 0 deletions client/components/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,16 @@ class Settings extends React.PureComponent<IAppProps & Store, IState> {
/>
</label>
<br />
<label className="settings-input-field">
CHANNEL STRIP FOLLOWS PFL:
<input
type="checkbox"
name="chanStripFollowsPFL"
checked={this.state.settings.chanStripFollowsPFL}
onChange={this.handleChange}
/>
</label>
<br />
{window.mixerProtocol.protocol === 'MIDI'
? this.renderMixerMidiSettings()
: ''}
Expand Down
2 changes: 2 additions & 0 deletions server/reducers/settingsReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export interface ISettings {
showPfl: boolean
enablePages: boolean
pageLength: number
chanStripFollowsPFL: boolean

/** Connection state */
mixerOnline: boolean
Expand Down Expand Up @@ -105,6 +106,7 @@ const defaultSettingsReducerState: Array<ISettings> = [
showPfl: false,
enablePages: true,
pageLength: 16,
chanStripFollowsPFL: true,

mixerOnline: false,
serverOnline: true,
Expand Down

0 comments on commit 3f3b867

Please sign in to comment.