feat(chat) Redesign chat

Move some styles from SCSS to JSS
Convert some files to TS
Implement redesign
This commit is contained in:
robertpin
2023-01-17 12:36:01 +02:00
committed by Saúl Ibarra Corretgé
parent e3166e6faa
commit 8e1d96cc48
18 changed files with 507 additions and 508 deletions

View File

@@ -2,14 +2,15 @@
import React, { Component } from 'react';
import { CHAT_ENABLED, getFeatureFlag } from '../../../base/flags';
import { translate } from '../../../base/i18n';
import { IconMessage } from '../../../base/icons';
import { getParticipantById } from '../../../base/participants';
import { connect } from '../../../base/redux';
import ContextMenuItem from '../../../base/ui/components/web/ContextMenuItem';
import { openChat } from '../../../chat/';
import {
type Props as AbstractProps,
_mapStateToProps as _abstractMapStateToProps
type Props as AbstractProps
} from '../../../chat/components/web/PrivateMessageButton';
import { isButtonEnabled } from '../../../toolbox/functions.web';
@@ -85,8 +86,12 @@ class PrivateMessageMenuButton extends Component<Props> {
* @returns {Props}
*/
function _mapStateToProps(state: Object, ownProps: Props): $Shape<Props> {
const enabled = getFeatureFlag(state, CHAT_ENABLED, true);
const { visible = enabled } = ownProps;
return {
..._abstractMapStateToProps(state, ownProps),
_participant: getParticipantById(state, ownProps.participantID),
visible,
_hidden: typeof interfaceConfig !== 'undefined'
&& (interfaceConfig.DISABLE_PRIVATE_MESSAGES || !isButtonEnabled('chat', state))
};