Fix image expanding and truncation issue.
This commit is contained in:
parent
0457d4c8f1
commit
d5af66c1b1
2 changed files with 18 additions and 13 deletions
3
ui/assets/css/main.css
vendored
3
ui/assets/css/main.css
vendored
|
@ -157,4 +157,5 @@ hr {
|
|||
|
||||
.fl-1 {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
28
ui/src/components/post-listing.tsx
vendored
28
ui/src/components/post-listing.tsx
vendored
|
@ -136,18 +136,22 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
|||
</button>
|
||||
)}
|
||||
</div>
|
||||
{post.url && isImage(post.url) && !post.nsfw && !post.community_nsfw && (
|
||||
<span
|
||||
title={i18n.t('expand_here')}
|
||||
class="pointer"
|
||||
onClick={linkEvent(this, this.handleImageExpandClick)}
|
||||
>
|
||||
<img
|
||||
class="mx-2 mt-1 float-left img-fluid thumbnail rounded"
|
||||
src={imageThumbnailer(post.url)}
|
||||
/>
|
||||
</span>
|
||||
)}
|
||||
{post.url &&
|
||||
isImage(post.url) &&
|
||||
!post.nsfw &&
|
||||
!post.community_nsfw &&
|
||||
!this.state.imageExpanded && (
|
||||
<span
|
||||
title={i18n.t('expand_here')}
|
||||
class="pointer"
|
||||
onClick={linkEvent(this, this.handleImageExpandClick)}
|
||||
>
|
||||
<img
|
||||
class="mx-2 mt-1 float-left img-fluid thumbnail rounded"
|
||||
src={imageThumbnailer(post.url)}
|
||||
/>
|
||||
</span>
|
||||
)}
|
||||
{post.url && isVideo(post.url) && (
|
||||
<video
|
||||
playsinline
|
||||
|
|
Reference in a new issue