// Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; import type { LocalizerType } from '../types/Util'; import { Theme } from '../util/theme'; import { Modal } from './Modal'; import { Button, ButtonVariant } from './Button'; type PropsType = { i18n: LocalizerType; openSystemPreferencesAction: () => unknown; toggleScreenRecordingPermissionsDialog: () => unknown; }; function focusRef(el: HTMLElement | null) { if (el) { el.focus(); } } export function NeedsScreenRecordingPermissionsModal({ i18n, openSystemPreferencesAction, toggleScreenRecordingPermissionsDialog, }: PropsType): JSX.Element { const footer = ( <> {i18n('calling__presenting--permission-cancel')} { openSystemPreferencesAction(); toggleScreenRecordingPermissionsDialog(); }} variant={ButtonVariant.Primary} > {i18n('calling__presenting--permission-open')} > ); return ( {i18n('calling__presenting--macos-permission-description')} {i18n('calling__presenting--permission-instruction-step1')} {i18n('calling__presenting--permission-instruction-step2')} {i18n('calling__presenting--permission-instruction-step3')} ); }
{i18n('calling__presenting--macos-permission-description')}