init
Some checks failed
Close stale issues and PRs / stale (push) Has been cancelled

This commit is contained in:
2025-09-02 14:49:16 +08:00
commit 38ba663466
2885 changed files with 391107 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { I18nextProvider } from 'react-i18next';
import { isMobileBrowser } from '../../../base/environment/utils';
import i18next from '../../../base/i18n/i18next';
import { parseURLParams } from '../../../base/util/parseURLParams';
import { DIAL_IN_INFO_PAGE_PATH_NAME } from '../../constants';
import DialInSummary from '../dial-in-summary/web/DialInSummary';
import NoRoomError from './NoRoomError.web';
/**
* TODO: This seems unused, so we can drop it.
*/
document.addEventListener('DOMContentLoaded', () => {
// @ts-ignore
const { room } = parseURLParams(window.location, true, 'search');
const { href } = window.location;
const ix = href.indexOf(DIAL_IN_INFO_PAGE_PATH_NAME);
const url = (ix > 0 ? href.substring(0, ix) : href) + room;
/* eslint-disable-next-line react/no-deprecated */
ReactDOM.render(
<I18nextProvider i18n = { i18next }>
{ room
? <DialInSummary
className = 'dial-in-page'
clickableNumbers = { isMobileBrowser() }
room = { decodeURIComponent(room) }
url = { url } />
: <NoRoomError className = 'dial-in-page' /> }
</I18nextProvider>,
document.getElementById('react')
);
});
window.addEventListener('beforeunload', () => {
/* eslint-disable-next-line react/no-deprecated */
ReactDOM.unmountComponentAtNode(document.getElementById('react')!);
});

View File

@@ -0,0 +1,26 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
/**
* The type of the React {@code Component} props of {@link NoRoomError}.
*/
interface IProps {
/**
* Additional CSS classnames to append to the root of the component.
*/
className: string;
}
const NoRoomError = ({ className }: IProps) => {
const { t } = useTranslation();
return (
<div className = { className } >
<div>{t('info.noNumbers')}</div>
<div>{t('info.noRoom')}</div>
</div>
);
};
export default NoRoomError;