diff --git a/webapp/channels/src/components/admin_console/system_users/system_users.tsx b/webapp/channels/src/components/admin_console/system_users/system_users.tsx index 4682e66ee38..13b1999cede 100644 --- a/webapp/channels/src/components/admin_console/system_users/system_users.tsx +++ b/webapp/channels/src/components/admin_console/system_users/system_users.tsx @@ -165,7 +165,10 @@ function SystemUsers(props: Props) { function handleRowClick(userId: UserReport['id']) { if (userId.length !== 0) { - history.push(`/admin_console/user_management/user/${userId}`); + const remoteID = userReports.find((userReport) => userReport.id === userId)?.remote_id; + if (!remoteID) { + history.push(`/admin_console/user_management/user/${userId}`); + } } } @@ -403,16 +406,21 @@ function SystemUsers(props: Props) { id: 'admin.system_users.list.actions', defaultMessage: 'Actions', }), - cell: (info: CellContext) => ( - updateUserReport(info.row.original.id, updatedUser)} - onError={(error) => updateUserReport(info.row.original.id, {error})} - /> - ), + cell: (info: CellContext) => { + if (info.row.original?.remote_id?.length) { + return (<>); + } + return ( + updateUserReport(info.row.original.id, updatedUser)} + onError={(error) => updateUserReport(info.row.original.id, {error})} + /> + ); + }, enableHiding: false, enablePinning: true, enableSorting: false, diff --git a/webapp/channels/src/components/admin_console/team_channel_settings/channel/list/__snapshots__/channel_list.test.tsx.snap b/webapp/channels/src/components/admin_console/team_channel_settings/channel/list/__snapshots__/channel_list.test.tsx.snap index 93173d48b1b..b1c7d2ec02c 100644 --- a/webapp/channels/src/components/admin_console/team_channel_settings/channel/list/__snapshots__/channel_list.test.tsx.snap +++ b/webapp/channels/src/components/admin_console/team_channel_settings/channel/list/__snapshots__/channel_list.test.tsx.snap @@ -979,8 +979,7 @@ exports[`admin_console/team_channel_settings/channel/ChannelList should match sn className="group-name overflow--ellipsis row-content" data-testid="channel-display-name" > - DN + , "team": - ); - } + const sharedChannelIcon = channel.shared ? ( + + ) : null; return { cells: { @@ -224,6 +223,7 @@ export default class ChannelList extends React.PureComponent {channel.display_name} + {sharedChannelIcon} ), team: ( diff --git a/webapp/channels/src/components/channel_members_dropdown/__snapshots__/channel_members_dropdown.test.tsx.snap b/webapp/channels/src/components/channel_members_dropdown/__snapshots__/channel_members_dropdown.test.tsx.snap index c08281ff0fc..642f10f4333 100644 --- a/webapp/channels/src/components/channel_members_dropdown/__snapshots__/channel_members_dropdown.test.tsx.snap +++ b/webapp/channels/src/components/channel_members_dropdown/__snapshots__/channel_members_dropdown.test.tsx.snap @@ -80,32 +80,7 @@ exports[`components/channel_members_dropdown should match snapshot for dropdown `; -exports[`components/channel_members_dropdown should match snapshot for dropdown with shared user 1`] = ` -
- - } - > - - - - - -
-`; +exports[`components/channel_members_dropdown should match snapshot for dropdown with shared user 1`] = ``; exports[`components/channel_members_dropdown should match snapshot for group_constrained channel 1`] = `
diff --git a/webapp/channels/src/components/channel_members_dropdown/channel_members_dropdown.tsx b/webapp/channels/src/components/channel_members_dropdown/channel_members_dropdown.tsx index 7c5b4ed4750..0aa5721576f 100644 --- a/webapp/channels/src/components/channel_members_dropdown/channel_members_dropdown.tsx +++ b/webapp/channels/src/components/channel_members_dropdown/channel_members_dropdown.tsx @@ -15,7 +15,6 @@ import LeaveChannelModal from 'components/leave_channel_modal'; import DropdownIcon from 'components/widgets/icons/fa_dropdown_icon'; import Menu from 'components/widgets/menu/menu'; import MenuWrapper from 'components/widgets/menu/menu_wrapper'; -import WithTooltip from 'components/with_tooltip'; import {Constants, ModalIdentifiers} from 'utils/constants'; import * as Utils from 'utils/utils'; @@ -154,28 +153,7 @@ export default function ChannelMembersDropdown({ const currentRole = renderRole(isChannelAdmin, isGuest); if (user.remote_id) { - return ( -
- - } - > - - - - - -
- ); + return (<>); } const canMakeUserChannelMember = canChangeMemberRoles && isChannelAdmin; diff --git a/webapp/channels/src/components/channel_members_rhs/member.tsx b/webapp/channels/src/components/channel_members_rhs/member.tsx index 10336d716f8..2218db728a5 100644 --- a/webapp/channels/src/components/channel_members_rhs/member.tsx +++ b/webapp/channels/src/components/channel_members_rhs/member.tsx @@ -16,6 +16,7 @@ import ChannelMembersDropdown from 'components/channel_members_dropdown'; import CustomStatusEmoji from 'components/custom_status/custom_status_emoji'; import ProfilePicture from 'components/profile_picture'; import ProfilePopover from 'components/profile_popover'; +import SharedChannelIndicator from 'components/shared_channel_indicator'; import GuestTag from 'components/widgets/tag/guest_tag'; import WithTooltip from 'components/with_tooltip'; @@ -85,6 +86,12 @@ const RoleChooser = styled.div` } `; +const SharedIcon = styled.span` + margin: 0 0 0 4px; + font-size: 16px; + line-height: 20px; +`; + interface Props { className?: string; channel: Channel; @@ -128,6 +135,15 @@ const Member = ({className, channel, member, index, totalUsers, editing, actions {member.displayName} {isGuest(member.user.roles) && } + {member.user.remote_id && + ( + + + + )} { member.displayName === member.user.username ? null : {'@'}{member.user.username} diff --git a/webapp/channels/src/i18n/en.json b/webapp/channels/src/i18n/en.json index 7c00fea7cab..a56353480cf 100644 --- a/webapp/channels/src/i18n/en.json +++ b/webapp/channels/src/i18n/en.json @@ -3154,7 +3154,6 @@ "channel_members_dropdown.make_channel_members": "Make Channel Members", "channel_members_dropdown.menuAriaLabel": "Change the role of channel member", "channel_members_dropdown.remove_from_channel": "Remove from Channel", - "channel_members_dropdown.shared_member": "Shared Member", "channel_members_modal.addNew": " Add Members", "channel_members_modal.members": " Members", "channel_members_rhs.action_bar.add_button": "Add",