Merge pull request #3948 from KDSBrowne/x0-lint-Client
[HTML5] - Fix client lint issues
This commit is contained in:
commit
250c6cdb8b
@ -35,7 +35,8 @@ export default class SIPBridge extends BaseAudioBridge {
|
||||
}
|
||||
};
|
||||
|
||||
// Checks periodically until a call is established so we can successfully end the call clean state
|
||||
// Checks periodically until a call is established so we can successfully
|
||||
// end the call clean state
|
||||
triedHangup = false;
|
||||
|
||||
// function to initiate call
|
||||
|
@ -6,7 +6,10 @@ import SIPBridge from '../bridge/sip';
|
||||
export default class AudioManager {
|
||||
constructor(userData) {
|
||||
const MEDIA_CONFIG = Meteor.settings.public.media;
|
||||
const audioBridge = MEDIA_CONFIG.useSIPAudio ? new SIPBridge(userData) : new VertoBridge(userData);
|
||||
const audioBridge = MEDIA_CONFIG.useSIPAudio
|
||||
? new SIPBridge(userData)
|
||||
: new VertoBridge(userData);
|
||||
|
||||
if (!(audioBridge instanceof BaseAudioBridge)) {
|
||||
throw 'Audio Bridge not compatible';
|
||||
}
|
||||
|
@ -136,7 +136,9 @@ export default function handleCaptionUpdate({ payload }) {
|
||||
//every other object, so that Captions collection could be updated in a proper order
|
||||
let tempObj = objectsToUpdate.splice(i, 1);
|
||||
let extraString = tempObj[0].captionHistory.captions.slice(CAPTION_CHUNK_LENGTH);
|
||||
tempObj[0].captionHistory.captions = tempObj[0].captionHistory.captions.slice(0, CAPTION_CHUNK_LENGTH);
|
||||
|
||||
tempObj[0].captionHistory.captions =
|
||||
tempObj[0].captionHistory.captions.slice(0, CAPTION_CHUNK_LENGTH);
|
||||
|
||||
maxIndex += 1;
|
||||
let tempIndex = tempObj[0].captionHistory.next;
|
||||
|
10
bigbluebutton-html5/imports/api/chat/server/modifiers/clearUserSystemMessages.js
Executable file → Normal file
10
bigbluebutton-html5/imports/api/chat/server/modifiers/clearUserSystemMessages.js
Executable file → Normal file
@ -5,9 +5,9 @@ import { BREAK_LINE } from '/imports/utils/lineEndings.js';
|
||||
|
||||
/**
|
||||
* Remove any system message from the user with userId.
|
||||
*
|
||||
*
|
||||
* @param {string} meetingId
|
||||
* @param {string} userId
|
||||
* @param {string} userId
|
||||
*/
|
||||
export default function clearUserSystemMessages(meetingId, userId) {
|
||||
|
||||
@ -18,9 +18,9 @@ export default function clearUserSystemMessages(meetingId, userId) {
|
||||
|
||||
const selector = {
|
||||
meetingId,
|
||||
"message.from_userid": CHAT_CONFIG.type_system,
|
||||
"message.to_userid": userId,
|
||||
}
|
||||
'message.from_userid': CHAT_CONFIG.type_system,
|
||||
'message.to_userid': userId,
|
||||
};
|
||||
|
||||
return Chat.remove(selector, Logger.info(`Removing system messages from: (${userId})`));
|
||||
};
|
||||
|
2
bigbluebutton-html5/imports/api/chat/server/publishers.js
Executable file → Normal file
2
bigbluebutton-html5/imports/api/chat/server/publishers.js
Executable file → Normal file
@ -4,7 +4,7 @@ import { check } from 'meteor/check';
|
||||
import Logger from '/imports/startup/server/logger';
|
||||
import { isAllowedTo } from '/imports/startup/server/userPermissions';
|
||||
|
||||
Meteor.publish('chat', function(credentials) {
|
||||
Meteor.publish('chat', function (credentials) {
|
||||
if (!isAllowedTo('subscribeChat', credentials)) {
|
||||
this.error(new Meteor.Error(402, "The user was not authorized to subscribe for 'chats'"));
|
||||
}
|
||||
|
@ -3,9 +3,8 @@ import Meetings from '/imports/api/meetings';
|
||||
const getConferenceBridge = () => {
|
||||
const Meeting = Meetings.findOne();
|
||||
return Meeting.voiceConf;
|
||||
}
|
||||
};
|
||||
|
||||
export {
|
||||
getConferenceBridge,
|
||||
}
|
||||
|
||||
};
|
||||
|
2
bigbluebutton-html5/imports/api/polls/server/publishers.js
Executable file → Normal file
2
bigbluebutton-html5/imports/api/polls/server/publishers.js
Executable file → Normal file
@ -4,7 +4,7 @@ import Polls from '/imports/api/polls';
|
||||
import { check } from 'meteor/check';
|
||||
import { logger } from '/imports/startup/server/logger';
|
||||
|
||||
Meteor.publish('polls', function(credentials) {
|
||||
Meteor.publish('polls', function (credentials) {
|
||||
//checking if it is allowed to see Poll Collection in general
|
||||
if (!isAllowedTo('subscribePoll', credentials)) {
|
||||
this.error(new Meteor.Error(402, "The user was not authorized to subscribe for 'polls'"));
|
||||
|
4
bigbluebutton-html5/imports/api/users/server/handlers/emojiStatus.js
Normal file → Executable file
4
bigbluebutton-html5/imports/api/users/server/handlers/emojiStatus.js
Normal file → Executable file
@ -29,7 +29,9 @@ export default function handleEmojiStatus({ payload }) {
|
||||
}
|
||||
|
||||
if (numChanged) {
|
||||
return Logger.info(`Assigned user emoji status '${status}' id=${userId} meeting=${meetingId}`);
|
||||
return Logger.info('Assigned user emoji status'
|
||||
+ status + ' id=' + userId + ' meeting=' + meetingId
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -28,7 +28,9 @@ export default function handleListeningOnly({ payload }) {
|
||||
}
|
||||
|
||||
if (numChanged) {
|
||||
return Logger.info(`Assigned listen only status '${listenOnly}' user=${userId} meeting=${meetingId}`);
|
||||
return Logger.info(
|
||||
`Assigned listen only status '${listenOnly}' user=${userId} meeting=${meetingId}`
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -50,7 +50,8 @@ export default function handleLockedStatusChange({ payload }) {
|
||||
muteToggle(credentials, userId, true);
|
||||
}
|
||||
|
||||
return Logger.info(`Assigned locked status '${isLocked ? 'locked' : 'unlocked'}' id=${userId} meeting=${meetingId}`);
|
||||
return Logger.info(`Assigned locked status '${isLocked
|
||||
? 'locked' : 'unlocked'}' id=${userId} meeting=${meetingId}`);
|
||||
}
|
||||
};
|
||||
|
||||
|
4
bigbluebutton-html5/imports/api/users/server/handlers/validateAuthToken.js
Normal file → Executable file
4
bigbluebutton-html5/imports/api/users/server/handlers/validateAuthToken.js
Normal file → Executable file
@ -45,7 +45,9 @@ export default function handleValidateAuthToken({ payload }) {
|
||||
addWelcomeChatMessage(meetingId, userId);
|
||||
}
|
||||
|
||||
return Logger.info(`Validated auth token as '${validStatus}' user=${userId} meeting=${meetingId}`);
|
||||
return Logger.info('Validated auth token as ' + validStatus +
|
||||
+' user=' + userId + ' meeting=' + meetingId
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -36,7 +36,8 @@ export default function assignPresenter(credentials, userId) {
|
||||
assigned_by: requesterUserId,
|
||||
};
|
||||
|
||||
Logger.verbose(`User '${userId}' setted as presenter by '${requesterUserId}' from meeting '${meetingId}'`);
|
||||
Logger.verbose(`User '${userId}' setted as presenterby '${
|
||||
requesterUserId}' from meeting '${meetingId}'`);
|
||||
|
||||
return RedisPubSub.publish(CHANNEL, EVENT_NAME, payload);
|
||||
};
|
||||
|
3
bigbluebutton-html5/imports/api/users/server/methods/listenOnlyToggle.js
Normal file → Executable file
3
bigbluebutton-html5/imports/api/users/server/methods/listenOnlyToggle.js
Normal file → Executable file
@ -57,7 +57,8 @@ export default function listenOnlyToggle(credentials, isJoining = true) {
|
||||
name: User.user.name,
|
||||
};
|
||||
|
||||
Logger.verbose(`User '${requesterUserId}' ${isJoining ? 'joined' : 'left'} global audio from meeting '${meetingId}'`);
|
||||
Logger.verbose(`User '${requesterUserId}' ${isJoining
|
||||
? 'joined' : 'left'} global audio from meeting '${meetingId}'`);
|
||||
|
||||
return RedisPubSub.publish(CHANNEL, EVENT_NAME, payload);
|
||||
};
|
||||
|
@ -32,7 +32,8 @@ export default function muteToggle(credentials, userId, isMuted = true) {
|
||||
requester_id: requesterUserId,
|
||||
};
|
||||
|
||||
Logger.verbose(`User '${userId}' was ${!isMuted ? 'un' : ''}muted by '${requesterUserId}' from meeting '${meetingId}'`);
|
||||
Logger.verbose(`User '${userId}' was ${!isMuted ? 'un' : ''}muted by '${
|
||||
requesterUserId}' from meeting '${meetingId}'`);
|
||||
|
||||
return RedisPubSub.publish(CHANNEL, EVENT_NAME, payload);
|
||||
};
|
||||
|
@ -25,7 +25,8 @@ export default function setEmojiStatus(credentials, userId, status) {
|
||||
meeting_id: meetingId,
|
||||
};
|
||||
|
||||
Logger.verbose(`User '${userId}' emoji status updated to '${status}' by '${requesterUserId}' from meeting '${meetingId}'`);
|
||||
Logger.verbose(`User '${userId}' emoji status updated to '${status}' by '${
|
||||
requesterUserId}' from meeting '${meetingId}'`);
|
||||
|
||||
return RedisPubSub.publish(CHANNEL, EVENT_NAME, payload);
|
||||
};
|
||||
|
@ -42,7 +42,9 @@ export default function validateAuthToken(credentials) {
|
||||
reply_to: `${meetingId}/${requesterUserId}`,
|
||||
};
|
||||
|
||||
Logger.info(`User '${requesterUserId}' is trying to validate auth token for meeting '${meetingId}'`);
|
||||
Logger.info(`User '${
|
||||
requesterUserId
|
||||
}' is trying to validate auth tokenfor meeting '${meetingId}'`);
|
||||
|
||||
return RedisPubSub.publish(CHANNEL, EVENT_NAME, payload, header);
|
||||
};
|
||||
|
@ -29,7 +29,7 @@ export default function addUser(meetingId, user) {
|
||||
dummyUser.clientType === 'HTML5' &&
|
||||
user.role === ROLE_MODERATOR &&
|
||||
!ALLOW_HTML5_MODERATOR) {
|
||||
user.role = ROLE_VIEWER;
|
||||
user.role = ROLE_VIEWER;
|
||||
}
|
||||
|
||||
const modifier = {
|
||||
|
3
bigbluebutton-html5/imports/api/users/server/modifiers/setConnectionStatus.js
Normal file → Executable file
3
bigbluebutton-html5/imports/api/users/server/modifiers/setConnectionStatus.js
Normal file → Executable file
@ -32,7 +32,8 @@ export default function setConnectionStatus(meetingId, userId, status = 'online'
|
||||
}
|
||||
|
||||
if (numChanged) {
|
||||
return Logger.info(`Updated connection status user=${userId} status=${status} meeting=${meetingId}`);
|
||||
return Logger.info(`Updated connection status user=${userId} status=${
|
||||
status} meeting=${meetingId}`);
|
||||
}
|
||||
};
|
||||
|
||||
|
14
bigbluebutton-html5/imports/startup/client/auth.js
Normal file → Executable file
14
bigbluebutton-html5/imports/startup/client/auth.js
Normal file → Executable file
@ -46,7 +46,11 @@ export function authenticatedRouteHandler(nextState, replace, callback) {
|
||||
Auth.authenticate()
|
||||
.then(callback)
|
||||
.catch(reason => {
|
||||
logClient('error', { error: reason, method: 'authenticatedRouteHandler', credentialsSnapshot });
|
||||
logClient('error', {
|
||||
error: reason,
|
||||
method: 'authenticatedRouteHandler',
|
||||
credentialsSnapshot,
|
||||
});
|
||||
|
||||
// make sure users who did not connect are not added to the meeting
|
||||
// do **not** use the custom call - it relies on expired data
|
||||
@ -77,8 +81,8 @@ function _addReconnectObservable() {
|
||||
|
||||
/**
|
||||
* Check if should revalidate the auth
|
||||
* @param {Object} status
|
||||
* @param {String} lastStatus
|
||||
* @param {Object} status
|
||||
* @param {String} lastStatus
|
||||
*/
|
||||
export function shouldAuthenticate(status, lastStatus) {
|
||||
return lastStatus != null && lastStatus === STATUS_CONNECTING && status.connected;
|
||||
@ -86,8 +90,8 @@ export function shouldAuthenticate(status, lastStatus) {
|
||||
|
||||
/**
|
||||
* Check if the isn't the first connection try, preventing to authenticate on login.
|
||||
* @param {Object} status
|
||||
* @param {string} lastStatus
|
||||
* @param {Object} status
|
||||
* @param {string} lastStatus
|
||||
*/
|
||||
export function updateStatus(status, lastStatus) {
|
||||
return status.retryCount > 0 && lastStatus !== STATUS_CONNECTING ? status.status : lastStatus;
|
||||
|
@ -15,9 +15,9 @@ class IntlStartup extends Component {
|
||||
|
||||
this.state = {
|
||||
messages: {},
|
||||
appLocale : this.props.locale,
|
||||
appLocale: this.props.locale,
|
||||
};
|
||||
|
||||
|
||||
this.fetchLocalizedMessages = this.fetchLocalizedMessages.bind(this);
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ class IntlStartup extends Component {
|
||||
if (response.ok) {
|
||||
return response.json();
|
||||
} else {
|
||||
this.setState({appLocale: 'en'});
|
||||
this.setState({ appLocale: 'en' });
|
||||
return response.json();
|
||||
}
|
||||
})
|
||||
@ -53,7 +53,7 @@ class IntlStartup extends Component {
|
||||
|
||||
componentWillUpdate(nextProps, nextState) {
|
||||
if (this.props.locale !== nextProps.locale) {
|
||||
this.setState({appLocale: nextProps.locale});
|
||||
this.setState({ appLocale: nextProps.locale });
|
||||
this.fetchLocalizedMessages(nextProps.locale);
|
||||
}
|
||||
}
|
||||
|
@ -128,17 +128,14 @@ export function isAllowedTo(action, credentials) {
|
||||
userId,
|
||||
});
|
||||
|
||||
const allowedToInitiateRequest =
|
||||
user &&
|
||||
const allowedToInitiateRequest = user &&
|
||||
user.authToken === authToken &&
|
||||
user.validated &&
|
||||
user.clientType === 'HTML5' &&
|
||||
user.user &&
|
||||
user.user.connection_status === 'online';
|
||||
|
||||
const listOfSafeActions = [
|
||||
'logoutSelf',
|
||||
];
|
||||
const listOfSafeActions = ['logoutSelf'];
|
||||
|
||||
const requestIsSafe = listOfSafeActions.includes(action);
|
||||
|
||||
@ -151,10 +148,10 @@ export function isAllowedTo(action, credentials) {
|
||||
let result = false;
|
||||
|
||||
// check role specific actions
|
||||
if ('MODERATOR' === user.user.role) {
|
||||
if (user.user.role === 'MODERATOR') {
|
||||
logger.debug('user permissions moderator case');
|
||||
result = result || moderator[action];
|
||||
} else if ('VIEWER' === user.user.role) {
|
||||
} else if (user.user.role === 'VIEWER') {
|
||||
logger.debug('user permissions viewer case');
|
||||
result = result || viewer(meetingId, userId)[action];
|
||||
}
|
||||
|
@ -17,13 +17,13 @@ class AboutContainer extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
const getClientBuildInfo = () => {
|
||||
const getClientBuildInfo = function () {
|
||||
return {
|
||||
clientBuild: Meteor.settings.public.app.html5ClientBuild,
|
||||
copyright: Meteor.settings.public.app.copyright,
|
||||
};
|
||||
};
|
||||
|
||||
export default createContainer(() => {
|
||||
export default createContainer(function () {
|
||||
return getClientBuildInfo();
|
||||
}, AboutContainer);
|
||||
|
2
bigbluebutton-html5/imports/ui/components/actions-bar/component.jsx
Executable file → Normal file
2
bigbluebutton-html5/imports/ui/components/actions-bar/component.jsx
Executable file → Normal file
@ -16,7 +16,7 @@ export default class ActionsBar extends Component {
|
||||
return (
|
||||
<div className={styles.actionsbar}>
|
||||
<div className={styles.left}>
|
||||
<ActionsDropdown {...{isUserPresenter}}/>
|
||||
<ActionsDropdown {...{ isUserPresenter }}/>
|
||||
</div>
|
||||
<div className={styles.center}>
|
||||
<MuteAudioContainer />
|
||||
|
@ -47,7 +47,9 @@ class EmojiMenu extends Component {
|
||||
// even after the DropdownTrigger inject an onClick handler
|
||||
onClick={() => null}>
|
||||
<div id="currentStatus" hidden>
|
||||
{intl.formatMessage(intlMessages.currentStatusDesc, { 0: userEmojiStatus}) }
|
||||
{
|
||||
intl.formatMessage(intlMessages.currentStatusDesc, { 0: userEmojiStatus })
|
||||
}
|
||||
</div>
|
||||
</Button>
|
||||
</DropdownTrigger>
|
||||
@ -223,7 +225,7 @@ const intlMessages = defineMessages({
|
||||
currentStatusDesc: {
|
||||
id: 'app.actionsBar.currentStatusDesc',
|
||||
description: 'Aria description for status button',
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
EmojiMenu.propTypes = propTypes;
|
||||
|
2
bigbluebutton-html5/imports/ui/components/actions-bar/video-button/component.jsx
Executable file → Normal file
2
bigbluebutton-html5/imports/ui/components/actions-bar/video-button/component.jsx
Executable file → Normal file
@ -16,7 +16,7 @@ export default class JoinVideo extends React.Component {
|
||||
icon={'video_off'}
|
||||
size={'lg'}
|
||||
circle={true}
|
||||
style={{visibility: 'hidden'}}
|
||||
style={{ visibility: 'hidden' }}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
2
bigbluebutton-html5/imports/ui/components/audio/audio-test/container.jsx
Executable file → Normal file
2
bigbluebutton-html5/imports/ui/components/audio/audio-test/container.jsx
Executable file → Normal file
@ -16,7 +16,7 @@ class AudioTestContainer extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
export default createContainer(() => {
|
||||
export default createContainer(function () {
|
||||
return {
|
||||
handlePlayAudioSample: () => {
|
||||
const snd = new Audio('resources/sounds/audioSample.mp3');
|
||||
|
@ -123,9 +123,9 @@ class MessageForm extends Component {
|
||||
disabled={disabled}
|
||||
label={intl.formatMessage(messages.submitLabel)}
|
||||
hideLabel={true}
|
||||
icon={"send"}
|
||||
onClick={()=>{}}
|
||||
/>
|
||||
icon={'send'}
|
||||
onClick={this.handleMessageKeyDown({ keyCode: 13 })}
|
||||
/>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
|
2
bigbluebutton-html5/imports/ui/components/chat/service.js
Executable file → Normal file
2
bigbluebutton-html5/imports/ui/components/chat/service.js
Executable file → Normal file
@ -97,8 +97,8 @@ const getUser = (userID, userName) => {
|
||||
if (!user) {
|
||||
return null;
|
||||
}
|
||||
return mapUser(user.user);
|
||||
|
||||
return mapUser(user.user);
|
||||
};
|
||||
|
||||
const getPublicMessages = () => {
|
||||
|
2
bigbluebutton-html5/imports/ui/components/closed-captions/container.jsx
Executable file → Normal file
2
bigbluebutton-html5/imports/ui/components/closed-captions/container.jsx
Executable file → Normal file
@ -17,6 +17,6 @@ class ClosedCaptionsContainer extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
export default createContainer(() => {
|
||||
export default createContainer(function () {
|
||||
return ClosedCaptionsService.getCCData();
|
||||
}, ClosedCaptionsContainer);
|
||||
|
0
bigbluebutton-html5/imports/ui/components/dropdown/list/title/component.jsx
Executable file → Normal file
0
bigbluebutton-html5/imports/ui/components/dropdown/list/title/component.jsx
Executable file → Normal file
@ -1,6 +1,6 @@
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import { defineMessages, injectIntl } from 'react-intl';
|
||||
import Button from '/imports/ui/components/button/component'
|
||||
import Button from '/imports/ui/components/button/component';
|
||||
|
||||
import styles from './styles.scss';
|
||||
|
||||
@ -63,7 +63,11 @@ class ErrorScreen extends Component {
|
||||
{children}
|
||||
</div>
|
||||
<div className={styles.content}>
|
||||
<Button size={"sm"} label={intl.formatMessage(intlMessages.leave)} onClick={this.onClick}/>
|
||||
<Button
|
||||
size={'sm'}
|
||||
onClick={this.onClick}
|
||||
label={intl.formatMessage(intlMessages.leave)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
@ -1,59 +1,63 @@
|
||||
import React, { Component } from 'react';
|
||||
import SettingsDropdown from './component';
|
||||
import Service from './service';
|
||||
|
||||
export default class SettingsDropdownContainer extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
isFullScreen: false,
|
||||
};
|
||||
|
||||
this.handleFullscreenChange = this.handleFullscreenChange.bind(this);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const fullscreenChangedEvents = ['fullscreenchange',
|
||||
'webkitfullscreenchange',
|
||||
'mozfullscreenchange',
|
||||
'MSFullscreenChange',];
|
||||
|
||||
fullscreenChangedEvents.forEach(event =>
|
||||
document.addEventListener(event, this.handleFullscreenChange));
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
const fullscreenChangedEvents = ['fullscreenchange',
|
||||
'webkitfullscreenchange',
|
||||
'mozfullscreenchange',
|
||||
'MSFullscreenChange',];
|
||||
|
||||
fullscreenChangedEvents.forEach(event =>
|
||||
document.removeEventListener(event, this.fullScreenToggleCallback));
|
||||
}
|
||||
|
||||
handleFullscreenChange() {
|
||||
if (document.fullscreenElement
|
||||
|| document.webkitFullscreenElement
|
||||
|| document.mozFullScreenElement
|
||||
|| document.msFullscreenElement) {
|
||||
this.setState({ isFullScreen: true });
|
||||
} else {
|
||||
this.setState({ isFullScreen: false });
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
const handleToggleFullscreen = Service.toggleFullScreen;
|
||||
const isFullScreen = this.state.isFullScreen;
|
||||
|
||||
return (
|
||||
<SettingsDropdown
|
||||
handleToggleFullscreen={handleToggleFullscreen}
|
||||
isFullScreen={isFullScreen}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
import React, { Component } from 'react';
|
||||
import SettingsDropdown from './component';
|
||||
import Service from './service';
|
||||
|
||||
export default class SettingsDropdownContainer extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
isFullScreen: false,
|
||||
};
|
||||
|
||||
this.handleFullscreenChange = this.handleFullscreenChange.bind(this);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const fullscreenChangedEvents = [
|
||||
'fullscreenchange',
|
||||
'webkitfullscreenchange',
|
||||
'mozfullscreenchange',
|
||||
'MSFullscreenChange',
|
||||
];
|
||||
|
||||
fullscreenChangedEvents.forEach(event =>
|
||||
document.addEventListener(event, this.handleFullscreenChange));
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
const fullscreenChangedEvents = [
|
||||
'fullscreenchange',
|
||||
'webkitfullscreenchange',
|
||||
'mozfullscreenchange',
|
||||
'MSFullscreenChange',
|
||||
];
|
||||
|
||||
fullscreenChangedEvents.forEach(event =>
|
||||
document.removeEventListener(event, this.fullScreenToggleCallback));
|
||||
}
|
||||
|
||||
handleFullscreenChange() {
|
||||
if (document.fullscreenElement
|
||||
|| document.webkitFullscreenElement
|
||||
|| document.mozFullScreenElement
|
||||
|| document.msFullscreenElement) {
|
||||
this.setState({ isFullScreen: true });
|
||||
} else {
|
||||
this.setState({ isFullScreen: false });
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
const handleToggleFullscreen = Service.toggleFullScreen;
|
||||
const isFullScreen = this.state.isFullScreen;
|
||||
|
||||
return (
|
||||
<SettingsDropdown
|
||||
handleToggleFullscreen={handleToggleFullscreen}
|
||||
isFullScreen={isFullScreen}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
69
bigbluebutton-html5/imports/ui/components/nav-bar/settings-dropdown/service.js
Executable file → Normal file
69
bigbluebutton-html5/imports/ui/components/nav-bar/settings-dropdown/service.js
Executable file → Normal file
@ -1,35 +1,34 @@
|
||||
|
||||
toggleFullScreen = () => {
|
||||
let element = document.documentElement;
|
||||
|
||||
if (document.fullscreenElement
|
||||
|| document.webkitFullscreenElement
|
||||
|| document.mozFullScreenElement
|
||||
|| document.msFullscreenElement) {
|
||||
|
||||
if (document.exitFullscreen) {
|
||||
document.exitFullscreen();
|
||||
} else if (document.mozCancelFullScreen) {
|
||||
document.mozCancelFullScreen();
|
||||
} else if (document.webkitExitFullscreen) {
|
||||
document.webkitExitFullscreen();
|
||||
}
|
||||
|
||||
// If the page is not currently fullscreen, make fullscreen
|
||||
} else {
|
||||
if (element.requestFullscreen) {
|
||||
element.requestFullscreen();
|
||||
} else if (element.mozRequestFullScreen) {
|
||||
element.mozRequestFullScreen();
|
||||
} else if (element.webkitRequestFullscreen) {
|
||||
element.webkitRequestFullscreen();
|
||||
element.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
|
||||
} else if (element.msRequestFullscreen) {
|
||||
element.msRequestFullscreen();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export {
|
||||
toggleFullScreen,
|
||||
};
|
||||
toggleFullScreen = () => {
|
||||
let element = document.documentElement;
|
||||
|
||||
if (document.fullscreenElement
|
||||
|| document.webkitFullscreenElement
|
||||
|| document.mozFullScreenElement
|
||||
|| document.msFullscreenElement) {
|
||||
|
||||
if (document.exitFullscreen) {
|
||||
document.exitFullscreen();
|
||||
} else if (document.mozCancelFullScreen) {
|
||||
document.mozCancelFullScreen();
|
||||
} else if (document.webkitExitFullscreen) {
|
||||
document.webkitExitFullscreen();
|
||||
}
|
||||
|
||||
// If the page is not currently fullscreen, make fullscreen
|
||||
} else {
|
||||
if (element.requestFullscreen) {
|
||||
element.requestFullscreen();
|
||||
} else if (element.mozRequestFullScreen) {
|
||||
element.mozRequestFullScreen();
|
||||
} else if (element.webkitRequestFullscreen) {
|
||||
element.webkitRequestFullscreen();
|
||||
element.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
|
||||
} else if (element.msRequestFullscreen) {
|
||||
element.msRequestFullscreen();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export {
|
||||
toggleFullScreen,
|
||||
};
|
||||
|
@ -18,7 +18,7 @@ class SettingsContainer extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
export default createContainer(() => {
|
||||
export default createContainer(function () {
|
||||
return {
|
||||
audio: SettingsService.audio,
|
||||
video: SettingsService.video,
|
||||
|
@ -29,7 +29,7 @@ const updateSettings = (obj) => {
|
||||
Settings.save();
|
||||
};
|
||||
|
||||
const getAvailableLocales = () => {
|
||||
const getAvailableLocales = function () {
|
||||
return fetch('/html5client/locales').then(locales => locales.json());
|
||||
};
|
||||
|
||||
|
5
bigbluebutton-html5/imports/ui/components/settings/submenus/application/component.jsx
Executable file → Normal file
5
bigbluebutton-html5/imports/ui/components/settings/submenus/application/component.jsx
Executable file → Normal file
@ -194,7 +194,10 @@ class ApplicationMenu extends BaseMenu {
|
||||
) : null }
|
||||
</select>
|
||||
</div>
|
||||
<div id="changeLangLabel" aria-label={intl.formatMessage(intlMessages.ariaLanguageLabel)}></div>
|
||||
<div
|
||||
id="changeLangLabel"
|
||||
aria-label={intl.formatMessage(intlMessages.ariaLanguageLabel)}>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr className={styles.separator}/>
|
||||
|
@ -13,7 +13,7 @@ class ApplicationContainer extends Component {
|
||||
);
|
||||
}
|
||||
}
|
||||
export default createContainer(() => {
|
||||
export default createContainer(function () {
|
||||
return {
|
||||
fontSizes: [
|
||||
'12px',
|
||||
|
@ -13,6 +13,6 @@ class ClosedCaptionsMenuContainer extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
export default createContainer(() => {
|
||||
export default createContainer(function () {
|
||||
return Service.getClosedCaptionSettings();
|
||||
}, ClosedCaptionsMenuContainer);
|
||||
|
2
bigbluebutton-html5/imports/ui/components/user-list/service.js
Executable file → Normal file
2
bigbluebutton-html5/imports/ui/components/user-list/service.js
Executable file → Normal file
@ -164,7 +164,7 @@ const userFindSorting = {
|
||||
|
||||
const getUsers = () => {
|
||||
let users = Users
|
||||
.find({ "user.connection_status": 'online' }, userFindSorting)
|
||||
.find({ 'user.connection_status': 'online' }, userFindSorting)
|
||||
.fetch();
|
||||
|
||||
return users
|
||||
|
6
bigbluebutton-html5/imports/ui/components/user-list/user-list-item/component.jsx
Executable file → Normal file
6
bigbluebutton-html5/imports/ui/components/user-list/user-list-item/component.jsx
Executable file → Normal file
@ -401,7 +401,11 @@ class UserListItem extends Component {
|
||||
|
||||
userNameSub = userNameSub.join(' ');
|
||||
|
||||
const { disablePrivateChat, disableCam, disableMic, lockedLayout, disablePublicChat } = meeting.roomLockSettings;
|
||||
const { disablePrivateChat,
|
||||
disableCam,
|
||||
disableMic,
|
||||
loSckedLayout,
|
||||
disablePublicChat, } = meeting.roomLockSettings;
|
||||
|
||||
return (
|
||||
<div className={styles.userName}>
|
||||
|
2
bigbluebutton-html5/imports/ui/services/auth/index.js
Executable file → Normal file
2
bigbluebutton-html5/imports/ui/services/auth/index.js
Executable file → Normal file
@ -201,4 +201,4 @@ class Auth {
|
||||
};
|
||||
|
||||
let AuthSingleton = new Auth();
|
||||
export default AuthSingleton;
|
||||
export default AuthSingleton;
|
||||
|
@ -3,21 +3,21 @@ import { check } from 'meteor/check';
|
||||
let collection = new Mongo.Collection(null);
|
||||
|
||||
function findById(notificationId) {
|
||||
check(notificationId, String);
|
||||
collection.find({ notificationId });
|
||||
check(notificationId, String);
|
||||
collection.find({ notificationId });
|
||||
}
|
||||
|
||||
function add(notification) {
|
||||
check(notification.notification, String);
|
||||
collection.insert(notification);
|
||||
check(notification.notification, String);
|
||||
collection.insert(notification);
|
||||
}
|
||||
|
||||
function remove(notificationId) {
|
||||
check(notificationId, String);
|
||||
collection.remove({ notificationId });
|
||||
check(notificationId, String);
|
||||
collection.remove({ notificationId });
|
||||
}
|
||||
|
||||
const NotificationCollection = {findById, add, remove,};
|
||||
const NotificationCollection = { findById, add, remove, };
|
||||
|
||||
export default NotificationCollection;
|
||||
|
||||
|
@ -7,28 +7,28 @@ class NotificationService {
|
||||
* @param {Object} database
|
||||
*/
|
||||
constructor(database) {
|
||||
this.database = database;
|
||||
this.database = database;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} notificationID
|
||||
*/
|
||||
get(notificationID) {
|
||||
this.database.findById(notificationID);
|
||||
this.database.findById(notificationID);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Object} notification
|
||||
*/
|
||||
add(notification) {
|
||||
this.database.add(notification);
|
||||
this.database.add(notification);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} notificationID
|
||||
*/
|
||||
remove(notificationID) {
|
||||
this.database.remove(notificationID);
|
||||
this.database.remove(notificationID);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,13 @@
|
||||
const EMOJI_STATUSES = ['away', 'raiseHand', 'neutral', 'confused', 'sad',
|
||||
'happy', 'applause', 'thumbsUp', 'thumbsDown'];
|
||||
const EMOJI_STATUSES = [
|
||||
'away',
|
||||
'raiseHand',
|
||||
'neutral',
|
||||
'confused',
|
||||
'sad',
|
||||
'happy',
|
||||
'applause',
|
||||
'thumbsUp',
|
||||
'thumbsDown',
|
||||
];
|
||||
|
||||
export { EMOJI_STATUSES };
|
||||
|
Loading…
Reference in New Issue
Block a user