From 944c6335282c72772b5be0167a35641cf1180b4f Mon Sep 17 00:00:00 2001 From: olzzon Date: Thu, 22 Oct 2020 12:36:50 +0200 Subject: [PATCH] feat: custom pages menu - add css file to git - move "PAGES SETUP" in Channels view --- client/assets/css/PagesSettings.css | 93 +++++++++++++++++++++++++++++ client/components/Channels.tsx | 37 +++++++----- 2 files changed, 115 insertions(+), 15 deletions(-) create mode 100644 client/assets/css/PagesSettings.css diff --git a/client/assets/css/PagesSettings.css b/client/assets/css/PagesSettings.css new file mode 100644 index 00000000..3d740a4f --- /dev/null +++ b/client/assets/css/PagesSettings.css @@ -0,0 +1,93 @@ +.pages-settings-body { + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 400px; + overflow: auto; + max-height: 90vh; + background-color: rgb(31, 31, 31); + border-color: rgb(124, 124, 124); + border-style: solid; + border-width: 4px; + text-align: center; + align-items: center; + z-index: 2; + + color: #fff; +} + +.pages-settings-body > h2 { + border-bottom: 1px solid #999; + margin: 0; + padding: 10px 0; + line-height: 50px; + text-align: center; +} + +.pages-settings-mixer-name { + font-size: 150%; + border-bottom: 1px solid #999; + margin: 0; + padding: 10px 0; + line-height: 50px; + text-align: center; +} + +.pages-settings-text { + color: dimgray; + margin: 0; + margin-left: 40px; + padding: 0px 0; + line-height: 20px; + text-align: center; + font-size: 110%; +} + +.pages-settings.checked { + font-weight: bold; + color: white; +} + +.pages-settings-body > .close { + position: absolute; + outline: none; + border-color: rgb(99, 99, 99); + background-color: rgb(27, 27, 27); + border-radius: 100%; + display: block; + color: #fff; + width: 50px; + height: 50px; + font-size: 30px; + line-height: 50px; + top: -5px; + right: 9px; +} + +.pages-settings-body > button { + line-height: 20px; + outline: none; + border-color: rgb(99, 99, 99); + background-color: rgb(58, 3, 3); + margin-right: 10px; + margin-top: 15px; + margin-bottom: 15px; + margin-left: 10px; + border-radius: 7px; + color: #fff; + width: 34%; + height: 50px; + font-size: 10px; +} + +.pages-settings-body > .inputfield { + line-height: 40px; + outline: none; + margin-top: 45px; + border-radius: 7px; + color: #fff; + width: 34%; + height: 50px; + font-size: 18px; +} diff --git a/client/components/Channels.tsx b/client/components/Channels.tsx index c92ab844..7f36b903 100644 --- a/client/components/Channels.tsx +++ b/client/components/Channels.tsx @@ -17,7 +17,11 @@ import ChanStrip from './ChanStrip' import ChannelMonitorOptions from './ChannelMonitorOptions' import { IChannels } from '../../server/reducers/channelsReducer' import { IFader } from '../../server/reducers/fadersReducer' -import { ICustomPages, ISettings, PageType } from '../../server/reducers/settingsReducer' +import { + ICustomPages, + ISettings, + PageType, +} from '../../server/reducers/settingsReducer' import { SOCKET_NEXT_MIX, SOCKET_CLEAR_PST, @@ -184,7 +188,9 @@ class Channels extends React.Component { )) case PageType.CustomPage: - let pageIndex: number = this.props.customPages.map((item: ICustomPages) => item.id).indexOf(curPage.id || ''); + let pageIndex: number = this.props.customPages + .map((item: ICustomPages) => item.id) + .indexOf(curPage.id || '') return this.props.customPages[pageIndex].faders .filter((value) => { return ( @@ -194,10 +200,7 @@ class Channels extends React.Component { }) .map((faderIndex, index) => { return ( - + ) }) } @@ -281,7 +284,7 @@ class Channels extends React.Component { 'settings=0' ) ? null : ( )} + {window.location.search.includes( + 'settings=0' + ) ? null : ( + + )}
{this.renderAllManualButton()} @@ -313,14 +328,6 @@ class Channels extends React.Component { )}
-
{this.renderPageButtons()}