mirror of
https://github.com/mattermost/mattermost.git
synced 2026-05-28 04:35:04 -04:00
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:
parent
70fe2abea6
commit
d1557271f1
11 changed files with 2 additions and 22 deletions
|
|
@ -114,7 +114,6 @@ exports[`admin_console/team_channel_settings/channel/ChannelProfile should match
|
|||
/>
|
||||
<br />
|
||||
<SharedChannelIndicator
|
||||
channelType="O"
|
||||
className="shared-channel-icon"
|
||||
/>
|
||||
<MemoizedFormattedMessage
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -79,7 +79,6 @@ const ChannelHeaderTitle = ({
|
|||
sharedIcon = (
|
||||
<SharedChannelIndicator
|
||||
className='shared-channel-icon'
|
||||
channelType={channel.type}
|
||||
withTooltip={true}
|
||||
/>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -139,7 +139,6 @@ const Member = ({className, channel, member, index, totalUsers, editing, actions
|
|||
(
|
||||
<SharedIcon>
|
||||
<SharedChannelIndicator
|
||||
channelType={'O'}
|
||||
withTooltip={true}
|
||||
/>
|
||||
</SharedIcon>
|
||||
|
|
|
|||
|
|
@ -144,7 +144,6 @@ const FormattedOption = (props: ChannelOption & {className: string; isSingleValu
|
|||
const sharedIcon = details.shared ? (
|
||||
<SharedChannelIndicator
|
||||
className='shared-channel-icon'
|
||||
channelType={details.type}
|
||||
/>
|
||||
) : null;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue