From f7342825a4e89a42fa679c97bf845332cde04484 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Fri, 26 Aug 2022 12:29:53 +0200 Subject: [PATCH] change(ui) - plaer controls spacing and alignment --- .../Session_/Player/Controls/ControlButton.js | 52 +++++++++++-------- .../Session_/Player/Controls/Controls.js | 33 ++---------- .../Controls/components/PlayerControls.tsx | 10 ++-- .../Player/Controls/controlButton.module.css | 3 +- .../Player/Controls/controls.module.css | 12 +++-- .../components/Session_/Storage/Storage.js | 1 + 6 files changed, 51 insertions(+), 60 deletions(-) diff --git a/frontend/app/components/Session_/Player/Controls/ControlButton.js b/frontend/app/components/Session_/Player/Controls/ControlButton.js index d438de32e..31672c301 100644 --- a/frontend/app/components/Session_/Player/Controls/ControlButton.js +++ b/frontend/app/components/Session_/Player/Controls/ControlButton.js @@ -3,32 +3,42 @@ import cn from 'classnames'; import { Icon } from 'UI'; import stl from './controlButton.module.css'; -const ControlButton = ({ - label, - icon = '', - disabled=false, - onClick, - count = 0, - hasErrors=false, - active=false, - size = 20, - noLabel, +const ControlButton = ({ + label, + icon = '', + disabled = false, + onClick, + count = 0, + hasErrors = false, + active = false, + size = 20, + noLabel, labelClassName, containerClassName, noIcon, - }) => ( - ); diff --git a/frontend/app/components/Session_/Player/Controls/Controls.js b/frontend/app/components/Session_/Player/Controls/Controls.js index ead10433c..0601e092f 100644 --- a/frontend/app/components/Session_/Player/Controls/Controls.js +++ b/frontend/app/components/Session_/Player/Controls/Controls.js @@ -266,7 +266,7 @@ export default class Controls extends React.Component { controlIcon = (icon, size, action, isBackwards, additionalClasses) => (
@@ -352,8 +352,7 @@ export default class Controls extends React.Component { setSkipInterval={changeSkipInterval} currentInterval={skipInterval} /> - {/* */} -
+
toggleBottomTools(OVERVIEW)} @@ -381,30 +380,6 @@ export default class Controls extends React.Component {
- {/* { !live &&
} */} - {/* ! TEMP DISABLED ! - {!live && ( - toggleBottomTools(INSPECTOR) } - noIcon - labelClassName="!text-base font-semibold" - label="INSPECT" - containerClassName="mx-2" - /> - )} */} - {/* toggleBottomTools(OVERVIEW) } - active={ bottomBlock === OVERVIEW && !inspectorMode} - label="OVERVIEW" - noIcon - labelClassName="!text-base font-semibold" - // count={ logCount } - // hasErrors={ logRedCount > 0 } - containerClassName="mx-2" - /> */} toggleBottomTools(CONSOLE)} @@ -514,12 +489,12 @@ export default class Controls extends React.Component { containerClassName="mx-2" /> )} - {!live &&
} + {/* {!live &&
} */} {!live && ( {this.controlIcon( 'arrows-angle-extend', - 18, + 16, this.props.fullscreenOn, false, 'rounded hover:bg-gray-light-shade color-gray-medium' diff --git a/frontend/app/components/Session_/Player/Controls/components/PlayerControls.tsx b/frontend/app/components/Session_/Player/Controls/components/PlayerControls.tsx index a1d3dd87c..6ad43c2b5 100644 --- a/frontend/app/components/Session_/Player/Controls/components/PlayerControls.tsx +++ b/frontend/app/components/Session_/Player/Controls/components/PlayerControls.tsx @@ -112,7 +112,9 @@ function PlayerControls(props: Props) { className="cursor-pointer select-none" distance={20} html={ - showTooltip ? toggleTooltip() : null}> + (showTooltip ? toggleTooltip() : null)} + >
Jump (Secs) @@ -162,7 +164,8 @@ function PlayerControls(props: Props) {
{!live && ( -
+
+
{/* @ts-ignore */}
- +