mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-27 06:41:18 +00:00
Refactoring chat sidebar. #237
This commit is contained in:
parent
371d3e1009
commit
aba55b2b03
2 changed files with 18 additions and 18 deletions
17
ui/src/components/post.tsx
vendored
17
ui/src/components/post.tsx
vendored
|
@ -119,7 +119,7 @@ export class Post extends Component<any, PostState> {
|
||||||
{this.state.loading ?
|
{this.state.loading ?
|
||||||
<h5><svg class="icon icon-spinner spin"><use xlinkHref="#icon-spinner"></use></svg></h5> :
|
<h5><svg class="icon icon-spinner spin"><use xlinkHref="#icon-spinner"></use></svg></h5> :
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-8 col-lg-6 mb-3">
|
<div class="col-12 col-md-8 mb-3">
|
||||||
<PostListing
|
<PostListing
|
||||||
post={this.state.post}
|
post={this.state.post}
|
||||||
showBody
|
showBody
|
||||||
|
@ -139,11 +139,9 @@ export class Post extends Component<any, PostState> {
|
||||||
{this.sortRadios()}
|
{this.sortRadios()}
|
||||||
{this.commentsTree()}
|
{this.commentsTree()}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-4 col-lg-3 mb-3 d-none d-md-block px-0">
|
<div class="col-12 col-sm-12 col-md-4">
|
||||||
{this.state.comments.length > 0 && this.newComments()}
|
|
||||||
</div>
|
|
||||||
<div class="col-12 col-sm-12 col-lg-3">
|
|
||||||
{this.sidebar()}
|
{this.sidebar()}
|
||||||
|
{this.state.comments.length > 0 && this.newComments()}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
@ -175,9 +173,9 @@ export class Post extends Component<any, PostState> {
|
||||||
|
|
||||||
newComments() {
|
newComments() {
|
||||||
return (
|
return (
|
||||||
<div class="container-fluid sticky-top new-comments">
|
<div class="d-none d-md-block sticky-top new-comments card border-secondary">
|
||||||
<h5><T i18nKey="chat">#</T></h5>
|
<div class="card-body small">
|
||||||
<CommentForm postId={this.state.post.id} disabled={this.state.post.locked} />
|
<h6><T i18nKey="recent_comments">#</T></h6>
|
||||||
{this.state.comments.map(comment =>
|
{this.state.comments.map(comment =>
|
||||||
<CommentNodes
|
<CommentNodes
|
||||||
nodes={[{comment: comment}]}
|
nodes={[{comment: comment}]}
|
||||||
|
@ -188,12 +186,13 @@ export class Post extends Component<any, PostState> {
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
sidebar() {
|
sidebar() {
|
||||||
return (
|
return (
|
||||||
<div class="">
|
<div class="mb-3">
|
||||||
<Sidebar
|
<Sidebar
|
||||||
community={this.state.community}
|
community={this.state.community}
|
||||||
moderators={this.state.moderators}
|
moderators={this.state.moderators}
|
||||||
|
|
1
ui/src/translations/en.ts
vendored
1
ui/src/translations/en.ts
vendored
|
@ -109,6 +109,7 @@ export const en = {
|
||||||
expand_here: 'Expand here',
|
expand_here: 'Expand here',
|
||||||
subscribe_to_communities: 'Subscribe to some <1>communities</1>.',
|
subscribe_to_communities: 'Subscribe to some <1>communities</1>.',
|
||||||
chat: 'Chat',
|
chat: 'Chat',
|
||||||
|
recent_comments: 'Recent Comments',
|
||||||
no_results: 'No results.',
|
no_results: 'No results.',
|
||||||
setup: 'Setup',
|
setup: 'Setup',
|
||||||
lemmy_instance_setup: 'Lemmy Instance Setup',
|
lemmy_instance_setup: 'Lemmy Instance Setup',
|
||||||
|
|
Loading…
Reference in a new issue