Remove lock from shared channels indicator (#28132)

* remove lock from shared channels indicator

* remove import

* remove channelType

* remove channel type after merging

* update snapshot

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
Scott Bishel 2024-09-12 11:26:27 -06:00 committed by GitHub
parent 70fe2abea6
commit d1557271f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 2 additions and 22 deletions

View file

@ -114,7 +114,6 @@ exports[`admin_console/team_channel_settings/channel/ChannelProfile should match
/>
<br />
<SharedChannelIndicator
channelType="O"
className="shared-channel-icon"
/>
<MemoizedFormattedMessage

View file

@ -39,7 +39,6 @@ export const ChannelProfile = (props: ChannelProfileProps): JSX.Element => {
<br/>
<SharedChannelIndicator
className='shared-channel-icon'
channelType={channel.type}
/>
<FormattedMessage
id='admin.channel_settings.channel_detail.channelOrganizationsMessage'

View file

@ -988,7 +988,6 @@ exports[`admin_console/team_channel_settings/channel/ChannelList should match sn
DN
</span>
<SharedChannelIndicator
channelType="O"
className="channel-icon"
withTooltip={true}
/>

View file

@ -206,7 +206,6 @@ export default class ChannelList extends React.PureComponent<ChannelListProps, C
const sharedChannelIcon = channel.shared ? (
<SharedChannelIndicator
className='channel-icon'
channelType={channel.type}
withTooltip={true}
/>
) : null;

View file

@ -79,7 +79,6 @@ const ChannelHeaderTitle = ({
sharedIcon = (
<SharedChannelIndicator
className='shared-channel-icon'
channelType={channel.type}
withTooltip={true}
/>
);

View file

@ -139,7 +139,6 @@ const Member = ({className, channel, member, index, totalUsers, editing, actions
(
<SharedIcon>
<SharedChannelIndicator
channelType={'O'}
withTooltip={true}
/>
</SharedIcon>

View file

@ -144,7 +144,6 @@ const FormattedOption = (props: ChannelOption & {className: string; isSingleValu
const sharedIcon = details.shared ? (
<SharedChannelIndicator
className='shared-channel-icon'
channelType={details.type}
/>
) : null;

View file

@ -201,7 +201,6 @@ export class SearchableChannelList extends React.PureComponent<Props, State> {
const sharedChannelIcon = channel.shared ? (
<SharedChannelIndicator
className='shared-channel-icon'
channelType={channel.type}
withTooltip={true}
/>
) : null;

View file

@ -4,25 +4,15 @@
import React from 'react';
import {FormattedMessage} from 'react-intl';
import type {ChannelType} from '@mattermost/types/channels';
import WithTooltip from 'components/with_tooltip';
import {Constants} from 'utils/constants';
type Props = {
className?: string;
channelType: ChannelType;
withTooltip?: boolean;
};
const SharedChannelIndicator: React.FC<Props> = (props: Props): JSX.Element => {
let sharedIcon;
if (props.channelType === Constants.PRIVATE_CHANNEL) {
sharedIcon = (<i className={`${props.className || ''} icon-circle-multiple-outline-lock`}/>);
} else {
sharedIcon = (<i className={`${props.className || ''} icon-circle-multiple-outline`}/>);
}
const sharedIcon = (<i className={`${props.className || ''} icon-circle-multiple-outline`}/>);
if (!props.withTooltip) {
return sharedIcon;

View file

@ -228,7 +228,6 @@ export default class SidebarChannelLink extends React.PureComponent<Props, State
const sharedChannelIcon = this.props.isSharedChannel ? (
<SharedChannelIndicator
className='icon'
channelType={channel.type}
withTooltip={true}
/>
) : null;

View file

@ -6,7 +6,7 @@ import React from 'react';
import {defineMessages} from 'react-intl';
import {connect, useSelector} from 'react-redux';
import type {Channel, ChannelMembership, ChannelType} from '@mattermost/types/channels';
import type {Channel, ChannelMembership} from '@mattermost/types/channels';
import type {PreferenceType} from '@mattermost/types/preferences';
import type {Team} from '@mattermost/types/teams';
import type {UserProfile} from '@mattermost/types/users';
@ -243,7 +243,6 @@ const SwitchChannelSuggestion = React.forwardRef<HTMLDivElement, Props>((props,
sharedIcon = (
<SharedChannelIndicator
className='shared-channel-icon'
channelType={channel.type as ChannelType}
/>
);
}