PLT-3506 Added flagged posts functionality (#3679)
* Added flagged posts functionality * UI Improvements to flags (#3697) * Added flag functionality for mobile * Updating flagged text (#3699) * Add back button to RHS thread when coming from flagged posts * Updating position of flags (#3708) * Plt 3506 - Reverting flag position (#3724) * Revert "Updating position of flags (#3708)" This reverts commit aaa05632c5d9eda35a048300a5bd7e99584c5b58. * Fixing the icon in search * Help text and white space improvements (#3730) * Updatng help text and some white spacing. * Updating help text
Этот коммит содержится в:
коммит произвёл
enahum
родитель
9b50b50283
Коммит
0184d6059b
@@ -4,7 +4,9 @@
|
||||
import AppDispatcher from '../dispatcher/app_dispatcher.jsx';
|
||||
import Constants from 'utils/constants.jsx';
|
||||
import {Tooltip, OverlayTrigger} from 'react-bootstrap';
|
||||
|
||||
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||
import {getFlaggedPosts} from 'actions/post_actions.jsx';
|
||||
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
|
||||
@@ -34,17 +36,21 @@ export default class RhsHeaderPost extends React.Component {
|
||||
handleBack(e) {
|
||||
e.preventDefault();
|
||||
|
||||
AppDispatcher.handleServerAction({
|
||||
type: ActionTypes.RECEIVED_SEARCH_TERM,
|
||||
term: this.props.fromSearch,
|
||||
do_search: true,
|
||||
is_mention_search: this.props.isMentionSearch
|
||||
});
|
||||
if (this.props.fromSearch) {
|
||||
AppDispatcher.handleServerAction({
|
||||
type: ActionTypes.RECEIVED_SEARCH_TERM,
|
||||
term: this.props.fromSearch,
|
||||
do_search: true,
|
||||
is_mention_search: this.props.isMentionSearch
|
||||
});
|
||||
|
||||
AppDispatcher.handleServerAction({
|
||||
type: ActionTypes.RECEIVED_POST_SELECTED,
|
||||
postId: null
|
||||
});
|
||||
AppDispatcher.handleServerAction({
|
||||
type: ActionTypes.RECEIVED_POST_SELECTED,
|
||||
postId: null
|
||||
});
|
||||
} else if (this.props.fromFlaggedPosts) {
|
||||
getFlaggedPosts();
|
||||
}
|
||||
}
|
||||
render() {
|
||||
let back;
|
||||
@@ -57,14 +63,26 @@ export default class RhsHeaderPost extends React.Component {
|
||||
</Tooltip>
|
||||
);
|
||||
|
||||
const backToResultsTooltip = (
|
||||
<Tooltip id='backToResultsTooltip'>
|
||||
<FormattedMessage
|
||||
id='rhs_header.backToResultsTooltip'
|
||||
defaultMessage='Back to Search Results'
|
||||
/>
|
||||
</Tooltip>
|
||||
);
|
||||
let backToResultsTooltip;
|
||||
if (this.props.fromSearch) {
|
||||
backToResultsTooltip = (
|
||||
<Tooltip id='backToResultsTooltip'>
|
||||
<FormattedMessage
|
||||
id='rhs_header.backToResultsTooltip'
|
||||
defaultMessage='Back to Search Results'
|
||||
/>
|
||||
</Tooltip>
|
||||
);
|
||||
} else if (this.props.fromFlaggedPosts) {
|
||||
backToResultsTooltip = (
|
||||
<Tooltip id='backToResultsTooltip'>
|
||||
<FormattedMessage
|
||||
id='rhs_header.backToFlaggedTooltip'
|
||||
defaultMessage='Back to Flagged Posts'
|
||||
/>
|
||||
</Tooltip>
|
||||
);
|
||||
}
|
||||
|
||||
const expandSidebarTooltip = (
|
||||
<Tooltip id='expandSidebarTooltip'>
|
||||
@@ -84,7 +102,7 @@ export default class RhsHeaderPost extends React.Component {
|
||||
</Tooltip>
|
||||
);
|
||||
|
||||
if (this.props.fromSearch) {
|
||||
if (this.props.fromSearch || this.props.fromFlaggedPosts) {
|
||||
back = (
|
||||
<a
|
||||
href='#'
|
||||
@@ -161,6 +179,7 @@ RhsHeaderPost.defaultProps = {
|
||||
RhsHeaderPost.propTypes = {
|
||||
isMentionSearch: React.PropTypes.bool,
|
||||
fromSearch: React.PropTypes.string,
|
||||
fromFlaggedPosts: React.PropTypes.bool,
|
||||
toggleSize: React.PropTypes.function,
|
||||
shrink: React.PropTypes.function
|
||||
};
|
||||
|
||||
Ссылка в новой задаче
Block a user