您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

PremiumFeatureDialog.tsx 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import React, { PureComponent } from 'react';
  2. import { translate } from '../../../base/i18n/functions';
  3. import Dialog from '../../../base/ui/components/web/Dialog';
  4. import { openURLInBrowser } from '../../../base/util/openURLInBrowser.web';
  5. import { JAAS_UPGRADE_URL } from '../../constants';
  6. /**
  7. * Component that renders the premium feature dialog.
  8. *
  9. * @returns {React$Element<any>}
  10. */
  11. class PremiumFeatureDialog extends PureComponent<any> {
  12. /**
  13. * Instantiates a new component.
  14. *
  15. * @inheritdoc
  16. */
  17. constructor(props: any) {
  18. super(props);
  19. this._onSubmitValue = this._onSubmitValue.bind(this);
  20. }
  21. /**
  22. * Callback to be invoked when the dialog ok is pressed.
  23. *
  24. * @returns {boolean}
  25. */
  26. _onSubmitValue() {
  27. openURLInBrowser(JAAS_UPGRADE_URL, true);
  28. }
  29. /**
  30. * Implements React's {@link Component#render()}.
  31. *
  32. * @inheritdoc
  33. */
  34. render() {
  35. const { t } = this.props;
  36. return (
  37. <Dialog
  38. cancel = {{ hidden: true }}
  39. ok = {{ translationKey: 'dialog.viewUpgradeOptions' }}
  40. onSubmit = { this._onSubmitValue }
  41. titleKey = { t('dialog.viewUpgradeOptionsTitle') }>
  42. <span>{t('dialog.viewUpgradeOptionsContent')}</span>
  43. </Dialog>
  44. );
  45. }
  46. }
  47. export default translate(PremiumFeatureDialog);