diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js index f43dbb2fc..98953f194 100644 --- a/app/javascript/mastodon/components/status.js +++ b/app/javascript/mastodon/components/status.js @@ -298,14 +298,28 @@ class Status extends ImmutablePureComponent { renderChildren (list) { - return list.map(id => ( + return list.map(e => ( + e.id ? +
+ {}} + onMoveDown={()=>{}} + contextType='comments-timeline' + /> + { e.sonsIds && +
{this.renderChildren(e.sonsIds)}
+ } +
+ : {}} onMoveDown={()=>{}} contextType='comments-timeline' - /> + /> )); } diff --git a/app/javascript/mastodon/containers/status_container.js b/app/javascript/mastodon/containers/status_container.js index 6029a4d6d..3444e06c4 100644 --- a/app/javascript/mastodon/containers/status_container.js +++ b/app/javascript/mastodon/containers/status_container.js @@ -43,10 +43,16 @@ const makeMapStateToProps = () => { const getStatus = makeGetStatus(); const mapStateToProps = (state, props) => { - const status = getStatus(state, props); + const status = getStatus(state, props); + const sons = state.getIn(['contexts', 'replies', status.getIn(['reblog', 'id'], props.id)]); return ({ - status: getStatus(state, props), - sonsIds: props.showThread ? state.getIn(['contexts', 'replies', status.getIn(['reblog', 'id'], props.id)]) : null, + 'status': status, + 'sonsIds': (props.showThread && sons) ? sons.map(id => ({ + 'id': id, + 'sonsIds' : state.getIn(['contexts', 'replies', id]) + })) + : + null, }) } diff --git a/app/javascript/styles/closed-social/timeline_comments.scss b/app/javascript/styles/closed-social/timeline_comments.scss index c9e3f136c..8c77af6f4 100644 --- a/app/javascript/styles/closed-social/timeline_comments.scss +++ b/app/javascript/styles/closed-social/timeline_comments.scss @@ -7,6 +7,7 @@ transform: scale(0.85); transform-origin: 100% 0%; margin-bottom: -32px; + margin-right:8px; position: absolute; z-index:9; &:hover { @@ -15,13 +16,18 @@ mask-image: none; z-index:99; background: $tc-background; + box-shadow: $primary-text-color 3.2px 3.2px 8px; } &:active { max-height: none; -webkit-mask-image: none; mask-image: none; background: $tc-background; + box-shadow: $primary-text-color 3.2px 3.2px 8px; } + & .comments-timeline-2 { + margin-left:40px; + } } .comments-timeline__wrapper { diff --git a/app/javascript/styles/mastodon-light/variables.scss b/app/javascript/styles/mastodon-light/variables.scss index c68944528..4fb1f4bcd 100644 --- a/app/javascript/styles/mastodon-light/variables.scss +++ b/app/javascript/styles/mastodon-light/variables.scss @@ -28,6 +28,7 @@ $inverted-text-color: $black !default; $lighter-text-color: $classic-base-color !default; $light-text-color: #444b5d; +$tc-background: $white !default; //Newly added colors $account-background-color: $white !default; diff --git a/app/javascript/styles/mastodon/variables.scss b/app/javascript/styles/mastodon/variables.scss index c5928a733..44a3c52df 100644 --- a/app/javascript/styles/mastodon/variables.scss +++ b/app/javascript/styles/mastodon/variables.scss @@ -40,7 +40,7 @@ $lighter-text-color: $ui-base-lighter-color !default; $light-text-color: $ui-primary-color !default; //timeline comeents -$tc-background: lighten($ui-base-color, 8%) !default; +$tc-background: $classic-base-color !default; // Language codes that uses CJK fonts $cjk-langs: ja, ko, zh-CN, zh-HK, zh-TW;