Show language on posts and comments (#1026)

* Show language on posts and comments

* Revert "Show language on posts and comments"

This reverts commit 54267903fc.

* Change language indicator look
This commit is contained in:
SleeplessOne1917 2023-05-21 18:13:25 +00:00 committed by GitHub
parent 0d30f4c731
commit a447e432db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

View file

@ -282,8 +282,15 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
)}
</button>
{this.linkBtn(true)}
<span className="mx-1 badge badge-secondary">
{
this.props.allLanguages.find(
lang => lang.id === cv.comment.language_id
)?.name
}
</span>
{/* This is an expanding spacer for mobile */}
<div className="mr-lg-5 flex-grow-1 flex-lg-grow-0 unselectable pointer mx-2"></div>
<div className="mr-lg-5 flex-grow-1 flex-lg-grow-0 unselectable pointer mx-2" />
{showScores() && (
<>
<a

View file

@ -342,6 +342,13 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
</span>
)}
</li>
<span className="mx-1 badge badge-secondary">
{
this.props.allLanguages.find(
lang => lang.id === post_view.post.language_id
)?.name
}
</span>
<li className="list-inline-item"></li>
{url && !(hostname(url) === getExternalHost()) && (
<>