Report modal style fix, chat updates, statusserializer revert, display name truncation
This commit is contained in:
mgabdev
2020-12-20 12:27:24 -05:00
parent 7ec426e3d8
commit 67eb9d5890
49 changed files with 369 additions and 158 deletions

View File

@@ -35,7 +35,6 @@ class ChatConversationExpirationOptionsPopover extends React.PureComponent {
isXS,
} = this.props
console.log("expiresAtValue:", expiresAtValue)
if (!chatConversationId) return <div/>
const listItems = [

View File

@@ -6,6 +6,7 @@ import { connect } from 'react-redux'
import { closePopover } from '../../actions/popover'
import { openModal } from '../../actions/modal'
import { hideChatConversation } from '../../actions/chat_conversations'
import { setChatConversationSelected } from '../../actions/chats'
import {
muteChatConversation,
unmuteChatConversation,
@@ -107,6 +108,7 @@ const mapDispatchToProps = (dispatch, { chatConversationId }) => ({
},
onHide() {
dispatch(hideChatConversation(chatConversationId))
dispatch(setChatConversationSelected(null))
},
onMute() {
dispatch(muteChatConversation(chatConversationId))

View File

@@ -0,0 +1,54 @@
import React from 'react'
import PropTypes from 'prop-types'
import PopoverLayout from './popover_layout'
import List from '../list'
class ChatSettingsPopover extends React.PureComponent {
handleOnClosePopover = () => {
this.props.onClose()
}
render() {
const { intl, isXS } = this.props
return (
<PopoverLayout width={240} isXS={isXS}>
<List
size={isXS ? 'large' : 'small'}
scrollKey='profile_options'
items={[
{
title: 'Preferences',
to: '/messages/settings',
onClick: () => this.handleOnClosePopover(),
},
{
title: 'Message Requests',
to: '/messages/requests',
onClick: () => this.handleOnClosePopover(),
},
{
title: 'Blocked Chat Messengers',
to: '/messages/blocks',
onClick: () => this.handleOnClosePopover(),
},
{
title: 'Muted Conversations',
to: '/messages/muted_conversations',
onClick: () => this.handleOnClosePopover(),
},
]}
/>
</PopoverLayout>
)
}
}
ChatSettingsPopover.propTypes = {
onClose: PropTypes.func.isRequired,
isXS: PropTypes.bool,
}
export default ChatSettingsPopover

View File

@@ -70,7 +70,7 @@ class DatePickerPopover extends React.PureComponent {
<div className={[_s.d, _s.aiCenter, _s.flexRow, _s.px10, _s.py10, _s.borderTop1PX, _s.borderColorSecondary].join(' ')}>
<Text size='extraSmall' color='secondary'>
<FormattedMessage id='scheduled_for_datetime' defaultMessage='Scheduled for {datetime}' values={{
datetime: moment.utc(date).format('lll'),
datetime: moment(date).format('lll'),
}}/>
</Text>
<div className={_s.mlAuto}>

View File

@@ -3,6 +3,7 @@ import {
POPOVER_CHAT_CONVERSATION_EXPIRATION_OPTIONS,
POPOVER_CHAT_CONVERSATION_OPTIONS,
POPOVER_CHAT_MESSAGE_OPTIONS,
POPOVER_CHAT_SETTINGS,
POPOVER_COMMENT_SORTING_OPTIONS,
POPOVER_COMPOSE_POST_DESTINATION,
POPOVER_DATE_PICKER,
@@ -27,6 +28,7 @@ import {
ChatConversationExpirationOptionsPopover,
ChatConversationOptionsPopover,
ChatMessageOptionsPopover,
ChatSettingsPopover,
CommentSortingOptionsPopover,
ComposePostDesinationPopover,
DatePickerPopover,
@@ -65,6 +67,7 @@ const POPOVER_COMPONENTS = {
[POPOVER_CHAT_CONVERSATION_EXPIRATION_OPTIONS]: ChatConversationExpirationOptionsPopover,
[POPOVER_CHAT_CONVERSATION_OPTIONS]: ChatConversationOptionsPopover,
[POPOVER_CHAT_MESSAGE_OPTIONS]: ChatMessageOptionsPopover,
[POPOVER_CHAT_SETTINGS]: ChatSettingsPopover,
[POPOVER_COMMENT_SORTING_OPTIONS]: CommentSortingOptionsPopover,
[POPOVER_COMPOSE_POST_DESTINATION]: ComposePostDesinationPopover,
[POPOVER_DATE_PICKER]: DatePickerPopover,
@@ -161,7 +164,7 @@ class PopoverRoot extends React.PureComponent {
renderDelay={150}
>
{
(Component) => <Component innerRef={this.setRef} isXS={isXS} {...props} />
(Component) => <Component innerRef={this.setRef} isXS={isXS} onClose={onClose} {...props} />
}
</Bundle>
}