From c11047fc4e864d16c7f0f76c318898341e1b13ce Mon Sep 17 00:00:00 2001 From: Muaz Ahmad Date: Tue, 4 Jun 2024 14:57:50 +0500 Subject: [PATCH] Ran codemod upgrade tool --- web/components/admin/VideoLatency.tsx | 9 +++++---- web/components/admin/VideoVariantForm.tsx | 17 +++++++++++------ .../config/general/EditInstanceDetails.tsx | 2 +- .../FatalErrorStateModal.tsx | 2 +- web/pages/admin/config-federation.tsx | 2 +- web/styles/global.less | 2 +- 6 files changed, 20 insertions(+), 14 deletions(-) diff --git a/web/components/admin/VideoLatency.tsx b/web/components/admin/VideoLatency.tsx index 27a99ea89..e5a5a9637 100644 --- a/web/components/admin/VideoLatency.tsx +++ b/web/components/admin/VideoLatency.tsx @@ -95,7 +95,7 @@ export const VideoLatency: FC = () => { }; return ( -
+ (
Latency Buffer @@ -115,20 +115,21 @@ export const VideoLatency: FC = () => { Read to learn more.

-
SLIDER_COMMENTS[value]} onChange={handleChange} min={0} max={4} marks={SLIDER_MARKS} defaultValue={selectedOption} value={selectedOption} + tooltip={{ + formatter: value => SLIDER_COMMENTS[value] + }} />

{SLIDER_COMMENTS[selectedOption]}

-
+
) ); }; diff --git a/web/components/admin/VideoVariantForm.tsx b/web/components/admin/VideoVariantForm.tsx index 4a9fcfbc2..63aa4139c 100644 --- a/web/components/admin/VideoVariantForm.tsx +++ b/web/components/admin/VideoVariantForm.tsx @@ -113,7 +113,7 @@ export const VideoVariantForm: FC = ({ 'video-passthrough-enabled': videoPassthroughEnabled, }); return ( -
+ (
= ({ below video encoding settings.

)} - = ({

ENCODER_PRESET_TOOLTIPS[value]} onChange={handleVideoCpuUsageLevelChange} min={0} max={Object.keys(ENCODER_PRESET_SLIDER_MARKS).length - 1} @@ -165,6 +163,9 @@ export const VideoVariantForm: FC = ({ defaultValue={dataState.cpuUsageLevel} value={dataState.cpuUsageLevel} disabled={dataState.videoPassthrough} + tooltip={{ + formatter: value => ENCODER_PRESET_TOOLTIPS[value] + }} />

{cpuUsageNote()}

@@ -193,7 +194,6 @@ export const VideoVariantForm: FC = ({

{VIDEO_BITRATE_DEFAULTS.tip}

`${value} ${VIDEO_BITRATE_DEFAULTS.unit}`} disabled={dataState.videoPassthrough} defaultValue={dataState.videoBitrate} value={dataState.videoBitrate} @@ -202,6 +202,9 @@ export const VideoVariantForm: FC = ({ min={VIDEO_BITRATE_DEFAULTS.min} max={VIDEO_BITRATE_DEFAULTS.max} marks={VIDEO_BITRATE_SLIDER_MARKS} + tooltip={{ + formatter: value => `${value} ${VIDEO_BITRATE_DEFAULTS.unit}` + }} />

{selectedVideoBRnote()}

@@ -315,7 +318,6 @@ export const VideoVariantForm: FC = ({

{FRAMERATE_DEFAULTS.tip}

`${value} ${FRAMERATE_DEFAULTS.unit}`} defaultValue={dataState.framerate} value={dataState.framerate} onChange={handleFramerateChange} @@ -324,6 +326,9 @@ export const VideoVariantForm: FC = ({ max={FRAMERATE_DEFAULTS.max} marks={FRAMERATE_SLIDER_MARKS} disabled={dataState.videoPassthrough} + tooltip={{ + formatter: value => `${value} ${FRAMERATE_DEFAULTS.unit}` + }} />

{selectedFramerateNote()}

@@ -339,6 +344,6 @@ export const VideoVariantForm: FC = ({
-
+
) ); }; diff --git a/web/components/admin/config/general/EditInstanceDetails.tsx b/web/components/admin/config/general/EditInstanceDetails.tsx index 642846d38..ceaed34d4 100644 --- a/web/components/admin/config/general/EditInstanceDetails.tsx +++ b/web/components/admin/config/general/EditInstanceDetails.tsx @@ -40,7 +40,7 @@ const DirectoryInfoModal: FC = ({ cancelPressed, okPres diff --git a/web/components/modals/FatalErrorStateModal/FatalErrorStateModal.tsx b/web/components/modals/FatalErrorStateModal/FatalErrorStateModal.tsx index f396e8178..f116a5334 100644 --- a/web/components/modals/FatalErrorStateModal/FatalErrorStateModal.tsx +++ b/web/components/modals/FatalErrorStateModal/FatalErrorStateModal.tsx @@ -9,7 +9,7 @@ export type FatalErrorStateModalProps = { export const FatalErrorStateModal: FC = ({ title, message }) => ( = ({ cancelPressed, okPr diff --git a/web/styles/global.less b/web/styles/global.less index 1f50602e0..3eceee8c6 100644 --- a/web/styles/global.less +++ b/web/styles/global.less @@ -1,2 +1,2 @@ -@import '~antd/dist/antd.less'; // Introduce the official dark less style entry file +/* @import '~antd/dist/antd.less';*/ // Introduce the official dark less style entry file @import './theme.less'; // Import ant design theme definition