diff --git a/ui/v2.5/src/components/Scenes/SceneDetails/PrimaryTags.tsx b/ui/v2.5/src/components/Scenes/SceneDetails/PrimaryTags.tsx index 2eb5cb903b5..dfe940be812 100644 --- a/ui/v2.5/src/components/Scenes/SceneDetails/PrimaryTags.tsx +++ b/ui/v2.5/src/components/Scenes/SceneDetails/PrimaryTags.tsx @@ -54,7 +54,9 @@ export const PrimaryTags: React.FC = ({
{marker.end_seconds !== -1 - ? `${TextUtils.secondsToTimestamp(marker.seconds)}-${TextUtils.secondsToTimestamp(marker.end_seconds)}` + ? `${TextUtils.secondsToTimestamp( + marker.seconds + )}-${TextUtils.secondsToTimestamp(marker.end_seconds)}` : TextUtils.secondsToTimestamp(marker.seconds)}
{tags}
diff --git a/ui/v2.5/src/components/Scenes/SceneDetails/SceneMarkerForm.tsx b/ui/v2.5/src/components/Scenes/SceneDetails/SceneMarkerForm.tsx index 6bc0921b896..88f58a3b00a 100644 --- a/ui/v2.5/src/components/Scenes/SceneDetails/SceneMarkerForm.tsx +++ b/ui/v2.5/src/components/Scenes/SceneDetails/SceneMarkerForm.tsx @@ -44,13 +44,20 @@ export const SceneMarkerForm: React.FC = ({ const schema = yup.object({ title: yup.string().ensure(), seconds: yup.number().min(0).required(), - end_seconds: yup.number().min(-1).test( - 'is-greater-than-seconds', - 'End time must be greater than or equal to start time', - function (value) { - return value !== undefined && (value === -1 || value >= this.parent.seconds); - } - ).required(), + end_seconds: yup + .number() + .min(-1) + .test( + "is-greater-than-seconds", + "End time must be greater than or equal to start time", + function (value) { + return ( + value !== undefined && + (value === -1 || value >= this.parent.seconds) + ); + } + ) + .required(), primary_tag_id: yup.string().required(), tag_ids: yup.array(yup.string().required()).defined(), }); @@ -223,7 +230,10 @@ export const SceneMarkerForm: React.FC = ({ value={formik.values.end_seconds} setValue={(v) => formik.setFieldValue("end_seconds", v)} onReset={() => - formik.setFieldValue("end_seconds", Math.round(getPlayerPosition() ?? 0)) + formik.setFieldValue( + "end_seconds", + Math.round(getPlayerPosition() ?? 0) + ) } error={error} allowNegative={true} diff --git a/ui/v2.5/src/components/Wall/WallItem.tsx b/ui/v2.5/src/components/Wall/WallItem.tsx index a6aff61e56d..dd6bb9f67f7 100644 --- a/ui/v2.5/src/components/Wall/WallItem.tsx +++ b/ui/v2.5/src/components/Wall/WallItem.tsx @@ -183,9 +183,12 @@ export const WallItem = ({ case "sceneMarker": const sceneMarker = data as GQL.SceneMarkerDataFragment; const newTitle = markerTitle(sceneMarker); - const seconds = sceneMarker.end_seconds !== -1 - ? `${TextUtils.secondsToTimestamp(sceneMarker.seconds)}-${TextUtils.secondsToTimestamp(sceneMarker.end_seconds)}` - : TextUtils.secondsToTimestamp(sceneMarker.seconds); + const seconds = + sceneMarker.end_seconds !== -1 + ? `${TextUtils.secondsToTimestamp( + sceneMarker.seconds + )}-${TextUtils.secondsToTimestamp(sceneMarker.end_seconds)}` + : TextUtils.secondsToTimestamp(sceneMarker.seconds); if (newTitle) { return `${newTitle} - ${seconds}`; } else {