From c5641a566db5ddf4e16f1fb9666c52c5357b4cb2 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 1 Jan 2021 14:06:12 -0600 Subject: [PATCH] Admin: add link to moderation log within reports --- app/soapbox/features/admin/moderation_log.js | 2 +- app/soapbox/features/admin/reports.js | 14 ++++++- .../features/ui/components/better_column.js | 38 +++++++++++++++++ app/styles/components/columns.scss | 41 +++++++++++++++++++ 4 files changed, 92 insertions(+), 3 deletions(-) create mode 100644 app/soapbox/features/ui/components/better_column.js diff --git a/app/soapbox/features/admin/moderation_log.js b/app/soapbox/features/admin/moderation_log.js index f9b34de2b..e84fd6ed6 100644 --- a/app/soapbox/features/admin/moderation_log.js +++ b/app/soapbox/features/admin/moderation_log.js @@ -39,7 +39,7 @@ class ModerationLog extends ImmutablePureComponent { const showLoading = isLoading && items.count() === 0; return ( - + { + const { intl } = this.props; + + return [{ + text: intl.formatMessage(messages.modlog), + to: '/admin/log', + }]; + } + componentDidMount() { const { dispatch } = this.props; dispatch(fetchReports()) @@ -50,7 +60,7 @@ class Reports extends ImmutablePureComponent { const showLoading = isLoading && reports.count() === 0; return ( - + +
+ + {menu && ( +
+ +
+ )} + +
+ {children} + + ); + } + +} diff --git a/app/styles/components/columns.scss b/app/styles/components/columns.scss index a2f430538..a48fb87d5 100644 --- a/app/styles/components/columns.scss +++ b/app/styles/components/columns.scss @@ -726,3 +726,44 @@ margin-right: 8px; } } + +.column--better { + .column__top { + display: flex; + align-items: center; + } + + .column-header { + margin-right: auto; + } + + .column__menu { + display: flex; + align-items: center; + justify-content: center; + + &, + > div, + button { + height: 100%; + } + + button { + padding: 0 15px; + + > div { + display: flex; + align-items: center; + justify-content: center; + } + } + } + + .column-back-button--slim { + &-button { + position: relative; + top: auto; + right: auto; + } + } +}