Files
upstream-jitsi-meet/react/features/jaas/components/web/PremiumFeatureDialog.tsx
upstream-mirror 1d2bfcac0c
Some checks failed
Prosody Plugin Tests / test (push) Failing after 10m11s
Close stale issues and PRs / stale (push) Failing after 1s
snapshot of https://github.com/jitsi/jitsi-meet.git @ fd1749dd28f4138aa80234fc7f311b19aaffa0e7 (2026-09-15)
2026-09-15 15:56:32 +05:00

57 lines
1.4 KiB
TypeScript

import React, { PureComponent } from 'react';
import { translate } from '../../../base/i18n/functions';
import Dialog from '../../../base/ui/components/web/Dialog';
import { openURLInBrowser } from '../../../base/util/openURLInBrowser.web';
import { JAAS_UPGRADE_URL } from '../../constants';
/**
* Component that renders the premium feature dialog.
*
* @returns {React$Element<any>}
*/
class PremiumFeatureDialog extends PureComponent<any> {
/**
* Instantiates a new component.
*
* @inheritdoc
*/
constructor(props: any) {
super(props);
this._onSubmitValue = this._onSubmitValue.bind(this);
}
/**
* Callback to be invoked when the dialog ok is pressed.
*
* @returns {boolean}
*/
_onSubmitValue() {
openURLInBrowser(JAAS_UPGRADE_URL, true);
}
/**
* Implements React's {@link Component#render()}.
*
* @inheritdoc
*/
override render() {
const { t } = this.props;
return (
<Dialog
cancel = {{ hidden: true }}
ok = {{ translationKey: 'dialog.viewUpgradeOptions' }}
onSubmit = { this._onSubmitValue }
titleKey = { t('dialog.viewUpgradeOptionsTitle') }>
<span>{t('dialog.viewUpgradeOptionsContent')}</span>
</Dialog>
);
}
}
export default translate(PremiumFeatureDialog);