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

getUnsafeRoomText.web.ts 726B

1234567891011121314151617181920
  1. import { translateToHTML } from '../i18n/functions';
  2. import { SECURITY_URL } from './contants';
  3. /**
  4. * Gets the unsafe room text for the given context.
  5. *
  6. * @param {Function} t - The translation function.
  7. * @param {'meeting'|'prejoin'|'welcome'} context - The given context of the warning.
  8. * @returns {string}
  9. */
  10. export default function getUnsafeRoomText(t: Function, context: 'meeting' | 'prejoin' | 'welcome') {
  11. const securityUrl = APP.store.getState()['features/base/config'].legalUrls?.security ?? SECURITY_URL;
  12. const options = {
  13. recommendAction: t(`security.unsafeRoomActions.${context}`),
  14. securityUrl
  15. };
  16. return translateToHTML(t, 'security.insecureRoomNameWarningWeb', options);
  17. }