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!", {
|
<p>{_t("You've successfully verified %(displayName)s!", {
|
||||||
displayName: member.displayName || member.name || member.userId,
|
displayName: member.displayName || member.name || member.userId,
|
||||||
})}</p>
|
})}</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>
|
<p>Verify all users in a room to ensure it's secure.</p>
|
||||||
|
|
||||||
<AccessibleButton kind="primary" className="mx_UserInfo_wideButton" onClick={this.props.onClose}>
|
<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"),
|
[E2E_STATE.VERIFIED]: _td("All sessions in this encrypted room are trusted"),
|
||||||
};
|
};
|
||||||
|
|
||||||
const E2EIcon = ({isUser, status, className, size, onClick}) => {
|
const E2EIcon = ({isUser, status, className, size, onClick, hideTooltip}) => {
|
||||||
const sizeThreshold = 25; // the size of an avatar + 1
|
|
||||||
|
|
||||||
const [hover, setHover] = useState(false);
|
const [hover, setHover] = useState(false);
|
||||||
|
|
||||||
const classes = classNames({
|
const classes = classNames({
|
||||||
|
@ -84,7 +82,7 @@ const E2EIcon = ({isUser, status, className, size, onClick}) => {
|
||||||
const onMouseOut = () => setHover(false);
|
const onMouseOut = () => setHover(false);
|
||||||
|
|
||||||
let tip;
|
let tip;
|
||||||
if (hover && (!size || size <= sizeThreshold)) {
|
if (hover && !hideTooltip) {
|
||||||
tip = <Tooltip label={e2eTitle ? _t(e2eTitle) : ""} />;
|
tip = <Tooltip label={e2eTitle ? _t(e2eTitle) : ""} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue