mattermost-mobile/app/components/deleted_post.js
Miguel Alatzar 57d60649f8
[MM-22959] Use Compass icons (#4847)
* Use Compass icons

* Update ChannelInfo and AdvancedSettings

* Fix search modifiers

* Fix Autocomplete item

* Remove VectorIcon component

* Unlink react-native-vector-icons

* Revert ProgressiveImage changes

* Update Mark as Unread icon

* Apply review suggestion

* Replace extension icons

* Update video control button style

* Replace (un)flag with (un)save

* Replace (un)flag with (un)save - take 2

* Use bookmark-outline icon

Co-authored-by: Miguel Alatzar <miguel@Miguels-MacBook-Pro.local>
2020-10-15 15:34:24 -07:00

82 lines
No EOL
2.6 KiB
JavaScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React, {PureComponent} from 'react';
import {View} from 'react-native';
import PropTypes from 'prop-types';
import CompassIcon from '@components/compass_icon';
import FormattedText from '@components/formatted_text';
import {changeOpacity, makeStyleSheetFromTheme} from '@utils/theme';
import {ViewTypes} from '@constants';
class DeletedPost extends PureComponent {
static propTypes = {
theme: PropTypes.object.isRequired,
};
render() {
const {theme} = this.props;
const style = getStyleSheet(theme);
return (
<View style={style.main}>
<View style={style.iconContainer}>
<CompassIcon
name='mattermost'
color={theme.centerChannelColor}
size={ViewTypes.PROFILE_PICTURE_SIZE}
/>
</View>
<View style={style.textContainer}>
<FormattedText
id='post_info.system'
defaultMessage='System'
style={style.displayName}
/>
<View style={style.messageContainer}>
<FormattedText
id='rhs_thread.rootPostDeletedMessage.body'
defaultMessage='Part of this thread has been deleted due to a data retention policy. You can no longer reply to this thread.'
style={style.message}
/>
</View>
</View>
</View>
);
}
}
const getStyleSheet = makeStyleSheetFromTheme((theme) => {
const stdPadding = 12;
return {
main: {
flexDirection: 'row',
paddingTop: stdPadding,
},
iconContainer: {
paddingRight: stdPadding,
paddingLeft: stdPadding,
width: (stdPadding * 2) + ViewTypes.PROFILE_PICTURE_SIZE,
},
textContainer: {
paddingBottom: 10,
flex: 1,
marginRight: stdPadding,
},
messageContainer: {
marginTop: 3,
},
displayName: {
color: theme.centerChannelColor,
fontSize: 15,
fontWeight: '600',
},
message: {
color: changeOpacity(theme.centerChannelColor, 0.8),
fontSize: 15,
lineHeight: 22,
},
};
});
export default DeletedPost;