From 57b4aacfade10652f91a9f70c5222bf04ad499f7 Mon Sep 17 00:00:00 2001 From: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com> Date: Sat, 20 Jan 2024 13:22:13 +0000 Subject: [PATCH] Make it more obvious when a community is locked (#2329) * Make it more obvious when a community is locked * Add translations --------- Co-authored-by: SleeplessOne1917 --- .eslintignore | 1 + lemmy-translations | 2 +- src/shared/components/community/community.tsx | 18 ++++++++++-- src/shared/components/community/sidebar.tsx | 29 ++++++++++++++----- 4 files changed, 39 insertions(+), 11 deletions(-) diff --git a/.eslintignore b/.eslintignore index 9e14b5a5..e0d76256 100644 --- a/.eslintignore +++ b/.eslintignore @@ -5,3 +5,4 @@ src/api_tests **/*.css **/*.scss **/*.svg +src/shared/translations/** diff --git a/lemmy-translations b/lemmy-translations index 3c217c60..c3e61706 160000 --- a/lemmy-translations +++ b/lemmy-translations @@ -1 +1 @@ -Subproject commit 3c217c609aa8826fc725f708221c8b3eb825f41a +Subproject commit c3e61706e2ff7977db83e964e3010f72cad5e408 diff --git a/src/shared/components/community/community.tsx b/src/shared/components/community/community.tsx index e690fb12..3addf2f1 100644 --- a/src/shared/components/community/community.tsx +++ b/src/shared/components/community/community.tsx @@ -95,12 +95,12 @@ import { DataTypeSelect } from "../common/data-type-select"; import { HtmlTags } from "../common/html-tags"; import { Icon, Spinner } from "../common/icon"; 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"; import { PaginatorCursor } from "../common/paginator-cursor"; import { getHttpBaseInternal } from "../../utils/env"; +import { Sidebar } from "./sidebar"; type CommunityData = RouteDataResponse<{ communityRes: GetCommunityResponse; @@ -503,7 +503,21 @@ export class Community extends Component< community && (
-

{community.title}

+
+

+ {community.title} +

+ {community.posting_restricted_to_mods && ( + + )} +
{ } sidebar() { - const myUSerInfo = UserService.Instance.myUserInfo; + const myUserInfo = UserService.Instance.myUserInfo; const { - community: { name, actor_id }, + community: { name, actor_id, id, posting_restricted_to_mods }, + counts, } = this.props.community_view; return (