Remove guest badge (#23825)
* Remove guest badge * Address feedback * Fix lint, test and i18n * Fix test
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
05cd245e97
Коммит
fda5dd8468
@@ -46,6 +46,7 @@ describe('components/ChannelHeader', () => {
|
||||
'minute',
|
||||
'hour',
|
||||
],
|
||||
hideGuestTags: false,
|
||||
};
|
||||
|
||||
const populatedProps = {
|
||||
|
||||
@@ -95,6 +95,7 @@ export type Props = {
|
||||
isLastActiveEnabled: boolean;
|
||||
timestampUnits?: string[];
|
||||
lastActivityTimestamp?: number;
|
||||
hideGuestTags: boolean;
|
||||
};
|
||||
|
||||
type State = {
|
||||
@@ -292,12 +293,13 @@ class ChannelHeader extends React.PureComponent<Props, State> {
|
||||
rhsState,
|
||||
hasGuests,
|
||||
teammateNameDisplaySetting,
|
||||
hideGuestTags,
|
||||
} = this.props;
|
||||
const {formatMessage} = this.props.intl;
|
||||
const ariaLabelChannelHeader = localizeMessage('accessibility.sections.channelHeader', 'channel header region');
|
||||
|
||||
let hasGuestsText: ReactNode = '';
|
||||
if (hasGuests) {
|
||||
if (hasGuests && !hideGuestTags) {
|
||||
hasGuestsText = (
|
||||
<span className='has-guest-header'>
|
||||
<span tabIndex={0}>
|
||||
@@ -399,7 +401,7 @@ class ChannelHeader extends React.PureComponent<Props, State> {
|
||||
);
|
||||
});
|
||||
|
||||
if (hasGuests) {
|
||||
if (hasGuests && !hideGuestTags) {
|
||||
hasGuestsText = (
|
||||
<span className='has-guest-header'>
|
||||
<FormattedMessage
|
||||
|
||||
@@ -116,6 +116,7 @@ function makeMapStateToProps() {
|
||||
isFileAttachmentsEnabled: isFileAttachmentsEnabled(config),
|
||||
isLastActiveEnabled,
|
||||
timestampUnits,
|
||||
hideGuestTags: config.HideGuestTags === 'true',
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user