From 04bbc576906ff70feed7d42fef0e6db17fdd9ed3 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 19 Oct 2016 18:20:19 +0200 Subject: Fix #100 - Add "back" button to certain views Also fix reloading of timelines after merge-type events --- .../components/features/account/components/header.jsx | 6 +++--- .../javascripts/components/features/account/index.jsx | 2 ++ .../javascripts/components/features/status/index.jsx | 18 ++++++++++++------ 3 files changed, 17 insertions(+), 9 deletions(-) (limited to 'app/assets/javascripts/components/features') diff --git a/app/assets/javascripts/components/features/account/components/header.jsx b/app/assets/javascripts/components/features/account/components/header.jsx index 681b30ca8..d794a0aaf 100644 --- a/app/assets/javascripts/components/features/account/components/header.jsx +++ b/app/assets/javascripts/components/features/account/components/header.jsx @@ -26,16 +26,16 @@ const Header = React.createClass({ return (
-
+
-
+
{displayName}
- @{account.get('acct')} + @{account.get('acct')}

{account.get('note')}

{info} diff --git a/app/assets/javascripts/components/features/account/index.jsx b/app/assets/javascripts/components/features/account/index.jsx index 22e02ff54..83770eb74 100644 --- a/app/assets/javascripts/components/features/account/index.jsx +++ b/app/assets/javascripts/components/features/account/index.jsx @@ -18,6 +18,7 @@ import { import LoadingIndicator from '../../components/loading_indicator'; import ActionBar from './components/action_bar'; import Column from '../ui/components/column'; +import ColumnBackButton from '../../components/column_back_button'; const mapStateToProps = (state, props) => ({ account: getAccount(state, Number(props.params.accountId)), @@ -74,6 +75,7 @@ const Account = React.createClass({ return ( +
diff --git a/app/assets/javascripts/components/features/status/index.jsx b/app/assets/javascripts/components/features/status/index.jsx index cc7a2bfeb..c51fb5d31 100644 --- a/app/assets/javascripts/components/features/status/index.jsx +++ b/app/assets/javascripts/components/features/status/index.jsx @@ -16,6 +16,8 @@ import { getStatusAncestors, getStatusDescendants } from '../../selectors'; +import { ScrollContainer } from 'react-router-scroll'; +import ColumnBackButton from '../../components/column_back_button'; const mapStateToProps = (state, props) => ({ status: getStatus(state, Number(props.params.statusId)), @@ -81,14 +83,18 @@ const Status = React.createClass({ return ( -
-
{this.renderChildren(ancestors)}
+ - - + +
+
{this.renderChildren(ancestors)}
-
{this.renderChildren(descendants)}
-
+ + + +
{this.renderChildren(descendants)}
+
+
); } -- cgit