From dcfa9011b8926766e6e96f950a101795447bb62b Mon Sep 17 00:00:00 2001 From: Olzzon Date: Thu, 10 Oct 2019 10:23:40 +0200 Subject: [PATCH 1/9] Fix: Package.json --asar does not take any arguments --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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": { From 42b8b5dcc59a468141a5203a39d37f24dfa464fc Mon Sep 17 00:00:00 2001 From: Olzzon Date: Thu, 10 Oct 2019 14:23:25 +0200 Subject: [PATCH 2/9] feat/route-all-button: Clear All Fader-Channel assignments working --- src/components/ChannelRouteSettings.tsx | 85 ++++++++++++++++++------- 1 file changed, 61 insertions(+), 24 deletions(-) diff --git a/src/components/ChannelRouteSettings.tsx b/src/components/ChannelRouteSettings.tsx index d4cd6c9a..e4436c14 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) + 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)'}

}) From 0bd1919eef888f7964bf0e655513717a72413f25 Mon Sep 17 00:00:00 2001 From: Olzzon Date: Thu, 10 Oct 2019 14:28:02 +0200 Subject: [PATCH 3/9] feat/route-all-buttons: 1:1 routing working --- src/components/ChannelRouteSettings.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/components/ChannelRouteSettings.tsx b/src/components/ChannelRouteSettings.tsx index e4436c14..45004971 100644 --- a/src/components/ChannelRouteSettings.tsx +++ b/src/components/ChannelRouteSettings.tsx @@ -112,6 +112,17 @@ class ChannelRouteSettings extends React.PureComponent { + if (this.props.channel.length > index) { + this.props.dispatch({ + type: 'SET_ASSIGNED_FADER', + channel: index, + faderNumber: index + }); + } + }) + } return true } From a647a7b3ef32f14fef0111f526cbf53449d0a195 Mon Sep 17 00:00:00 2001 From: Olzzon Date: Thu, 10 Oct 2019 19:57:09 +0200 Subject: [PATCH 4/9] feat/route-all-button: Button Visuals css --- src/assets/css/ChannelRouteSettings.css | 11 +++++------ src/components/ChannelRouteSettings.tsx | 16 ++++++++++++---- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/assets/css/ChannelRouteSettings.css b/src/assets/css/ChannelRouteSettings.css index c6488432..94492851 100644 --- a/src/assets/css/ChannelRouteSettings.css +++ b/src/assets/css/ChannelRouteSettings.css @@ -55,21 +55,20 @@ border-bottom: 1px solid #999; } -.channel-settings-group > button { +.channel-settings-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; } diff --git a/src/components/ChannelRouteSettings.tsx b/src/components/ChannelRouteSettings.tsx index 45004971..3ba5a71d 100644 --- a/src/components/ChannelRouteSettings.tsx +++ b/src/components/ChannelRouteSettings.tsx @@ -143,10 +143,18 @@ class ChannelRouteSettings extends React.PureComponent

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

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

From 1024244d7c162dfed7cfec71b78e80fe4f81287f Mon Sep 17 00:00:00 2001 From: Olzzon Date: Thu, 10 Oct 2019 20:04:12 +0200 Subject: [PATCH 5/9] feat/route-all-buttons: ccs renaming, as 2 css files had the same names --- src/assets/css/ChannelRouteSettings.css | 21 ++++++--------------- src/components/ChannelRouteSettings.tsx | 2 +- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/src/assets/css/ChannelRouteSettings.css b/src/assets/css/ChannelRouteSettings.css index 94492851..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,17 +47,12 @@ height: 50px; font-size: 30px; line-height: 50px; - top: 9px; + top: -5px; right: 9px; } -.channel-settings-group { - border-bottom: 1px solid #999; -} - -.channel-settings-body > button { +.channel-route-body > button { line-height: 10px; - outline : none; border-color: rgb(99, 99, 99); background-color: rgb(27, 27, 27); @@ -71,7 +66,3 @@ 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 3ba5a71d..71f6643e 100644 --- a/src/components/ChannelRouteSettings.tsx +++ b/src/components/ChannelRouteSettings.tsx @@ -141,7 +141,7 @@ class ChannelRouteSettings extends React.PureComponent +

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