diff --git a/package.json b/package.json index 4ceebe67..1f221fea 100644 --- a/package.json +++ b/package.json @@ -33,8 +33,8 @@ "build-now": "webpack --config webpack.build.config.js --mode production", "package": "yarn run build", "postpackage": "electron-packager --overwrite ./ --out=./builds --overwrite", - "package-linux": "electron-packager . sisyfos-audio-controller --overwrite --asar=true --platform=linux --arch=x64 --prune=true --out=builds", - "package-win": "electron-packager . sisyfos-audio-controller --overwrite --asar=true --platform=win32 --arch=x64 --prune=true --out=builds", + "package-linux": "electron-packager . sisyfos-audio-controller --overwrite --asar --platform=linux --arch=x64 --prune=true --out=builds", + "package-win": "electron-packager . sisyfos-audio-controller --overwrite --asar --platform=win32 --arch=x64 --prune=true --out=builds", "package-release": "yarn package && yarn package-win && yarn package-linux" }, "dependencies": { diff --git a/src/assets/css/Channel.css b/src/assets/css/Channel.css index 9a38626f..8be58352 100644 --- a/src/assets/css/Channel.css +++ b/src/assets/css/Channel.css @@ -159,9 +159,10 @@ width: 460px; margin-top: 260px; transform: translate(-160px, 0px) rotate(270deg); - /*do same for other browsers if required*/ background-color: rgb(39, 39, 39); + + -webkit-overflow-scrolling: touch; } .channel-body.with-snaps .channel-volume-slider { diff --git a/src/assets/css/ChannelRouteSettings.css b/src/assets/css/ChannelRouteSettings.css index c6488432..c0eb9d42 100644 --- a/src/assets/css/ChannelRouteSettings.css +++ b/src/assets/css/ChannelRouteSettings.css @@ -1,4 +1,4 @@ -.channel-settings-body { +.channel-route-body { position: absolute; top: 50%; left: 50%; @@ -16,7 +16,7 @@ color: #fff; } -.channel-settings-body > h2 { +.channel-route-body > h2 { border-bottom: 1px solid #999; margin: 0; padding: 10px 0; @@ -26,7 +26,7 @@ } -.channel-settings-body > h4 { +.channel-route-body > h4 { margin: 0; margin-left: 40px; padding: 0px 0; @@ -35,7 +35,7 @@ font-size: 110%; } -.channel-settings-body > .close { +.channel-route-body > .close { position: absolute; outline : none; border-color: rgb(99, 99, 99); @@ -47,32 +47,22 @@ height: 50px; font-size: 30px; line-height: 50px; - top: 9px; + top: -5px; right: 9px; } -.channel-settings-group { - border-bottom: 1px solid #999; -} - -.channel-settings-group > button { +.channel-route-body > button { line-height: 10px; - outline : none; border-color: rgb(99, 99, 99); background-color: rgb(27, 27, 27); - margin-right: auto; + margin-right: 10px; margin-top: 15px; margin-bottom: 15px; - margin-left: auto; + margin-left: 10px; border-radius: 7px; - display: block; color: #fff; - width: 90%; - font-size: 30px; + width: 34%; + font-size: 10px; line-height: 50px; } - -.channel-settings-group > button.active { - border-color: rgb(17, 0, 255); -} \ No newline at end of file diff --git a/src/components/ChannelRouteSettings.tsx b/src/components/ChannelRouteSettings.tsx index d4cd6c9a..71f6643e 100644 --- a/src/components/ChannelRouteSettings.tsx +++ b/src/components/ChannelRouteSettings.tsx @@ -9,7 +9,7 @@ import CcgChannelSettings from './CcgChannelSettings'; const { dialog } = require('electron').remote; interface IChannelSettingsInjectProps { - label: string, + label: string, selectedProtocol: string, numberOfChannelsInType: Array, channel: Array @@ -17,7 +17,7 @@ interface IChannelSettingsInjectProps { } interface IChannelProps { - faderIndex: number + faderIndex: number } class ChannelRouteSettings extends React.PureComponent { @@ -26,21 +26,21 @@ class ChannelRouteSettings extends React.PureComponent= 0) - ? this.props.fader[assignedFader].label + let assignedFaderLabel = (assignedFader >= 0) + ? this.props.fader[assignedFader].label : 'undefined' - assignedFaderLabel = (assignedFaderLabel === '') + assignedFaderLabel = (assignedFaderLabel === '') ? String(assignedFader + 1) : assignedFaderLabel - if (event.target.checked === false) { + if (event.target.checked === false) { const options = { type: 'question', buttons: ['Yes', 'Cancel'], @@ -56,8 +56,8 @@ class ChannelRouteSettings extends React.PureComponent { - this.props.dispatch({ - type: 'TOGGLE_SHOW_OPTION', - channel: this.faderIndex - }); - } + handleClearRouting() { + const options = { + type: 'question', + buttons: ['Yes', 'Cancel'], + defaultId: 1, + title: 'WARNING', + message: 'WARNING!!!!!', + detail: 'This will remove all Fader-Channel assignments', + }; + let response = dialog.showMessageBoxSync(options) + if (response === 0) { + this.props.channel.forEach((channel: any, index: number) => { + this.props.dispatch({ + type: 'SET_ASSIGNED_FADER', + channel: index, + faderNumber: -1 + }); + }) + } + return true + } + + handle11Routing() { + const options = { + type: 'question', + buttons: ['Yes', 'Cancel'], + defaultId: 1, + title: 'WARNING', + message: 'WARNING!!!!!', + detail: 'This will reassign all Faders 1:1 to Channels', + }; + let response = dialog.showMessageBoxSync(options) + if (response === 0) { + this.props.fader.forEach((fader: any, index: number) => { + if (this.props.channel.length > index) { + this.props.dispatch({ + type: 'SET_ASSIGNED_FADER', + channel: index, + faderNumber: index + }); + } + }) + } + return true + } + + handleClose = () => { + this.props.dispatch({ + type: 'TOGGLE_SHOW_OPTION', + channel: this.faderIndex + }); + } render() { if (this.props.selectedProtocol.includes("caspar")) { return ( - - ) - } + + ) + } else { return ( -
+

{this.props.label || ("FADER " + (this.faderIndex + 1))}

- - - + + + +
{this.props.channel.map((channel: any, index: number) => { return

- {(" Channel " + (index + 1) + " : " )} + {(" Channel " + (index + 1) + " : ")} this.handleAssignChannel(index, event)} /> - {this.props.channel[index].assignedFader >=0 - ? ( " (Fader " + (this.props.channel[index].assignedFader + 1) + ")") + {this.props.channel[index].assignedFader >= 0 + ? (" (Fader " + (this.props.channel[index].assignedFader + 1) + ")") : ' (not assigned)'}

}) diff --git a/src/components/Settings.tsx b/src/components/Settings.tsx index 174908d0..c6feaa50 100644 --- a/src/components/Settings.tsx +++ b/src/components/Settings.tsx @@ -316,8 +316,15 @@ class Settings extends React.PureComponent {
+
+

- + +