From 2e0a781a5b6821788668a7d6b0f90a224bba8483 Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Wed, 30 Dec 2020 12:26:55 -0500 Subject: [PATCH] Added option in GroupOptinosPopover to open group in Gab admin panel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Added: - option in GroupOptinosPopover to open group in Gab admin panel --- .../components/popover/group_options_popover.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/javascript/gabsocial/components/popover/group_options_popover.js b/app/javascript/gabsocial/components/popover/group_options_popover.js index a77f94aa..579c13d7 100644 --- a/app/javascript/gabsocial/components/popover/group_options_popover.js +++ b/app/javascript/gabsocial/components/popover/group_options_popover.js @@ -4,6 +4,7 @@ import { connect } from 'react-redux' import ImmutablePureComponent from 'react-immutable-pure-component' import ImmutablePropTypes from 'react-immutable-proptypes' import { defineMessages, injectIntl } from 'react-intl' +import { isStaff } from '../../initial_state' import { addShortcut, removeShortcut, @@ -91,6 +92,14 @@ class GroupOptionsPopover extends ImmutablePureComponent { onClick: this.handleOnToggleShortcut, }) + if (isStaff) { + listItems.push({}) + listItems.push({ + title: intl.formatMessage(messages.open_in_admin, { name: group.getIn('title') }), + href: `/admin/groups/${groupId}` + }) + } + return ( {