import { useEffect } from 'react'; import { createPortal } from 'react-dom'; import { APP_DISPLAY_NAME_EN, APP_DISPLAY_NAME_RU } from '../../../shared/appBranding'; import { Button } from '../../shared/ui/controls'; import styles from '../EditorApp.module.css'; import { useEditorI18n } from '../i18n/EditorI18nContext'; const ABOUT_SPONSORS = [ { kind: 'text', name: 'Тифлинг бард 😈❤️' }, { kind: 'link', name: 'Клуб настольных и бизнес-игр "КвестИя" - Подчуфарова Евгения Александровна', url: 'https://vk.ru/club210361604', }, { kind: 'link', name: 'Старые кости', url: 'https://boosty.to/tabletoppodcasts' }, { kind: 'text', name: 'Майер С.В. (Клуб «Серый Май»)' }, { kind: 'link', name: 'true_rus(КАВ)', url: 'https://truecorp.su/' }, { kind: 'text', name: 'Макс LonelyFlame Чурсин' }, ] as const; type AppAboutModalProps = { open: boolean; onClose: () => void; appVersion: string | null; }; export function AppAboutModal({ open, onClose, appVersion }: AppAboutModalProps) { const { t, locale } = useEditorI18n(); const appName = locale === 'ru' ? APP_DISPLAY_NAME_RU : APP_DISPLAY_NAME_EN; useEffect(() => { if (!open) return; const onKey = (e: KeyboardEvent) => { if (e.key === 'Escape') onClose(); }; window.addEventListener('keydown', onKey); return () => window.removeEventListener('keydown', onKey); }, [onClose, open]); if (!open) return null; return createPortal( <>
{t('app.about.description')}