Skip to content

Commit

Permalink
Adding site sidebar for remote communities. Fixes #626
Browse files Browse the repository at this point in the history
  • Loading branch information
dessalines committed Apr 28, 2022
1 parent 130bfc9 commit 630c734
Show file tree
Hide file tree
Showing 6 changed files with 310 additions and 253 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"eslint-plugin-prettier": "^4.0.0",
"husky": "^7.0.4",
"import-sort-style-module": "^6.0.0",
"lemmy-js-client": "0.16.0-rc.1",
"lemmy-js-client": "0.16.4-rc.1",
"lint-staged": "^12.4.1",
"mini-css-extract-plugin": "^2.6.0",
"node-fetch": "^2.6.1",
Expand Down
25 changes: 18 additions & 7 deletions src/shared/components/community/community.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ import { Icon, Spinner } from "../common/icon";
import { Paginator } from "../common/paginator";
import { SortSelect } from "../common/sort-select";
import { Sidebar } from "../community/sidebar";
import { SiteSidebar } from "../home/site-sidebar";
import { PostListings } from "../post/post-listings";
import { CommunityLink } from "./community-link";

Expand Down Expand Up @@ -268,13 +269,20 @@ export class Community extends Component<any, State> {
/>
</button>
{this.state.showSidebarMobile && (
<Sidebar
community_view={cv}
moderators={this.state.communityRes.moderators}
admins={this.state.siteRes.admins}
online={this.state.communityRes.online}
enableNsfw={this.state.siteRes.site_view.site.enable_nsfw}
/>
<>
<Sidebar
community_view={cv}
moderators={this.state.communityRes.moderators}
admins={this.state.siteRes.admins}
online={this.state.communityRes.online}
enableNsfw={
this.state.siteRes.site_view.site.enable_nsfw
}
/>
{!cv.community.local && this.state.communityRes.site && (
<SiteSidebar site={this.state.communityRes.site} />
)}
</>
)}
</div>
{this.selects()}
Expand All @@ -292,6 +300,9 @@ export class Community extends Component<any, State> {
online={this.state.communityRes.online}
enableNsfw={this.state.siteRes.site_view.site.enable_nsfw}
/>
{!cv.community.local && this.state.communityRes.site && (
<SiteSidebar site={this.state.communityRes.site} />
)}
</div>
</div>
</>
Expand Down
Loading

0 comments on commit 630c734

Please sign in to comment.