don't be too magic about hiding tooltips
This commit is contained in:
parent
9649f2a2da
commit
c3af1a2f95
2 changed files with 3 additions and 5 deletions
|
@ -149,7 +149,7 @@ export default class VerificationPanel extends React.PureComponent {
|
|||
<p>{_t("You've successfully verified %(displayName)s!", {
|
||||
displayName: member.displayName || member.name || member.userId,
|
||||
})}</p>
|
||||
<E2EIcon isUser={true} status="verified" size={128} />
|
||||
<E2EIcon isUser={true} status="verified" size={128} hideTooltip={true}/>
|
||||
<p>Verify all users in a room to ensure it's secure.</p>
|
||||
|
||||
<AccessibleButton kind="primary" className="mx_UserInfo_wideButton" onClick={this.props.onClose}>
|
||||
|
|
|
@ -51,9 +51,7 @@ const legacyRoomTitles = {
|
|||
[E2E_STATE.VERIFIED]: _td("All sessions in this encrypted room are trusted"),
|
||||
};
|
||||
|
||||
const E2EIcon = ({isUser, status, className, size, onClick}) => {
|
||||
const sizeThreshold = 25; // the size of an avatar + 1
|
||||
|
||||
const E2EIcon = ({isUser, status, className, size, onClick, hideTooltip}) => {
|
||||
const [hover, setHover] = useState(false);
|
||||
|
||||
const classes = classNames({
|
||||
|
@ -84,7 +82,7 @@ const E2EIcon = ({isUser, status, className, size, onClick}) => {
|
|||
const onMouseOut = () => setHover(false);
|
||||
|
||||
let tip;
|
||||
if (hover && (!size || size <= sizeThreshold)) {
|
||||
if (hover && !hideTooltip) {
|
||||
tip = <Tooltip label={e2eTitle ? _t(e2eTitle) : ""} />;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue