2017-06-04 10:40:14 +08:00
|
|
|
import React, { Component } from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
2016-12-23 09:48:19 +08:00
|
|
|
import { createContainer } from 'meteor/react-meteor-data';
|
2017-03-17 00:52:43 +08:00
|
|
|
import Settings from './component';
|
2017-03-29 02:41:48 +08:00
|
|
|
import SettingsService from '/imports/ui/services/settings';
|
|
|
|
|
2017-02-25 04:19:53 +08:00
|
|
|
import {
|
|
|
|
getClosedCaptionLocales,
|
|
|
|
getUserRoles,
|
2017-03-29 02:41:48 +08:00
|
|
|
updateSettings,
|
2017-04-06 20:36:59 +08:00
|
|
|
getAvailableLocales,
|
2017-03-17 00:52:43 +08:00
|
|
|
} from './service';
|
2016-12-21 02:06:01 +08:00
|
|
|
|
2017-01-27 23:41:11 +08:00
|
|
|
class SettingsContainer extends Component {
|
2016-12-23 09:48:19 +08:00
|
|
|
render() {
|
|
|
|
return (
|
2017-06-03 03:25:02 +08:00
|
|
|
<Settings {...this.props} />
|
2016-12-23 09:48:19 +08:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-06-03 03:25:02 +08:00
|
|
|
export default createContainer(() => ({
|
|
|
|
audio: SettingsService.audio,
|
|
|
|
video: SettingsService.video,
|
|
|
|
application: SettingsService.application,
|
|
|
|
cc: SettingsService.cc,
|
|
|
|
participants: SettingsService.participants,
|
|
|
|
updateSettings,
|
|
|
|
locales: getClosedCaptionLocales(),
|
|
|
|
availableLocales: getAvailableLocales(),
|
|
|
|
isModerator: getUserRoles() === 'MODERATOR',
|
|
|
|
}), SettingsContainer);
|