parent
0bad0d9ecf
commit
db473dfef5
|
@ -1017,6 +1017,9 @@ var config = {
|
||||||
// Prevent the filmstrip from autohiding when screen width is under a certain threshold
|
// Prevent the filmstrip from autohiding when screen width is under a certain threshold
|
||||||
// disableFilmstripAutohiding: false,
|
// disableFilmstripAutohiding: false,
|
||||||
|
|
||||||
|
// Specifies whether the chat emoticons are disabled or not
|
||||||
|
// disableChatSmileys: false,
|
||||||
|
|
||||||
// Allow all above example options to include a trailing comma and
|
// Allow all above example options to include a trailing comma and
|
||||||
// prevent fear when commenting out the last value.
|
// prevent fear when commenting out the last value.
|
||||||
makeJsonParserHappy: 'even if last key had a trailing comma'
|
makeJsonParserHappy: 'even if last key had a trailing comma'
|
||||||
|
|
|
@ -83,6 +83,7 @@ export default [
|
||||||
'disableAGC',
|
'disableAGC',
|
||||||
'disableAP',
|
'disableAP',
|
||||||
'disableAudioLevels',
|
'disableAudioLevels',
|
||||||
|
'disableChatSmileys',
|
||||||
'disableDeepLinking',
|
'disableDeepLinking',
|
||||||
'disabledSounds',
|
'disabledSounds',
|
||||||
'disableFilmstripAutohiding',
|
'disableFilmstripAutohiding',
|
||||||
|
|
|
@ -8,6 +8,7 @@ import { isMobileBrowser } from '../../../base/environment/utils';
|
||||||
import { translate } from '../../../base/i18n';
|
import { translate } from '../../../base/i18n';
|
||||||
import { Icon, IconPlane, IconSmile } from '../../../base/icons';
|
import { Icon, IconPlane, IconSmile } from '../../../base/icons';
|
||||||
import { connect } from '../../../base/redux';
|
import { connect } from '../../../base/redux';
|
||||||
|
import { areSmileysDisabled } from '../../functions';
|
||||||
|
|
||||||
import SmileysPanel from './SmileysPanel';
|
import SmileysPanel from './SmileysPanel';
|
||||||
|
|
||||||
|
@ -35,7 +36,13 @@ type Props = {
|
||||||
/**
|
/**
|
||||||
* Invoked to obtain translated strings.
|
* Invoked to obtain translated strings.
|
||||||
*/
|
*/
|
||||||
t: Function
|
t: Function,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether chat emoticons are disabled.
|
||||||
|
*/
|
||||||
|
_areSmileysDisabled: boolean
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -115,6 +122,7 @@ class ChatInput extends Component<Props, State> {
|
||||||
return (
|
return (
|
||||||
<div className = { `chat-input-container${this.state.message.trim().length ? ' populated' : ''}` }>
|
<div className = { `chat-input-container${this.state.message.trim().length ? ' populated' : ''}` }>
|
||||||
<div id = 'chat-input' >
|
<div id = 'chat-input' >
|
||||||
|
{ this.props._areSmileysDisabled ? null : (
|
||||||
<div className = 'smiley-input'>
|
<div className = 'smiley-input'>
|
||||||
<div id = 'smileysarea'>
|
<div id = 'smileysarea'>
|
||||||
<div id = 'smileys'>
|
<div id = 'smileys'>
|
||||||
|
@ -132,11 +140,13 @@ class ChatInput extends Component<Props, State> {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className = { smileysPanelClassName }>
|
<div
|
||||||
|
className = { smileysPanelClassName } >
|
||||||
<SmileysPanel
|
<SmileysPanel
|
||||||
onSmileySelect = { this._onSmileySelect } />
|
onSmileySelect = { this._onSmileySelect } />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
) }
|
||||||
<div className = 'usrmsg-form'>
|
<div className = 'usrmsg-form'>
|
||||||
<TextareaAutosize
|
<TextareaAutosize
|
||||||
autoComplete = 'off'
|
autoComplete = 'off'
|
||||||
|
@ -336,4 +346,19 @@ class ChatInput extends Component<Props, State> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default translate(connect()(ChatInput));
|
/**
|
||||||
|
* Function that maps parts of Redux state tree into component props.
|
||||||
|
*
|
||||||
|
* @param {Object} state - Redux state.
|
||||||
|
* @private
|
||||||
|
* @returns {{
|
||||||
|
* _areSmileysDisabled: boolean
|
||||||
|
* }}
|
||||||
|
*/
|
||||||
|
const mapStateToProps = state => {
|
||||||
|
return {
|
||||||
|
_areSmileysDisabled: areSmileysDisabled(state)
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export default translate(connect(mapStateToProps)(ChatInput));
|
||||||
|
|
|
@ -90,3 +90,15 @@ export function getUnreadMessagesCount(state: Object) {
|
||||||
|
|
||||||
return nbUnreadMessages;
|
return nbUnreadMessages;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get whether the chat smileys are disabled or not.
|
||||||
|
*
|
||||||
|
* @param {Object} state - The redux state.
|
||||||
|
* @returns {boolean} The disabled flag.
|
||||||
|
*/
|
||||||
|
export function areSmileysDisabled(state: Object) {
|
||||||
|
const disableChatSmileys = state['features/base/config']?.disableChatSmileys === true;
|
||||||
|
|
||||||
|
return disableChatSmileys;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue