mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-12-23 11:21:26 +00:00
Fix/front end helpers 1 (#346)
* Updating translations. * Adding some descriptions to listing types. #341
This commit is contained in:
parent
d964bd3d1f
commit
79ce0e864a
3 changed files with 15 additions and 3 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit e34e6fc90f5702683870ab548ebe98a29c70abb3
|
Subproject commit a13fc72a3dbabdeb405196b1c51ddbb4b9157212
|
|
@ -40,6 +40,7 @@ export class ListingTypeSelect extends Component<
|
||||||
return (
|
return (
|
||||||
<div class="btn-group btn-group-toggle flex-wrap mb-2">
|
<div class="btn-group btn-group-toggle flex-wrap mb-2">
|
||||||
<label
|
<label
|
||||||
|
title={i18n.t("subscribed_description")}
|
||||||
className={`btn btn-outline-secondary
|
className={`btn btn-outline-secondary
|
||||||
${this.state.type_ == ListingType.Subscribed && "active"}
|
${this.state.type_ == ListingType.Subscribed && "active"}
|
||||||
${
|
${
|
||||||
|
@ -61,6 +62,7 @@ export class ListingTypeSelect extends Component<
|
||||||
</label>
|
</label>
|
||||||
{this.props.showLocal && (
|
{this.props.showLocal && (
|
||||||
<label
|
<label
|
||||||
|
title={i18n.t("local_description")}
|
||||||
className={`pointer btn btn-outline-secondary ${
|
className={`pointer btn btn-outline-secondary ${
|
||||||
this.state.type_ == ListingType.Local && "active"
|
this.state.type_ == ListingType.Local && "active"
|
||||||
}`}
|
}`}
|
||||||
|
@ -76,6 +78,7 @@ export class ListingTypeSelect extends Component<
|
||||||
</label>
|
</label>
|
||||||
)}
|
)}
|
||||||
<label
|
<label
|
||||||
|
title={i18n.t("all_description")}
|
||||||
className={`pointer btn btn-outline-secondary ${
|
className={`pointer btn btn-outline-secondary ${
|
||||||
(this.state.type_ == ListingType.All && "active") ||
|
(this.state.type_ == ListingType.All && "active") ||
|
||||||
(!this.props.showLocal &&
|
(!this.props.showLocal &&
|
||||||
|
|
|
@ -373,6 +373,7 @@ export class Home extends Component<any, HomeState> {
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{this.trendingCommunities()}
|
{this.trendingCommunities()}
|
||||||
{this.createCommunityButton()}
|
{this.createCommunityButton()}
|
||||||
|
{this.exploreCommunitiesButton()}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -394,12 +395,20 @@ export class Home extends Component<any, HomeState> {
|
||||||
|
|
||||||
createCommunityButton() {
|
createCommunityButton() {
|
||||||
return (
|
return (
|
||||||
<Link className="btn btn-secondary btn-block" to="/create_community">
|
<Link className="mt-2 btn btn-secondary btn-block" to="/create_community">
|
||||||
{i18n.t("create_a_community")}
|
{i18n.t("create_a_community")}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exploreCommunitiesButton() {
|
||||||
|
return (
|
||||||
|
<Link className="btn btn-secondary btn-block" to="/communities">
|
||||||
|
{i18n.t("explore_communities")}
|
||||||
|
</Link>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
trendingCommunities() {
|
trendingCommunities() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
@ -411,7 +420,7 @@ export class Home extends Component<any, HomeState> {
|
||||||
</Link>
|
</Link>
|
||||||
</T>
|
</T>
|
||||||
</h5>
|
</h5>
|
||||||
<ul class="list-inline">
|
<ul class="list-inline mb-0">
|
||||||
{this.state.trendingCommunities.map(cv => (
|
{this.state.trendingCommunities.map(cv => (
|
||||||
<li class="list-inline-item d-inline-block">
|
<li class="list-inline-item d-inline-block">
|
||||||
<CommunityLink community={cv.community} />
|
<CommunityLink community={cv.community} />
|
||||||
|
|
Loading…
Reference in a new issue