Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

functions.web.ts 1.0KB

123456789101112131415161718192021222324252627282930313233
  1. import { parseURIString, safeDecodeURIComponent } from '../base/util/uri';
  2. /**
  3. * Transforms the history list to a displayable list.
  4. *
  5. * @private
  6. * @param {Array<Object>} recentList - The recent list form the redux store.
  7. * @returns {Array<Object>}
  8. */
  9. export function toDisplayableList(recentList: Array<{ conference: string; date: Date; duration: number; }>) {
  10. return (
  11. [ ...recentList ].reverse()
  12. .map(item => {
  13. return {
  14. date: item.date,
  15. duration: item.duration,
  16. time: [ item.date ],
  17. title: safeDecodeURIComponent(parseURIString(item.conference).room),
  18. url: item.conference
  19. };
  20. }));
  21. }
  22. /**
  23. * Returns <tt>true</tt> if recent list is enabled and <tt>false</tt> otherwise.
  24. *
  25. * @returns {boolean} <tt>true</tt> if recent list is enabled and <tt>false</tt>
  26. * otherwise.
  27. */
  28. export function isRecentListEnabled() {
  29. return interfaceConfig.RECENT_LIST_ENABLED;
  30. }