* Remove guest badge

* Address feedback

* Fix lint, test and i18n

* Fix test
Этот коммит содержится в:
Daniel Espino García
2023-06-30 11:06:18 +02:00
коммит произвёл GitHub
родитель 05cd245e97
Коммит fda5dd8468
18 изменённых файлов: 66 добавлений и 22 удалений

Просмотреть файл

@@ -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',
};
};
}