Merge branch 'dev'

pull/722/head
Dessalines 2019-08-20 14:48:48 -07:00
commit b5fc4bca10
3 changed files with 59 additions and 52 deletions

View File

@ -147,7 +147,7 @@ export class Community extends Component<any, State> {
paginator() { paginator() {
return ( return (
<div class="mt-2"> <div class="my-2">
{this.state.page > 1 && {this.state.page > 1 &&
<button class="btn btn-sm btn-secondary mr-1" onClick={linkEvent(this, this.prevPage)}><T i18nKey="prev">#</T></button> <button class="btn btn-sm btn-secondary mr-1" onClick={linkEvent(this, this.prevPage)}><T i18nKey="prev">#</T></button>
} }

View File

@ -180,16 +180,14 @@ export class Main extends Component<any, MainState> {
sidebar() { sidebar() {
return ( return (
<div class="card border-secondary mb-3"> <div>
<div class="card-body"> {!this.state.showEditSite ?
{!this.state.showEditSite ? this.siteInfo() :
this.siteInfo() : <SiteForm
<SiteForm site={this.state.site.site}
site={this.state.site.site} onCancel={this.handleEditCancel}
onCancel={this.handleEditCancel} />
/> }
}
</div>
</div> </div>
) )
} }
@ -203,47 +201,52 @@ export class Main extends Component<any, MainState> {
siteInfo() { siteInfo() {
return ( return (
<div> <div>
<h5 class="mb-0">{`${this.state.site.site.name}`}</h5> <div class="card border-secondary mb-3">
{this.canAdmin && <div class="card-body">
<ul class="list-inline mb-1 text-muted small font-weight-bold"> <h5 class="mb-0">{`${this.state.site.site.name}`}</h5>
<li className="list-inline-item"> {this.canAdmin &&
<span class="pointer" onClick={linkEvent(this, this.handleEditClick)}> <ul class="list-inline mb-1 text-muted small font-weight-bold">
<T i18nKey="edit">#</T> <li className="list-inline-item">
</span> <span class="pointer" onClick={linkEvent(this, this.handleEditClick)}>
</li> <T i18nKey="edit">#</T>
</ul> </span>
} </li>
<ul class="my-2 list-inline"> </ul>
<li className="list-inline-item badge badge-secondary"> }
<T i18nKey="number_of_users" interpolation={{count: this.state.site.site.number_of_users}}>#</T> <ul class="my-2 list-inline">
</li> <li className="list-inline-item badge badge-secondary">
<li className="list-inline-item badge badge-secondary"> <T i18nKey="number_of_users" interpolation={{count: this.state.site.site.number_of_users}}>#</T>
<T i18nKey="number_of_posts" interpolation={{count: this.state.site.site.number_of_posts}}>#</T> </li>
</li> <li className="list-inline-item badge badge-secondary">
<li className="list-inline-item badge badge-secondary"> <T i18nKey="number_of_posts" interpolation={{count: this.state.site.site.number_of_posts}}>#</T>
<T i18nKey="number_of_comments" interpolation={{count: this.state.site.site.number_of_comments}}>#</T> </li>
</li> <li className="list-inline-item badge badge-secondary">
<li className="list-inline-item"> <T i18nKey="number_of_comments" interpolation={{count: this.state.site.site.number_of_comments}}>#</T>
<Link className="badge badge-secondary" to="/modlog"> </li>
<T i18nKey="modlog">#</T> <li className="list-inline-item">
</Link> <Link className="badge badge-secondary" to="/modlog">
</li> <T i18nKey="modlog">#</T>
</ul> </Link>
<ul class="my-1 list-inline small"> </li>
<li class="list-inline-item"> </ul>
<T i18nKey="admins" class="d-inline">#</T>: <ul class="mt-1 list-inline small mb-0">
</li> <li class="list-inline-item">
{this.state.site.admins.map(admin => <T i18nKey="admins" class="d-inline">#</T>:
<li class="list-inline-item"><Link class="text-info" to={`/u/${admin.name}`}>{admin.name}</Link></li> </li>
)} {this.state.site.admins.map(admin =>
</ul> <li class="list-inline-item"><Link class="text-info" to={`/u/${admin.name}`}>{admin.name}</Link></li>
{this.state.site.site.description && )}
<div> </ul>
<hr /> </div>
<div className="md-div" dangerouslySetInnerHTML={mdToHtml(this.state.site.site.description)} />
</div> </div>
} {this.state.site.site.description &&
</div> <div class="card border-secondary mb-3">
<div class="card-body">
<div className="md-div" dangerouslySetInnerHTML={mdToHtml(this.state.site.site.description)} />
</div>
</div>
}
</div>
) )
} }
@ -256,7 +259,7 @@ export class Main extends Component<any, MainState> {
<svg class="icon mx-2"><use xlinkHref="#icon-mouse">#</use></svg> <svg class="icon mx-2"><use xlinkHref="#icon-mouse">#</use></svg>
<a href={repoUrl}>Lemmy<sup>beta</sup></a> <a href={repoUrl}>Lemmy<sup>beta</sup></a>
</h5> </h5>
<p> <p class="mb-0">
<T i18nKey="landing_0">#<a href="https://en.wikipedia.org/wiki/Link_aggregation">#</a><a href="https://en.wikipedia.org/wiki/Fediverse">#</a><br></br><code>#</code><br></br><b>#</b><br></br><a href={repoUrl}>#</a><br></br><a href="https://www.rust-lang.org">#</a><a href="https://actix.rs/">#</a><a href="https://www.infernojs.org">#</a><a href="https://www.typescriptlang.org/">#</a> <T i18nKey="landing_0">#<a href="https://en.wikipedia.org/wiki/Link_aggregation">#</a><a href="https://en.wikipedia.org/wiki/Fediverse">#</a><br></br><code>#</code><br></br><b>#</b><br></br><a href={repoUrl}>#</a><br></br><a href="https://www.rust-lang.org">#</a><a href="https://actix.rs/">#</a><a href="https://www.infernojs.org">#</a><a href="https://www.typescriptlang.org/">#</a>
</T> </T>
</p> </p>

View File

@ -2,6 +2,10 @@ body, .text-white, .navbar-brand, .badge-light, .btn-secondary {
color: #dedede !important; color: #dedede !important;
} }
.navbar-toggler {
border: 0px;
}
.pointer { .pointer {
cursor: pointer; cursor: pointer;
} }