2018-01-08 12:44:42 +08:00
|
|
|
import React from 'react';
|
|
|
|
import { withTracker } from 'meteor/react-meteor-data';
|
2018-02-07 04:06:52 +08:00
|
|
|
import { withRouter } from 'react-router';
|
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';
|
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
|
|
|
getClosedCaptionLocales,
|
|
|
|
getUserRoles,
|
|
|
|
updateSettings,
|
|
|
|
getAvailableLocales,
|
|
|
|
} from './service';
|
2016-12-21 02:06:01 +08:00
|
|
|
|
2018-01-08 12:44:42 +08:00
|
|
|
const SettingsContainer = props => (
|
|
|
|
<Settings {...props} />
|
|
|
|
);
|
2016-12-23 09:48:19 +08:00
|
|
|
|
2018-02-07 04:06:52 +08:00
|
|
|
export default withRouter(withTracker(() => ({
|
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,
|
|
|
|
cc: SettingsService.cc,
|
|
|
|
participants: SettingsService.participants,
|
|
|
|
updateSettings,
|
|
|
|
locales: getClosedCaptionLocales(),
|
|
|
|
availableLocales: getAvailableLocales(),
|
|
|
|
isModerator: getUserRoles() === 'MODERATOR',
|
2018-02-07 04:06:52 +08:00
|
|
|
}))(SettingsContainer));
|