From 068c72662db3a1dbfa2e3410bbf8cb484cbb686e Mon Sep 17 00:00:00 2001
From: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
Date: Sat, 25 Feb 2023 17:27:47 +0100
Subject: [PATCH] style: alpha4 style tweaks (#299)
---
.../components/input/text-input/TextInput.tsx | 24 ++++++-------
.../playback/PlaybackControl.module.scss | 5 +--
.../control/playback/PlaybackTimer.tsx | 11 ++++--
.../src/features/editors/Editor.module.scss | 5 +++
.../event-editor/EventEditor.module.scss | 4 +++
.../src/features/event-editor/EventEditor.tsx | 5 ++-
.../client/src/features/info/Info.module.scss | 1 +
apps/client/src/features/info/InfoNif.tsx | 12 ++-----
.../event-block/EventBlock.module.scss | 2 +-
.../features/viewers/backstage/Backstage.tsx | 4 +--
.../src/features/viewers/public/Public.scss | 1 +
.../src/features/viewers/public/Public.tsx | 2 +-
.../src/features/viewers/timer/Timer.scss | 2 +-
.../src/features/viewers/timer/Timer.tsx | 34 +++++--------------
apps/client/src/theme/_ontimeColours.scss | 2 ++
15 files changed, 55 insertions(+), 59 deletions(-)
diff --git a/apps/client/src/common/components/input/text-input/TextInput.tsx b/apps/client/src/common/components/input/text-input/TextInput.tsx
index 5533c1b40..7fa6c3c1f 100644
--- a/apps/client/src/common/components/input/text-input/TextInput.tsx
+++ b/apps/client/src/common/components/input/text-input/TextInput.tsx
@@ -6,7 +6,7 @@ import { Size } from '../../../models/Util.type';
import useReactiveTextInput from './useReactiveTextInput';
-interface TextInputProps {
+interface BaseProps {
isTextArea?: boolean;
isFullHeight?: boolean;
size?: Size;
@@ -15,13 +15,18 @@ interface TextInputProps {
submitHandler: (field: EventEditorSubmitActions, newValue: string) => void;
}
+interface TextAreaProps {
+ isTextArea: true;
+ resize?: 'horizontal' | 'vertical' | 'none';
+}
+
+type TextInputProps = BaseProps & TextAreaProps;
+
export default function TextInput(props: TextInputProps) {
- const { isTextArea, isFullHeight, size = 'sm', field, initialText = '', submitHandler } = props;
+ const { isTextArea, isFullHeight, size = 'sm', field, initialText = '', submitHandler, resize = 'none' } = props;
const inputRef = useRef(null);
- const submitCallback = useCallback((newValue: string) =>
- submitHandler(field, newValue)
- ,[field, submitHandler]);
+ const submitCallback = useCallback((newValue: string) => submitHandler(field, newValue), [field, submitHandler]);
const textInputProps = useReactiveTextInput(initialText, submitCallback, { submitOnEnter: true });
const textAreaProps = useReactiveTextInput(initialText, submitCallback);
@@ -30,18 +35,13 @@ export default function TextInput(props: TextInputProps) {
) : (
-
+
);
}
diff --git a/apps/client/src/features/control/playback/PlaybackControl.module.scss b/apps/client/src/features/control/playback/PlaybackControl.module.scss
index a3e132f98..853663f90 100644
--- a/apps/client/src/features/control/playback/PlaybackControl.module.scss
+++ b/apps/client/src/features/control/playback/PlaybackControl.module.scss
@@ -38,12 +38,13 @@
.indRoll,
.indDelay,
.indNegative {
- background-color: $gray-1300;
+ background-color: $gray-1350;
}
.indRoll,
.indRollActive,
-.indDelay {
+.indDelay,
+.indDelayActive {
margin: 0 auto;
border-radius: 6px;
width: 12px;
diff --git a/apps/client/src/features/control/playback/PlaybackTimer.tsx b/apps/client/src/features/control/playback/PlaybackTimer.tsx
index 98276ddd2..c76ab82e0 100644
--- a/apps/client/src/features/control/playback/PlaybackTimer.tsx
+++ b/apps/client/src/features/control/playback/PlaybackTimer.tsx
@@ -3,6 +3,7 @@ import { Playback } from 'ontime-types';
import TimerDisplay from '../../../common/components/timer-display/TimerDisplay';
import { setPlayback, useTimer } from '../../../common/hooks/useSocket';
+import { millisToMinutes } from '../../../common/utils/dateConfig';
import { stringFromMillis } from '../../../common/utils/time';
import { tooltipDelayMid } from '../../../ontimeConfig';
@@ -26,15 +27,21 @@ export default function PlaybackTimer(props: PlaybackTimerProps) {
const isWaiting = timerData.secondaryTimer !== null && timerData.secondaryTimer > 0 && timerData.current === null;
const disableButtons = selectedId === null || isRolling;
const isOvertime = timerData.current !== null && timerData.current < 0;
+ const hasAddedTime = Boolean(timerData.addedTime);
+
+ const rollLabel = isRolling ? 'Roll mode active' : '';
+ const addedTimeLabel = hasAddedTime ? `Added ${millisToMinutes(timerData.addedTime)} minutes` : '';
return (
diff --git a/apps/client/src/features/editors/Editor.module.scss b/apps/client/src/features/editors/Editor.module.scss
index 3a7995b44..b9c629b76 100644
--- a/apps/client/src/features/editors/Editor.module.scss
+++ b/apps/client/src/features/editors/Editor.module.scss
@@ -11,6 +11,11 @@ $playback-width: 450px;
right: $distance;
cursor: pointer;
color: $ui-white;
+ transition-property: color;
+ transition-duration: $transition-time-action;
+ &:hover {
+ color: $ontime-color;
+ }
}
.corner {
diff --git a/apps/client/src/features/event-editor/EventEditor.module.scss b/apps/client/src/features/event-editor/EventEditor.module.scss
index ca5d3a6f8..5bacb686d 100644
--- a/apps/client/src/features/event-editor/EventEditor.module.scss
+++ b/apps/client/src/features/event-editor/EventEditor.module.scss
@@ -21,6 +21,10 @@
.eventInfo {
grid-area: eventInfo;
+ .eventId {
+ margin-left: $element-inner-spacing;
+ user-select: text;
+ }
}
.eventActions {
diff --git a/apps/client/src/features/event-editor/EventEditor.tsx b/apps/client/src/features/event-editor/EventEditor.tsx
index b97b81fb5..50a336ed3 100644
--- a/apps/client/src/features/event-editor/EventEditor.tsx
+++ b/apps/client/src/features/event-editor/EventEditor.tsx
@@ -119,7 +119,10 @@ export default function EventEditor() {
return (
-
{`Event ID ${event.id}`}
+
+ Event ID
+ {event.id}
+
{`/ontime/gotoid/${event.id}`}
diff --git a/apps/client/src/features/info/Info.module.scss b/apps/client/src/features/info/Info.module.scss
index 85f8414b5..fb49ac282 100644
--- a/apps/client/src/features/info/Info.module.scss
+++ b/apps/client/src/features/info/Info.module.scss
@@ -38,6 +38,7 @@
.interface {
@include action-link;
+ font-size: $inner-section-text-size;
white-space: nowrap;
}
diff --git a/apps/client/src/features/info/InfoNif.tsx b/apps/client/src/features/info/InfoNif.tsx
index f15550387..907c5c04c 100644
--- a/apps/client/src/features/info/InfoNif.tsx
+++ b/apps/client/src/features/info/InfoNif.tsx
@@ -18,19 +18,11 @@ export default function InfoNif() {
return (
-
setCollapsed((prev) => !prev)}
- />
+ setCollapsed((prev) => !prev)} />
{!collapsed && (
{data?.networkInterfaces.map((nif) => (
- handleClick(nif.address)}
- className={style.interface}
- >
+ handleClick(nif.address)} className={style.interface}>
{`${nif.name} - ${nif.address}`}
diff --git a/apps/client/src/features/rundown/event-block/EventBlock.module.scss b/apps/client/src/features/rundown/event-block/EventBlock.module.scss
index eddce5020..76b5e5d6d 100644
--- a/apps/client/src/features/rundown/event-block/EventBlock.module.scss
+++ b/apps/client/src/features/rundown/event-block/EventBlock.module.scss
@@ -163,6 +163,6 @@
}
.statusIcon.active {
- color: $active-indicator;
+ color: $ui-white;
}
}
diff --git a/apps/client/src/features/viewers/backstage/Backstage.tsx b/apps/client/src/features/viewers/backstage/Backstage.tsx
index f48897e12..50bd1b6e0 100644
--- a/apps/client/src/features/viewers/backstage/Backstage.tsx
+++ b/apps/client/src/features/viewers/backstage/Backstage.tsx
@@ -152,9 +152,7 @@ export default function Backstage(props) {
-
- {general.backstageUrl && }
-
+ {general.backstageUrl &&
}
{general.backstageInfo &&
{general.backstageInfo}
}
diff --git a/apps/client/src/features/viewers/public/Public.scss b/apps/client/src/features/viewers/public/Public.scss
index 7e8ea55fb..469b30b4f 100644
--- a/apps/client/src/features/viewers/public/Public.scss
+++ b/apps/client/src/features/viewers/public/Public.scss
@@ -99,6 +99,7 @@
grid-area: info;
display: flex;
gap: max(1vw, 16px);
+ min-height: max(calc(100vh / 15), 128px);
&__message {
font-size: clamp(16px, 1.5vw, 24px);
diff --git a/apps/client/src/features/viewers/public/Public.tsx b/apps/client/src/features/viewers/public/Public.tsx
index 7616a0807..02d44b0a5 100644
--- a/apps/client/src/features/viewers/public/Public.tsx
+++ b/apps/client/src/features/viewers/public/Public.tsx
@@ -116,7 +116,7 @@ export default function Public(props) {
-
{general.publicUrl && }
+ {general.publicUrl &&
}
{general.publicInfo &&
{general.publicInfo}
}
diff --git a/apps/client/src/features/viewers/timer/Timer.scss b/apps/client/src/features/viewers/timer/Timer.scss
index 7bcc7cf1f..6a12c2ab7 100644
--- a/apps/client/src/features/viewers/timer/Timer.scss
+++ b/apps/client/src/features/viewers/timer/Timer.scss
@@ -75,7 +75,7 @@
.end-message {
text-align: center;
- font-size: 12vw;
+ font-size: 11.5vw;
line-height: 0.9em;
font-weight: 600;
color: $timer-finished-color;
diff --git a/apps/client/src/features/viewers/timer/Timer.tsx b/apps/client/src/features/viewers/timer/Timer.tsx
index 949742264..9e3758a75 100644
--- a/apps/client/src/features/viewers/timer/Timer.tsx
+++ b/apps/client/src/features/viewers/timer/Timer.tsx
@@ -65,14 +65,10 @@ export default function Timer(props) {
const showProgress = time.playback !== 'stop';
const baseClasses = `stage-timer ${isMirrored ? 'mirror' : ''}`;
- return (
-
+ return (
+
-
+
@@ -84,31 +80,22 @@ export default function Timer(props) {
{time.finished ? (
- {!general.endMessage ? (
-
- ) : (
- general.endMessage
- )}
+ {!general.endMessage ? : general.endMessage}
) : (
-
+
)}
- {title.showNow && (
+ {title.showNow && !time.finished && (
-
+
)}
diff --git a/apps/client/src/theme/_ontimeColours.scss b/apps/client/src/theme/_ontimeColours.scss
index fe17cc33b..d6a7f26ce 100644
--- a/apps/client/src/theme/_ontimeColours.scss
+++ b/apps/client/src/theme/_ontimeColours.scss
@@ -7,6 +7,8 @@ $white-9: rgba(255, 255, 255, 0.09);
$white-10: rgba(255, 255, 255, 0.10);
$white-13: rgba(255, 255, 255, 0.13);
+$black-10: rgba(0, 0, 0, 0.10);
+
$gray-50: #f6f6f6;
$gray-100: #ececec;
$gray-200: #e2e2e2;