Skip to content

Commit

Permalink
Move Tooltip title entry to better place
Browse files Browse the repository at this point in the history
  • Loading branch information
miko authored and tzarebczan committed Apr 19, 2024
1 parent 36fcd53 commit dba8789
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions ui/component/streamClaimRenderInline/view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ class StreamClaimRenderInline extends React.PureComponent<Props, State> {
<ImageViewer
uri={uri}
source={thumbnail}
title={__('Download')}
onClick={() => {
webDownloadClaim(streamingUrl, 'file', false);
}}
Expand All @@ -147,6 +148,7 @@ class StreamClaimRenderInline extends React.PureComponent<Props, State> {
<ImageViewer
uri={uri}
source={thumbnail}
title={__('Download')}
onClick={() => {
webDownloadClaim(streamingUrl, 'file', false);
}}
Expand All @@ -170,6 +172,7 @@ class StreamClaimRenderInline extends React.PureComponent<Props, State> {
<ImageViewer
uri={uri}
source={thumbnail}
title={__('Download')}
onClick={() => {
webDownloadClaim(streamingUrl, 'file', false);
}}
Expand All @@ -187,6 +190,7 @@ class StreamClaimRenderInline extends React.PureComponent<Props, State> {
<ImageViewer
uri={uri}
source={thumbnail}
title={__('Download')}
onClick={() => {
webDownloadClaim(streamingUrl, 'file', false);
}}
Expand Down
5 changes: 3 additions & 2 deletions ui/component/viewers/imageViewer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import Tooltip from 'component/common/tooltip';

type Props = {
source: string,
title: ?string,
onClick: () => void,
};

function ImageViewer(props: Props) {
const { source, onClick } = props;
const { source, title, onClick } = props;
const [loadingError, setLoadingError] = React.useState(false);

return (
Expand All @@ -27,7 +28,7 @@ function ImageViewer(props: Props) {
{!onClick ? (
<ZoomableImage src={source} onError={() => setLoadingError(true)} />
) : (
<Tooltip title={__('Download')} arrow={false} followCursor enterDelay={100}>
<Tooltip title={title} arrow={false} followCursor enterDelay={100}>
<img src={source} onError={() => setLoadingError(true)} onClick={onClick} />
</Tooltip>
)}
Expand Down

0 comments on commit dba8789

Please sign in to comment.