From 4abe6037bbc57bba77b0ceb9014595e37f9d1710 Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Mon, 1 Feb 2016 19:37:07 +0500 Subject: Fixing system console and changing swapping icon with reply icon --- web/react/components/admin_console/analytics.jsx | 20 +++++++----- web/react/components/post_info.jsx | 41 +++++++++++------------- web/react/components/search_results_item.jsx | 2 +- web/sass-files/sass/partials/_post.scss | 4 +-- web/sass-files/sass/partials/_responsive.scss | 40 +++++++++++------------ 5 files changed, 53 insertions(+), 54 deletions(-) (limited to 'web') diff --git a/web/react/components/admin_console/analytics.jsx b/web/react/components/admin_console/analytics.jsx index ff5903c62..a22c26c34 100644 --- a/web/react/components/admin_console/analytics.jsx +++ b/web/react/components/admin_console/analytics.jsx @@ -104,10 +104,12 @@ export default class Analytics extends React.Component { let content; if (this.props.postCountsDay.labels.length === 0) { content = ( - +
+ +
); } else { content = ( @@ -153,10 +155,12 @@ export default class Analytics extends React.Component { let content; if (this.props.userCountsWithPostsDay.labels.length === 0) { content = ( - +
+ +
); } else { content = ( diff --git a/web/react/components/post_info.jsx b/web/react/components/post_info.jsx index 73b47024c..2bff675a9 100644 --- a/web/react/components/post_info.jsx +++ b/web/react/components/post_info.jsx @@ -22,26 +22,6 @@ export default class PostInfo extends React.Component { this.handlePermalinkCopy = this.handlePermalinkCopy.bind(this); } - createReplyLink() { - if (this.props.allowReply === 'true') { - var hideReply = ''; - - if (this.props.commentCount >= 1) { - hideReply = ' post__reply--hide'; - } - - return ( -
- - - -
- ); - } - } createDropdown() { var post = this.props.post; var isOwner = UserStore.getCurrentId() === post.user_id; @@ -62,6 +42,23 @@ export default class PostInfo extends React.Component { dataComments = this.props.commentCount; } + if (this.props.allowReply === 'true') { + dropdownContents.push( +
  • + + {'Reply'} + +
  • + ); + } + dropdownContents.push(
  • {commentCountText} @@ -184,7 +181,6 @@ export default class PostInfo extends React.Component { } var dropdown = this.createDropdown(); - var replyLink = this.createReplyLink(); const permalink = TeamStore.getCurrentTeamUrl() + '/pl/' + post.id; const copyButtonText = this.state.copiedLink ? (
    {'Copy '}
    ) : 'Copy'; @@ -227,7 +223,6 @@ export default class PostInfo extends React.Component { />
  • - {replyLink}
  • diff --git a/web/sass-files/sass/partials/_post.scss b/web/sass-files/sass/partials/_post.scss index 1f7a55cd0..be85ef07b 100644 --- a/web/sass-files/sass/partials/_post.scss +++ b/web/sass-files/sass/partials/_post.scss @@ -597,7 +597,7 @@ body.ios { position: absolute; right: 0; top: 30px; - width: 85px; + width: 65px; white-space: nowrap; } @@ -666,7 +666,7 @@ body.ios { word-wrap: break-word; padding: 0.2em 0.5em 0em; @include legacy-pie-clearfix; - width: calc(100% - 95px); + width: calc(100% - 75px); p { margin: 0 0 0.4em; diff --git a/web/sass-files/sass/partials/_responsive.scss b/web/sass-files/sass/partials/_responsive.scss index a37974c7a..832481cc5 100644 --- a/web/sass-files/sass/partials/_responsive.scss +++ b/web/sass-files/sass/partials/_responsive.scss @@ -72,23 +72,19 @@ } - .post { - - .post-list__content & { +} - &:hover { - background: transparent; - } +@media screen and (max-width: 768px) { - .comment-icon__container { - visibility: hidden; - } + .signup-team__container { + font-size: 1em; + } - } + .date-separator.hovered--after:before, .new-separator.hovered--after:before { + background: none !important; + } - .dropdown, .post__reply { - visibility: visible; - } + .post { .post__dropdown { line-height: 9px; @@ -106,17 +102,21 @@ } - } + .post-list__content & { -} + &:hover { + background: transparent; + } -@media screen and (max-width: 768px) { + .comment-icon__container { + visibility: visible; + } - .signup-team__container { - font-size: 1em; - } + } - .post { + .dropdown, .post__reply { + visibility: visible; + } .post__body { width: calc(100% - 75px); -- cgit v1.2.3-1-g7c22