From 50dfcefc9564baa896de8b3f1efbcc61de7054f3 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sun, 28 Apr 2019 19:05:11 -0700 Subject: [PATCH] Changing from forum to community - Fixes #121 --- ui/src/components/communities.tsx | 6 +++--- ui/src/components/community-form.tsx | 5 +---- ui/src/components/community.tsx | 4 ++-- ui/src/components/create-community.tsx | 6 +++--- ui/src/components/main.tsx | 8 ++++---- ui/src/components/modlog.tsx | 8 ++++---- ui/src/components/navbar.tsx | 6 +++--- ui/src/components/post-form.tsx | 2 +- ui/src/components/post-listing.tsx | 2 +- ui/src/components/post-listings.tsx | 2 +- ui/src/components/sidebar.tsx | 2 +- ui/src/components/user.tsx | 4 ++-- ui/src/css/main.css | 4 ++++ ui/src/index.tsx | 4 ++-- 14 files changed, 32 insertions(+), 31 deletions(-) diff --git a/ui/src/components/communities.tsx b/ui/src/components/communities.tsx index b5233c22..1b4ec70f 100644 --- a/ui/src/components/communities.tsx +++ b/ui/src/components/communities.tsx @@ -45,7 +45,7 @@ export class Communities extends Component { } componentDidMount() { - document.title = "Forums - Lemmy"; + document.title = "Communities - Lemmy"; let table = document.querySelector('#community_table'); Sortable.initTable(table); } @@ -56,7 +56,7 @@ export class Communities extends Component { {this.state.loading ?
:
-
Forums
+
Communities
@@ -73,7 +73,7 @@ export class Communities extends Component { {this.state.communities.map(community => - + diff --git a/ui/src/components/community-form.tsx b/ui/src/components/community-form.tsx index 5effa73a..66071a3f 100644 --- a/ui/src/components/community-form.tsx +++ b/ui/src/components/community-form.tsx @@ -120,10 +120,7 @@ export class CommunityForm extends Component { updateUrl() { let sortStr = SortType[this.state.sort].toLowerCase(); - this.props.history.push(`/f/${this.state.community.name}/sort/${sortStr}/page/${this.state.page}`); + this.props.history.push(`/c/${this.state.community.name}/sort/${sortStr}/page/${this.state.page}`); } fetchPosts() { @@ -199,7 +199,7 @@ export class Community extends Component { this.state.community = res.community; this.state.moderators = res.moderators; this.state.admins = res.admins; - document.title = `/f/${this.state.community.name} - Lemmy`; + document.title = `/c/${this.state.community.name} - Lemmy`; this.setState(this.state); this.fetchPosts(); } else if (op == UserOperation.EditCommunity) { diff --git a/ui/src/components/create-community.tsx b/ui/src/components/create-community.tsx index 04ef6d3b..a9345f72 100644 --- a/ui/src/components/create-community.tsx +++ b/ui/src/components/create-community.tsx @@ -10,7 +10,7 @@ export class CreateCommunity extends Component { } componentDidMount() { - document.title = "Create Forum - Lemmy"; + document.title = "Create Community - Lemmy"; } render() { @@ -18,7 +18,7 @@ export class CreateCommunity extends Component {
-
Create Forum
+
Create Community
@@ -27,7 +27,7 @@ export class CreateCommunity extends Component { } handleCommunityCreate(community: Community) { - this.props.history.push(`/f/${community.name}`); + this.props.history.push(`/c/${community.name}`); } } diff --git a/ui/src/components/main.tsx b/ui/src/components/main.tsx index 3b937453..88eed600 100644 --- a/ui/src/components/main.tsx +++ b/ui/src/components/main.tsx @@ -128,10 +128,10 @@ export class Main extends Component { {this.trendingCommunities()} {UserService.Instance.user && this.state.subscribedCommunities.length > 0 &&
-
Subscribed forums
+
Subscribed communities
    {this.state.subscribedCommunities.map(community => -
  • {community.community_name}
  • +
  • {community.community_name}
  • )}
@@ -148,10 +148,10 @@ export class Main extends Component { trendingCommunities() { return (
-
Trending forums
+
Trending communities
    {this.state.trendingCommunities.map(community => -
  • {community.name}
  • +
  • {community.name}
  • )}
diff --git a/ui/src/components/modlog.tsx b/ui/src/components/modlog.tsx index f644b163..853bdd20 100644 --- a/ui/src/components/modlog.tsx +++ b/ui/src/components/modlog.tsx @@ -110,7 +110,7 @@ export class Modlog extends Component { {i.type_ == 'removed_communities' && <> {(i.data as ModRemoveCommunity).removed ? 'Removed' : 'Restored'} - Community {(i.data as ModRemoveCommunity).community_name} + Community {(i.data as ModRemoveCommunity).community_name}
{(i.data as ModRemoveCommunity).reason && ` reason: ${(i.data as ModRemoveCommunity).reason}`}
{(i.data as ModRemoveCommunity).expires && ` expires: ${moment.utc((i.data as ModRemoveCommunity).expires).fromNow()}`}
@@ -120,7 +120,7 @@ export class Modlog extends Component { {(i.data as ModBanFromCommunity).banned ? 'Banned ' : 'Unbanned '} {(i.data as ModBanFromCommunity).other_user_name} from the community - {(i.data as ModBanFromCommunity).community_name} + {(i.data as ModBanFromCommunity).community_name}
{(i.data as ModBanFromCommunity).reason && ` reason: ${(i.data as ModBanFromCommunity).reason}`}
{(i.data as ModBanFromCommunity).expires && ` expires: ${moment.utc((i.data as ModBanFromCommunity).expires).fromNow()}`}
@@ -130,7 +130,7 @@ export class Modlog extends Component { {(i.data as ModAddCommunity).removed ? 'Removed ' : 'Appointed '} {(i.data as ModAddCommunity).other_user_name} as a mod to the community - {(i.data as ModAddCommunity).community_name} + {(i.data as ModAddCommunity).community_name} } {i.type_ == 'banned' && @@ -165,7 +165,7 @@ export class Modlog extends Component {
:
- {this.state.communityName && /f/{this.state.communityName} } + {this.state.communityName && /c/{this.state.communityName} } Modlog
diff --git a/ui/src/components/navbar.tsx b/ui/src/components/navbar.tsx index 00ba5604..31dab61b 100644 --- a/ui/src/components/navbar.tsx +++ b/ui/src/components/navbar.tsx @@ -64,7 +64,7 @@ export class Navbar extends Component { return (
{community.name}{community.name} {community.title} {community.category_name} {community.number_of_subscribers}