dont show tool tip in mobile

This commit is contained in:
Roland Osborne 2023-04-13 16:50:00 -07:00
parent f8dd0ea5e8
commit a367cf6372
2 changed files with 15 additions and 3 deletions

View File

@ -74,7 +74,7 @@ export function Cards({ closeCards, openContact, openChannel, openListing }) {
renderItem={item => (
<CardItem item={item} enableIce={state.enableIce} tooltip={state.tooltip} resync={() => actions.resync(item.cardId)}
open={() => openContact(item.guid)} message={() => message(item.cardId)}
call={() => call(item)} />
call={() => call(item)} display={state.display} />
)} />
)}
{ state.cards.length === 0 && (

View File

@ -6,7 +6,7 @@ import { Logo } from 'logo/Logo';
import { Tooltip } from 'antd';
import { MessageOutlined, PhoneOutlined, ExclamationCircleOutlined } from '@ant-design/icons';
export function CardItem({ item, tooltip, enableIce, resync, open, call, message }) {
export function CardItem({ item, tooltip, enableIce, resync, open, call, message, display }) {
const onResync = (e) => {
e.stopPropagation();
@ -43,7 +43,19 @@ export function CardItem({ item, tooltip, enableIce, resync, open, call, message
</StatusError>
</Tooltip>
)}
{ item.status === 'connected' && (
{ item.status === 'connected' && display === 'small' && (
<ComOptions>
<div className="option">
<MessageOutlined onClick={onMessage} />
</div>
{ enableIce && (
<div className="option">
<PhoneOutlined onClick={onCall} />
</div>
)}
</ComOptions>
)}
{ item.status !== 'connected' && display !== 'small' && (
<ComOptions>
<Tooltip className="option" placement="left" title="message contact">
<MessageOutlined onClick={onMessage} />