Skip to content

Commit

Permalink
Revert "Merge branch 'chore/contextual-bar-subcomponents' of github.c…
Browse files Browse the repository at this point in the history
…om:RocketChat/Rocket.Chat into chore/contextual-bar-subcomponents"

This reverts commit a750f68, reversing
changes made to b048d65.
  • Loading branch information
rique223 committed Jun 21, 2024
1 parent a750f68 commit 32a338a
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 22 deletions.
12 changes: 0 additions & 12 deletions apps/meteor/client/components/InfoPanel/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,3 @@ export default Object.assign(InfoPanel, {
Section: InfoPanelSection,
ActionGroup: InfoPanelActionGroup,
});

export {
InfoPanel,
InfoPanelTitle,
InfoPanelLabel,
InfoPanelText,
InfoPanelAvatar,
InfoPanelField,
InfoPanelAction,
InfoPanelSection,
InfoPanelActionGroup,
};
46 changes: 36 additions & 10 deletions apps/meteor/client/components/UserInfo/UserInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@ import { useTimeAgo } from '../../hooks/useTimeAgo';
import { useUserCustomFields } from '../../hooks/useUserCustomFields';
import { useUserDisplayName } from '../../hooks/useUserDisplayName';
import { ContextualbarScrollableContent } from '../Contextualbar';
import {
InfoPanel,
InfoPanelActionGroup,
InfoPanelAvatar,
InfoPanelField,
InfoPanelLabel,
InfoPanelSection,
InfoPanelText,
InfoPanelTitle,
} from '../InfoPanel';
import InfoPanel from '../InfoPanel';
import InfoPanelActionGroup from '../InfoPanel/InfoPanelActionGroup';
import InfoPanelAvatar from '../InfoPanel/InfoPanelAvatar';
import InfoPanelField from '../InfoPanel/InfoPanelField';
import InfoPanelLabel from '../InfoPanel/InfoPanelLabel';
import InfoPanelSection from '../InfoPanel/InfoPanelSection';
import InfoPanelText from '../InfoPanel/InfoPanelText';
import InfoPanelTitle from '../InfoPanel/InfoPanelTitle';
import MarkdownText from '../MarkdownText';
import UTCClock from '../UTCClock';
import { UserCardRoles } from '../UserCard';
Expand Down Expand Up @@ -134,6 +132,27 @@ const UserInfo = ({
</InfoPanelField>
)}

{roles.length !== 0 && (
<InfoPanel.Field>
<InfoPanel.Label>{t('Roles')}</InfoPanel.Label>
<UserCardRoles>{roles}</UserCardRoles>
</InfoPanel.Field>
)}

{username && username !== name && (
<InfoPanel.Field>
<InfoPanel.Label>{t('Username')}</InfoPanel.Label>
<InfoPanel.Text data-qa='UserInfoUserName'>{username}</InfoPanel.Text>
</InfoPanel.Field>
)}

{Number.isInteger(utcOffset) && (
<InfoPanel.Field>
<InfoPanel.Label>{t('Local_Time')}</InfoPanel.Label>
<InfoPanel.Text>{utcOffset && <UTCClock utcOffset={utcOffset} />}</InfoPanel.Text>
</InfoPanel.Field>
)}

{bio && (
<InfoPanelField>
<InfoPanelLabel>{t('Bio')}</InfoPanelLabel>
Expand All @@ -150,6 +169,13 @@ const UserInfo = ({
</InfoPanelField>
)}

{Number.isInteger(utcOffset) && canViewAllInfo && (
<InfoPanel.Field>
<InfoPanel.Label>{t('Last_login')}</InfoPanel.Label>
<InfoPanel.Text>{lastLogin ? timeAgo(lastLogin) : t('Never')}</InfoPanel.Text>
</InfoPanel.Field>
)}

{phone && (
<InfoPanelField>
<InfoPanelLabel>{t('Phone')}</InfoPanelLabel>
Expand Down

0 comments on commit 32a338a

Please sign in to comment.