From 40ef46dbeff676827d1ba3483f9f6f72b17bca89 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 21 May 2018 17:33:20 +0200 Subject: Display only domain of report account if remote under comment (#7574) --- app/views/admin/reports/show.html.haml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/admin/reports/show.html.haml b/app/views/admin/reports/show.html.haml index c9ebc0415..b13bb5303 100644 --- a/app/views/admin/reports/show.html.haml +++ b/app/views/admin/reports/show.html.haml @@ -75,7 +75,11 @@ .speech-bubble .speech-bubble__bubble= simple_format(@report.comment.presence || t('admin.reports.comment.none')) .speech-bubble__owner - = admin_account_link_to @report.account + - if @report.account.local? + = admin_account_link_to @report.account + - else + = @report.account.domain + %br/ %time.formatted{ datetime: @report.created_at.iso8601 } - unless @report.statuses.empty? -- cgit From 5ea643b27908b14bd89ff068fc87e446e8cbcd32 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 21 May 2018 17:49:10 +0200 Subject: Save onlyMedia prop when pinning column (#7575) --- .../mastodon/features/community_timeline/index.js | 13 +++++++++---- app/javascript/mastodon/features/public_timeline/index.js | 13 +++++++++---- .../mastodon/features/ui/components/columns_area.js | 3 ++- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/app/javascript/mastodon/features/community_timeline/index.js b/app/javascript/mastodon/features/community_timeline/index.js index 8ad114407..b6489432f 100644 --- a/app/javascript/mastodon/features/community_timeline/index.js +++ b/app/javascript/mastodon/features/community_timeline/index.js @@ -1,7 +1,7 @@ import React from 'react'; import { connect } from 'react-redux'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; -import { NavLink } from 'react-router-dom'; +import { NavLink, Link } from 'react-router-dom'; import PropTypes from 'prop-types'; import StatusListContainer from '../ui/containers/status_list_container'; import Column from '../../components/column'; @@ -37,12 +37,12 @@ export default class CommunityTimeline extends React.PureComponent { }; handlePin = () => { - const { columnId, dispatch } = this.props; + const { columnId, dispatch, onlyMedia } = this.props; if (columnId) { dispatch(removeColumn(columnId)); } else { - dispatch(addColumn('COMMUNITY', {})); + dispatch(addColumn('COMMUNITY', { other: { onlyMedia } })); } } @@ -83,7 +83,12 @@ export default class CommunityTimeline extends React.PureComponent { const { intl, hasUnread, columnId, multiColumn, onlyMedia } = this.props; const pinned = !!columnId; - const headline = ( + const headline = pinned ? ( +
+ + +
+ ) : (
diff --git a/app/javascript/mastodon/features/public_timeline/index.js b/app/javascript/mastodon/features/public_timeline/index.js index 54904c5cf..da59b7167 100644 --- a/app/javascript/mastodon/features/public_timeline/index.js +++ b/app/javascript/mastodon/features/public_timeline/index.js @@ -1,7 +1,7 @@ import React from 'react'; import { connect } from 'react-redux'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; -import { NavLink } from 'react-router-dom'; +import { NavLink, Link } from 'react-router-dom'; import PropTypes from 'prop-types'; import StatusListContainer from '../ui/containers/status_list_container'; import Column from '../../components/column'; @@ -37,12 +37,12 @@ export default class PublicTimeline extends React.PureComponent { }; handlePin = () => { - const { columnId, dispatch } = this.props; + const { columnId, dispatch, onlyMedia } = this.props; if (columnId) { dispatch(removeColumn(columnId)); } else { - dispatch(addColumn('PUBLIC', {})); + dispatch(addColumn('PUBLIC', { other: { onlyMedia } })); } } @@ -83,7 +83,12 @@ export default class PublicTimeline extends React.PureComponent { const { intl, columnId, hasUnread, multiColumn, onlyMedia } = this.props; const pinned = !!columnId; - const headline = ( + const headline = pinned ? ( +
+ + +
+ ) : (
diff --git a/app/javascript/mastodon/features/ui/components/columns_area.js b/app/javascript/mastodon/features/ui/components/columns_area.js index 0a62cbbeb..3ab867b5a 100644 --- a/app/javascript/mastodon/features/ui/components/columns_area.js +++ b/app/javascript/mastodon/features/ui/components/columns_area.js @@ -175,10 +175,11 @@ export default class ColumnsArea extends ImmutablePureComponent {
{columns.map(column => { const params = column.get('params', null) === null ? null : column.get('params').toJS(); + const other = params && params.other ? params.other : {}; return ( - {SpecificComponent => } + {SpecificComponent => } ); })} -- cgit