snapshot of https://github.com/jitsi/jitsi-meet.git @ fd1749dd28f4138aa80234fc7f311b19aaffa0e7 (2026-09-15)
This commit is contained in:
34
react/features/recording/nudge.web.ts
Normal file
34
react/features/recording/nudge.web.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { IStore } from '../app/types';
|
||||
import { openDialog } from '../base/dialog/actions';
|
||||
import i18next from '../base/i18n/i18next';
|
||||
|
||||
import { INudge } from './actions.any';
|
||||
import RecordingTranscriptionDialog from './components/Recording/web/RecordingTranscriptionDialog';
|
||||
|
||||
/**
|
||||
* Returns the nudge notification payload for the given scenario.
|
||||
*
|
||||
* @param {string} scenario - Which service just started.
|
||||
* @param {Function} dispatch - The Redux dispatch function.
|
||||
* @returns {Object}
|
||||
*/
|
||||
export function getNudge(scenario: 'recording' | 'transcription', dispatch: IStore['dispatch']): INudge {
|
||||
if (scenario === 'recording') {
|
||||
return {
|
||||
descriptionText: `· ${i18next.t('recording.alsoTranscribe')}`,
|
||||
actionNameKey: 'dialog.startTranscribing',
|
||||
handler: () => dispatch(openDialog('RecordingTranscriptionDialog', RecordingTranscriptionDialog, {
|
||||
recordAudioAndVideo: false
|
||||
}))
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
descriptionText: `· ${i18next.t('transcribing.alsoRecord')}`,
|
||||
actionNameKey: 'dialog.startRecording',
|
||||
|
||||
// recordAudioAndVideo defaults to true, which already puts the focus on the recording
|
||||
// section, so nothing extra needs to be passed here.
|
||||
handler: () => dispatch(openDialog('RecordingTranscriptionDialog', RecordingTranscriptionDialog))
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user