2021-09-10 21:16:44 +08:00
|
|
|
import React from 'react';
|
2018-01-08 12:44:42 +08:00
|
|
|
import { withTracker } from 'meteor/react-meteor-data';
|
2017-03-29 02:41:48 +08:00
|
|
|
import SettingsService from '/imports/ui/services/settings';
|
2018-01-08 12:44:42 +08:00
|
|
|
import Settings from './component';
|
2021-09-11 04:48:52 +08:00
|
|
|
import { layoutDispatch } from '../layout/context';
|
2022-03-16 00:58:15 +08:00
|
|
|
import { isScreenSharingEnabled } from '/imports/ui/services/features';
|
2023-08-11 21:14:16 +08:00
|
|
|
import UserReactionService from '/imports/ui/components/user-reaction/service';
|
2023-11-30 23:10:36 +08:00
|
|
|
import SpeechService from '/imports/ui/components/audio/captions/speech/service';
|
2017-03-29 02:41:48 +08:00
|
|
|
|
2017-02-25 04:19:53 +08:00
|
|
|
import {
|
2018-01-08 12:44:42 +08:00
|
|
|
getUserRoles,
|
2022-02-26 01:56:03 +08:00
|
|
|
isPresenter,
|
2021-05-30 23:09:33 +08:00
|
|
|
showGuestNotification,
|
2018-01-08 12:44:42 +08:00
|
|
|
updateSettings,
|
|
|
|
getAvailableLocales,
|
|
|
|
} from './service';
|
2016-12-21 02:06:01 +08:00
|
|
|
|
2021-08-09 22:24:02 +08:00
|
|
|
const SettingsContainer = (props) => {
|
2021-09-11 04:48:52 +08:00
|
|
|
const layoutContextDispatch = layoutDispatch();
|
2021-06-19 02:32:46 +08:00
|
|
|
|
2021-08-09 22:24:02 +08:00
|
|
|
return <Settings {...props} layoutContextDispatch={layoutContextDispatch} />;
|
2021-06-19 02:32:46 +08:00
|
|
|
};
|
2016-12-23 09:48:19 +08:00
|
|
|
|
2021-10-19 04:52:59 +08:00
|
|
|
export default withTracker((props) => ({
|
|
|
|
...props,
|
2017-06-03 03:25:02 +08:00
|
|
|
audio: SettingsService.audio,
|
2018-02-06 21:33:48 +08:00
|
|
|
dataSaving: SettingsService.dataSaving,
|
2017-06-03 03:25:02 +08:00
|
|
|
application: SettingsService.application,
|
2023-11-30 23:10:36 +08:00
|
|
|
transcription: SettingsService.transcription,
|
2017-06-03 03:25:02 +08:00
|
|
|
updateSettings,
|
|
|
|
availableLocales: getAvailableLocales(),
|
2022-02-26 01:56:03 +08:00
|
|
|
isPresenter: isPresenter(),
|
2017-06-03 03:25:02 +08:00
|
|
|
isModerator: getUserRoles() === 'MODERATOR',
|
2021-05-30 23:09:33 +08:00
|
|
|
showGuestNotification: showGuestNotification(),
|
2021-05-01 03:06:28 +08:00
|
|
|
showToggleLabel: false,
|
2022-03-16 00:58:15 +08:00
|
|
|
isScreenSharingEnabled: isScreenSharingEnabled(),
|
|
|
|
isVideoEnabled: Meteor.settings.public.kurento.enableVideo,
|
2023-08-11 21:14:16 +08:00
|
|
|
isReactionsEnabled: UserReactionService.isEnabled(),
|
2023-11-30 23:10:36 +08:00
|
|
|
isGladiaEnabled: SpeechService.isActive() && SpeechService.isGladia(),
|
2018-10-04 00:14:10 +08:00
|
|
|
}))(SettingsContainer);
|