Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding site sidebar for remote communities. Fixes #626 #640

Merged
merged 1 commit into from
Apr 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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