From c8f9ac2e6cdd707287ae56ef37e07303b8d31728 Mon Sep 17 00:00:00 2001 From: sylenien Date: Tue, 16 Aug 2022 15:56:09 +0200 Subject: [PATCH] fix(ui): small fixes for play position tracker, wording etc --- .../components/DashboardWidgetGrid/AddMetric.tsx | 2 +- .../app/components/Session_/Player/Controls/Controls.js | 2 +- .../Session_/Player/Controls/DraggableCircle.tsx | 4 ++-- .../app/components/Session_/Player/Controls/Timeline.js | 8 ++++---- .../Player/Controls/components/PlayerControls.tsx | 3 ++- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/frontend/app/components/Dashboard/components/DashboardWidgetGrid/AddMetric.tsx b/frontend/app/components/Dashboard/components/DashboardWidgetGrid/AddMetric.tsx index 481ce70c2..672ccd846 100644 --- a/frontend/app/components/Dashboard/components/DashboardWidgetGrid/AddMetric.tsx +++ b/frontend/app/components/Dashboard/components/DashboardWidgetGrid/AddMetric.tsx @@ -52,7 +52,7 @@ function AddMetric({ metrics, history, siteId, title, description }: IProps) { diff --git a/frontend/app/components/Session_/Player/Controls/Controls.js b/frontend/app/components/Session_/Player/Controls/Controls.js index 3409569e0..085563717 100644 --- a/frontend/app/components/Session_/Player/Controls/Controls.js +++ b/frontend/app/components/Session_/Player/Controls/Controls.js @@ -304,7 +304,7 @@ export default class Controls extends React.Component { return (
{!live || liveTimeTravel ? ( - + ) : null} {!fullscreen && (
diff --git a/frontend/app/components/Session_/Player/Controls/DraggableCircle.tsx b/frontend/app/components/Session_/Player/Controls/DraggableCircle.tsx index 0e1ee85a7..fb51318c0 100644 --- a/frontend/app/components/Session_/Player/Controls/DraggableCircle.tsx +++ b/frontend/app/components/Session_/Player/Controls/DraggableCircle.tsx @@ -37,7 +37,7 @@ interface Props { } const DraggableCircle: FC = memo(function DraggableCircle(props) { - const { left, top } = props + const { left, top, live } = props const [{ isDragging, item }, dragRef, preview] = useDrag( () => ({ type: ItemTypes.BOX, @@ -61,7 +61,7 @@ const DraggableCircle: FC = memo(function DraggableCircle(props) { style={getStyles(left, isDragging)} role="DraggableBox" > - 99} /> + 99 && live} />
); }) diff --git a/frontend/app/components/Session_/Player/Controls/Timeline.js b/frontend/app/components/Session_/Player/Controls/Timeline.js index 5ae8d67d2..f34640d30 100644 --- a/frontend/app/components/Session_/Player/Controls/Timeline.js +++ b/frontend/app/components/Session_/Player/Controls/Timeline.js @@ -18,7 +18,7 @@ const BOUNDRY = 0; function getTimelinePosition(value, scale) { const pos = value * scale; - return pos > 100 ? 100 : pos; + return pos > 100 ? 99 : pos; } const getPointerIcon = (type) => { @@ -186,7 +186,7 @@ export default class Timeline extends React.PureComponent { const scale = 100 / endTime; return ( -
+
{/* custo color is live */} - + - + {skip && skipIntervals.map((interval) => ( diff --git a/frontend/app/components/Session_/Player/Controls/components/PlayerControls.tsx b/frontend/app/components/Session_/Player/Controls/components/PlayerControls.tsx index 4a8276482..e793702d8 100644 --- a/frontend/app/components/Session_/Player/Controls/components/PlayerControls.tsx +++ b/frontend/app/components/Session_/Player/Controls/components/PlayerControls.tsx @@ -115,7 +115,8 @@ function PlayerControls(props: Props) { onClick={() => setSkipInterval(parseInt(interval, 10))} className="py-2 px-4 cursor-pointer hover:bg-active-blue border-t w-full text-left border-borderColor-gray-light-shade font-semibold" > - {interval} (Secs) + {interval} + s
))}