From fa588ee147d491db709721b4fbe32dea4e4f4d9d Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Mon, 8 Sep 2025 20:40:05 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8(frontend)=20display=20recording=20?= =?UTF-8?q?duration=20limit=20in=20recording=20panel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add information to recording panel indicating maximum recording duration when time limits are configured to prevent user confusion and help with session planning. --- .../components/ScreenRecordingSidePanel.tsx | 17 +++++++++++++++-- .../components/TranscriptSidePanel.tsx | 17 +++++++++++++++-- src/frontend/src/locales/de/rooms.json | 10 ++++++---- src/frontend/src/locales/en/rooms.json | 10 ++++++---- src/frontend/src/locales/fr/rooms.json | 10 ++++++---- src/frontend/src/locales/nl/rooms.json | 10 ++++++---- 6 files changed, 54 insertions(+), 20 deletions(-) diff --git a/src/frontend/src/features/recording/components/ScreenRecordingSidePanel.tsx b/src/frontend/src/features/recording/components/ScreenRecordingSidePanel.tsx index 5e725847..60938779 100644 --- a/src/frontend/src/features/recording/components/ScreenRecordingSidePanel.tsx +++ b/src/frontend/src/features/recording/components/ScreenRecordingSidePanel.tsx @@ -23,6 +23,8 @@ import posthog from 'posthog-js' import { useSnapshot } from 'valtio/index' import { Spinner } from '@/primitives/Spinner' import { useConfig } from '@/api/useConfig' +import humanizeDuration from 'humanize-duration' +import i18n from 'i18next' export const ScreenRecordingSidePanel = () => { const { data } = useConfig() @@ -189,7 +191,7 @@ export const ScreenRecordingSidePanel = () => { { marginTop: '0.25rem', })} > - {t('start.body')}
{' '} + {t('start.body', { + duration_message: data?.recording?.max_duration + ? t('durationMessage', { + max_duration: humanizeDuration( + data?.recording?.max_duration, + { + language: i18n.language, + } + ), + }) + : '', + })}{' '} {data?.support?.help_article_recording && ( {t('start.linkMore')} diff --git a/src/frontend/src/features/recording/components/TranscriptSidePanel.tsx b/src/frontend/src/features/recording/components/TranscriptSidePanel.tsx index fe7de0f9..6d6e87b1 100644 --- a/src/frontend/src/features/recording/components/TranscriptSidePanel.tsx +++ b/src/frontend/src/features/recording/components/TranscriptSidePanel.tsx @@ -25,6 +25,8 @@ import posthog from 'posthog-js' import { useSnapshot } from 'valtio/index' import { Spinner } from '@/primitives/Spinner' import { useConfig } from '@/api/useConfig' +import humanizeDuration from 'humanize-duration' +import i18n from 'i18next' export const TranscriptSidePanel = () => { const { data } = useConfig() @@ -263,7 +265,7 @@ export const TranscriptSidePanel = () => { { marginTop: '0.25rem', })} > - {t('start.body')}
{' '} + {t('start.body', { + duration_message: data?.recording?.max_duration + ? t('durationMessage', { + max_duration: humanizeDuration( + data?.recording?.max_duration, + { + language: i18n.language, + } + ), + }) + : '', + })}{' '} {data?.support?.help_article_transcript && (