mirror of https://github.com/LemmyNet/lemmy.git
Merge branch 'feature/frontend-a11y' of https://github.com/richardj/lemmy into richardj-feature/frontend-a11y
commit
81998d9f89
|
@ -76,37 +76,37 @@ export class Communities extends Component<any, CommunitiesState> {
|
||||||
return (
|
return (
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{this.state.loading ? (
|
{this.state.loading ? (
|
||||||
<h5 class="">
|
<p class="text-center">
|
||||||
<svg class="icon icon-spinner spin">
|
<svg class="icon icon-spinner spin">
|
||||||
<use xlinkHref="#icon-spinner"></use>
|
<use xlinkHref="#icon-spinner"></use>
|
||||||
</svg>
|
</svg>
|
||||||
</h5>
|
</p>
|
||||||
) : (
|
) : (
|
||||||
<div>
|
<div>
|
||||||
<h5>
|
<h5>
|
||||||
<T i18nKey="list_of_communities">#</T>
|
{ i18n.t('list_of_communities') }
|
||||||
</h5>
|
</h5>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table id="community_table" class="table table-sm table-hover">
|
<table id="community_table" class="table table-sm table-hover">
|
||||||
<thead class="pointer">
|
<thead class="pointer">
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
<T i18nKey="name">#</T>
|
{ i18n.t('name') }
|
||||||
</th>
|
</th>
|
||||||
<th class="d-none d-lg-table-cell">
|
<th class="d-none d-lg-table-cell">
|
||||||
<T i18nKey="title">#</T>
|
{ i18n.t('title') }
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<T i18nKey="category">#</T>
|
{ i18n.t('category') }
|
||||||
</th>
|
</th>
|
||||||
<th class="text-right">
|
<th class="text-right">
|
||||||
<T i18nKey="subscribers">#</T>
|
{ i18n.t('subscribers') }
|
||||||
</th>
|
</th>
|
||||||
<th class="text-right d-none d-lg-table-cell">
|
<th class="text-right d-none d-lg-table-cell">
|
||||||
<T i18nKey="posts">#</T>
|
{ i18n.t('posts') }
|
||||||
</th>
|
</th>
|
||||||
<th class="text-right d-none d-lg-table-cell">
|
<th class="text-right d-none d-lg-table-cell">
|
||||||
<T i18nKey="comments">#</T>
|
{ i18n.t('comments') }
|
||||||
</th>
|
</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -149,7 +149,7 @@ export class Communities extends Component<any, CommunitiesState> {
|
||||||
this.handleSubscribe
|
this.handleSubscribe
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<T i18nKey="subscribe">#</T>
|
{ i18n.t('subscribe') }
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
</td>
|
</td>
|
||||||
|
@ -173,15 +173,16 @@ export class Communities extends Component<any, CommunitiesState> {
|
||||||
class="btn btn-sm btn-secondary mr-1"
|
class="btn btn-sm btn-secondary mr-1"
|
||||||
onClick={linkEvent(this, this.prevPage)}
|
onClick={linkEvent(this, this.prevPage)}
|
||||||
>
|
>
|
||||||
<T i18nKey="prev">#</T>
|
{ i18n.t('prev') }
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{this.state.communities.length == communityLimit && (
|
{this.state.communities.length == communityLimit && (
|
||||||
<button
|
<button
|
||||||
class="btn btn-sm btn-secondary"
|
class="btn btn-sm btn-secondary"
|
||||||
onClick={linkEvent(this, this.nextPage)}
|
onClick={linkEvent(this, this.nextPage)}
|
||||||
>
|
>
|
||||||
<T i18nKey="next">#</T>
|
{ i18n.t('next') }
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -108,12 +108,13 @@ export class CommunityForm extends Component<
|
||||||
return (
|
return (
|
||||||
<form onSubmit={linkEvent(this, this.handleCreateCommunitySubmit)}>
|
<form onSubmit={linkEvent(this, this.handleCreateCommunitySubmit)}>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-12 col-form-label">
|
<label class="col-12 col-form-label" for="community-name">
|
||||||
<T i18nKey="name">#</T>
|
{ i18n.t('name') }
|
||||||
</label>
|
</label>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
|
id="community-name"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
value={this.state.communityForm.name}
|
value={this.state.communityForm.name}
|
||||||
onInput={linkEvent(this, this.handleCommunityNameChange)}
|
onInput={linkEvent(this, this.handleCommunityNameChange)}
|
||||||
|
@ -125,13 +126,15 @@ export class CommunityForm extends Component<
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-12 col-form-label">
|
<label class="col-12 col-form-label" for="community-title">
|
||||||
<T i18nKey="title">#</T>
|
{ i18n.t('title') }
|
||||||
</label>
|
</label>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
|
id="community-title"
|
||||||
value={this.state.communityForm.title}
|
value={this.state.communityForm.title}
|
||||||
onInput={linkEvent(this, this.handleCommunityTitleChange)}
|
onInput={linkEvent(this, this.handleCommunityTitleChange)}
|
||||||
class="form-control"
|
class="form-control"
|
||||||
|
@ -142,13 +145,14 @@ export class CommunityForm extends Component<
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-12 col-form-label">
|
<label class="col-12 col-form-label" for="community-sidebar">
|
||||||
<T i18nKey="sidebar">#</T>
|
{ i18n.t('sidebar') }
|
||||||
</label>
|
</label>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<textarea
|
<textarea
|
||||||
id={this.id}
|
id={this.id}
|
||||||
value={this.state.communityForm.description}
|
value={this.state.communityForm.description}
|
||||||
|
id="community-sidebar"
|
||||||
onInput={linkEvent(this, this.handleCommunityDescriptionChange)}
|
onInput={linkEvent(this, this.handleCommunityDescriptionChange)}
|
||||||
class="form-control"
|
class="form-control"
|
||||||
rows={3}
|
rows={3}
|
||||||
|
@ -157,12 +161,13 @@ export class CommunityForm extends Component<
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-12 col-form-label">
|
<label class="col-12 col-form-label" for="community-category">
|
||||||
<T i18nKey="category">#</T>
|
{ i18n.t('category') }
|
||||||
</label>
|
</label>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<select
|
<select
|
||||||
class="form-control"
|
class="form-control"
|
||||||
|
id="community-category"
|
||||||
value={this.state.communityForm.category_id}
|
value={this.state.communityForm.category_id}
|
||||||
onInput={linkEvent(this, this.handleCommunityCategoryChange)}
|
onInput={linkEvent(this, this.handleCommunityCategoryChange)}
|
||||||
>
|
>
|
||||||
|
@ -179,12 +184,13 @@ export class CommunityForm extends Component<
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input
|
<input
|
||||||
class="form-check-input"
|
class="form-check-input"
|
||||||
|
id="community-nsfw"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
checked={this.state.communityForm.nsfw}
|
checked={this.state.communityForm.nsfw}
|
||||||
onChange={linkEvent(this, this.handleCommunityNsfwChange)}
|
onChange={linkEvent(this, this.handleCommunityNsfwChange)}
|
||||||
/>
|
/>
|
||||||
<label class="form-check-label">
|
<label class="form-check-label" for="community-nsfw">
|
||||||
<T i18nKey="nsfw">#</T>
|
{ i18n.t('nsfw') }
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -209,7 +215,7 @@ export class CommunityForm extends Component<
|
||||||
class="btn btn-secondary"
|
class="btn btn-secondary"
|
||||||
onClick={linkEvent(this, this.handleCancel)}
|
onClick={linkEvent(this, this.handleCancel)}
|
||||||
>
|
>
|
||||||
<T i18nKey="cancel">#</T>
|
{ i18n.t('cancel') }
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -128,11 +128,11 @@ export class Community extends Component<any, State> {
|
||||||
return (
|
return (
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{this.state.loading ? (
|
{this.state.loading ? (
|
||||||
<h5>
|
<p class="text-center">
|
||||||
<svg class="icon icon-spinner spin">
|
<svg class="icon icon-spinner spin">
|
||||||
<use xlinkHref="#icon-spinner"></use>
|
<use xlinkHref="#icon-spinner"></use>
|
||||||
</svg>
|
</svg>
|
||||||
</h5>
|
</p>
|
||||||
) : (
|
) : (
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-8">
|
<div class="col-12 col-md-8">
|
||||||
|
@ -140,12 +140,12 @@ export class Community extends Component<any, State> {
|
||||||
{this.state.community.title}
|
{this.state.community.title}
|
||||||
{this.state.community.removed && (
|
{this.state.community.removed && (
|
||||||
<small className="ml-2 text-muted font-italic">
|
<small className="ml-2 text-muted font-italic">
|
||||||
<T i18nKey="removed">#</T>
|
{ i18n.t('removed') }
|
||||||
</small>
|
</small>
|
||||||
)}
|
)}
|
||||||
{this.state.community.nsfw && (
|
{this.state.community.nsfw && (
|
||||||
<small className="ml-2 text-muted font-italic">
|
<small className="ml-2 text-muted font-italic">
|
||||||
<T i18nKey="nsfw">#</T>
|
{ i18n.t('nsfw') }
|
||||||
</small>
|
</small>
|
||||||
)}
|
)}
|
||||||
</h5>
|
</h5>
|
||||||
|
@ -192,7 +192,7 @@ export class Community extends Component<any, State> {
|
||||||
class="btn btn-sm btn-secondary mr-1"
|
class="btn btn-sm btn-secondary mr-1"
|
||||||
onClick={linkEvent(this, this.prevPage)}
|
onClick={linkEvent(this, this.prevPage)}
|
||||||
>
|
>
|
||||||
<T i18nKey="prev">#</T>
|
{ i18n.t('prev') }
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
{this.state.posts.length == fetchLimit && (
|
{this.state.posts.length == fetchLimit && (
|
||||||
|
@ -200,7 +200,7 @@ export class Community extends Component<any, State> {
|
||||||
class="btn btn-sm btn-secondary"
|
class="btn btn-sm btn-secondary"
|
||||||
onClick={linkEvent(this, this.nextPage)}
|
onClick={linkEvent(this, this.nextPage)}
|
||||||
>
|
>
|
||||||
<T i18nKey="next">#</T>
|
{ i18n.t('next') }
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -23,7 +23,7 @@ export class CreateCommunity extends Component<any, any> {
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-lg-6 offset-lg-3 mb-4">
|
<div class="col-12 col-lg-6 offset-lg-3 mb-4">
|
||||||
<h5>
|
<h5>
|
||||||
<T i18nKey="create_community">#</T>
|
{ i18n.t('create_community') }
|
||||||
</h5>
|
</h5>
|
||||||
<CommunityForm onCreate={this.handleCommunityCreate} />
|
<CommunityForm onCreate={this.handleCommunityCreate} />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -23,7 +23,7 @@ export class CreatePost extends Component<any, any> {
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-lg-6 offset-lg-3 mb-4">
|
<div class="col-12 col-lg-6 offset-lg-3 mb-4">
|
||||||
<h5>
|
<h5>
|
||||||
<T i18nKey="create_post">#</T>
|
{ i18n.t('create_post') }
|
||||||
</h5>
|
</h5>
|
||||||
<PostForm onCreate={this.handlePostCreate} params={this.params} />
|
<PostForm onCreate={this.handlePostCreate} params={this.params} />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { Component } from 'inferno';
|
||||||
import { Link } from 'inferno-router';
|
import { Link } from 'inferno-router';
|
||||||
import { repoUrl } from '../utils';
|
import { repoUrl } from '../utils';
|
||||||
import { version } from '../version';
|
import { version } from '../version';
|
||||||
import { T } from 'inferno-i18next';
|
import { i18n } from '../i18next';
|
||||||
|
|
||||||
export class Footer extends Component<any, any> {
|
export class Footer extends Component<any, any> {
|
||||||
constructor(props: any, context: any) {
|
constructor(props: any, context: any) {
|
||||||
|
@ -19,22 +19,22 @@ export class Footer extends Component<any, any> {
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<Link class="nav-link" to="/modlog">
|
<Link class="nav-link" to="/modlog">
|
||||||
<T i18nKey="modlog">#</T>
|
{ i18n.t('modlog') }
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href={'/docs/index.html'}>
|
<a class="nav-link" href={'/docs/index.html'}>
|
||||||
<T i18nKey="docs">#</T>
|
{ i18n.t('docs') }
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<Link class="nav-link" to="/sponsors">
|
<Link class="nav-link" to="/sponsors">
|
||||||
<T i18nKey="donate">#</T>
|
{ i18n.t('donate') }
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href={repoUrl}>
|
<a class="nav-link" href={repoUrl}>
|
||||||
<T i18nKey="code">#</T>
|
{ i18n.t('code') }
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -122,7 +122,7 @@ export class Inbox extends Component<any, InboxState> {
|
||||||
<ul class="list-inline mb-1 text-muted small font-weight-bold">
|
<ul class="list-inline mb-1 text-muted small font-weight-bold">
|
||||||
<li className="list-inline-item">
|
<li className="list-inline-item">
|
||||||
<span class="pointer" onClick={this.markAllAsRead}>
|
<span class="pointer" onClick={this.markAllAsRead}>
|
||||||
<T i18nKey="mark_all_as_read">#</T>
|
{ i18n.t('mark_all_as_read') }
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -148,13 +148,14 @@ export class Inbox extends Component<any, InboxState> {
|
||||||
class="custom-select custom-select-sm w-auto mr-2"
|
class="custom-select custom-select-sm w-auto mr-2"
|
||||||
>
|
>
|
||||||
<option disabled>
|
<option disabled>
|
||||||
<T i18nKey="type">#</T>
|
{ i18n.t('type') }
|
||||||
|
|
||||||
</option>
|
</option>
|
||||||
<option value={UnreadOrAll.Unread}>
|
<option value={UnreadOrAll.Unread}>
|
||||||
<T i18nKey="unread">#</T>
|
{ i18n.t('unread') }
|
||||||
</option>
|
</option>
|
||||||
<option value={UnreadOrAll.All}>
|
<option value={UnreadOrAll.All}>
|
||||||
<T i18nKey="all">#</T>
|
{ i18n.t('all') }
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
<select
|
<select
|
||||||
|
@ -163,19 +164,22 @@ export class Inbox extends Component<any, InboxState> {
|
||||||
class="custom-select custom-select-sm w-auto mr-2"
|
class="custom-select custom-select-sm w-auto mr-2"
|
||||||
>
|
>
|
||||||
<option disabled>
|
<option disabled>
|
||||||
<T i18nKey="type">#</T>
|
{ i18n.t('type') }
|
||||||
</option>
|
</option>
|
||||||
<option value={UnreadType.All}>
|
<option value={UnreadType.All}>
|
||||||
<T i18nKey="all">#</T>
|
{ i18n.t('all') }
|
||||||
|
</option>
|
||||||
|
<option value={UnreadType.Both}>
|
||||||
|
{ i18n.t('both') }
|
||||||
</option>
|
</option>
|
||||||
<option value={UnreadType.Replies}>
|
<option value={UnreadType.Replies}>
|
||||||
<T i18nKey="replies">#</T>
|
{ i18n.t('replies') }
|
||||||
</option>
|
</option>
|
||||||
<option value={UnreadType.Mentions}>
|
<option value={UnreadType.Mentions}>
|
||||||
<T i18nKey="mentions">#</T>
|
{ i18n.t('mentions') }
|
||||||
</option>
|
</option>
|
||||||
<option value={UnreadType.Messages}>
|
<option value={UnreadType.Messages}>
|
||||||
<T i18nKey="messages">#</T>
|
{ i18n.t('messages') }
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
<SortSelect
|
<SortSelect
|
||||||
|
@ -248,14 +252,14 @@ export class Inbox extends Component<any, InboxState> {
|
||||||
class="btn btn-sm btn-secondary mr-1"
|
class="btn btn-sm btn-secondary mr-1"
|
||||||
onClick={linkEvent(this, this.prevPage)}
|
onClick={linkEvent(this, this.prevPage)}
|
||||||
>
|
>
|
||||||
<T i18nKey="prev">#</T>
|
{ i18n.t('prev') }
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
<button
|
<button
|
||||||
class="btn btn-sm btn-secondary"
|
class="btn btn-sm btn-secondary"
|
||||||
onClick={linkEvent(this, this.nextPage)}
|
onClick={linkEvent(this, this.nextPage)}
|
||||||
>
|
>
|
||||||
<T i18nKey="next">#</T>
|
{ i18n.t('next') }
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -78,15 +78,16 @@ export class Login extends Component<any, State> {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<form onSubmit={linkEvent(this, this.handleLoginSubmit)}>
|
<form onSubmit={linkEvent(this, this.handleLoginSubmit)}>
|
||||||
<h5>Login</h5>
|
<h2>{ i18n.t('login') }</h2>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label">
|
<label class="col-sm-2 col-form-label" for="login-email-or-username">
|
||||||
<T i18nKey="email_or_username">#</T>
|
{ i18n.t('email_or_username') }
|
||||||
</label>
|
</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
|
id="login-email-or-username"
|
||||||
value={this.state.loginForm.username_or_email}
|
value={this.state.loginForm.username_or_email}
|
||||||
onInput={linkEvent(this, this.handleLoginUsernameChange)}
|
onInput={linkEvent(this, this.handleLoginUsernameChange)}
|
||||||
required
|
required
|
||||||
|
@ -95,12 +96,13 @@ export class Login extends Component<any, State> {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label">
|
<label class="col-sm-2 col-form-label" for="login-password">
|
||||||
<T i18nKey="password">#</T>
|
{ i18n.t('password') }
|
||||||
</label>
|
</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input
|
<input
|
||||||
type="password"
|
type="password"
|
||||||
|
id="login-password"
|
||||||
value={this.state.loginForm.password}
|
value={this.state.loginForm.password}
|
||||||
onInput={linkEvent(this, this.handleLoginPasswordChange)}
|
onInput={linkEvent(this, this.handleLoginPasswordChange)}
|
||||||
class="form-control"
|
class="form-control"
|
||||||
|
@ -111,7 +113,7 @@ export class Login extends Component<any, State> {
|
||||||
onClick={linkEvent(this, this.handlePasswordReset)}
|
onClick={linkEvent(this, this.handlePasswordReset)}
|
||||||
className="btn p-0 btn-link d-inline-block float-right text-muted small font-weight-bold"
|
className="btn p-0 btn-link d-inline-block float-right text-muted small font-weight-bold"
|
||||||
>
|
>
|
||||||
<T i18nKey="forgot_password">#</T>
|
{ i18n.t('forgot_password') }
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -135,16 +137,19 @@ export class Login extends Component<any, State> {
|
||||||
registerForm() {
|
registerForm() {
|
||||||
return (
|
return (
|
||||||
<form onSubmit={linkEvent(this, this.handleRegisterSubmit)}>
|
<form onSubmit={linkEvent(this, this.handleRegisterSubmit)}>
|
||||||
<h5>
|
<h2>
|
||||||
<T i18nKey="sign_up">#</T>
|
{ i18n.t('sign_up') }
|
||||||
</h5>
|
</h2>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label">
|
<label class="col-sm-2 col-form-label" for="register-username">
|
||||||
<T i18nKey="username">#</T>
|
{ i18n.t('username') }
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
|
id="register-username"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
value={this.state.registerForm.username}
|
value={this.state.registerForm.username}
|
||||||
onInput={linkEvent(this, this.handleRegisterUsernameChange)}
|
onInput={linkEvent(this, this.handleRegisterUsernameChange)}
|
||||||
|
@ -155,13 +160,15 @@ export class Login extends Component<any, State> {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label">
|
<label class="col-sm-2 col-form-label" for="register-email">
|
||||||
<T i18nKey="email">#</T>
|
{ i18n.t('email') }
|
||||||
</label>
|
</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input
|
<input
|
||||||
type="email"
|
type="email"
|
||||||
|
id="register-email"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
placeholder={i18n.t('optional')}
|
placeholder={i18n.t('optional')}
|
||||||
value={this.state.registerForm.email}
|
value={this.state.registerForm.email}
|
||||||
|
@ -170,13 +177,15 @@ export class Login extends Component<any, State> {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label">
|
<label class="col-sm-2 col-form-label" for="register-password">
|
||||||
<T i18nKey="password">#</T>
|
{ i18n.t('password') }
|
||||||
</label>
|
</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input
|
<input
|
||||||
type="password"
|
type="password"
|
||||||
|
id="register-password"
|
||||||
value={this.state.registerForm.password}
|
value={this.state.registerForm.password}
|
||||||
onInput={linkEvent(this, this.handleRegisterPasswordChange)}
|
onInput={linkEvent(this, this.handleRegisterPasswordChange)}
|
||||||
class="form-control"
|
class="form-control"
|
||||||
|
@ -184,13 +193,15 @@ export class Login extends Component<any, State> {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label">
|
<label class="col-sm-2 col-form-label" for="register-verify-password">
|
||||||
<T i18nKey="verify_password">#</T>
|
{ i18n.t('verify_password') }
|
||||||
</label>
|
</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input
|
<input
|
||||||
type="password"
|
type="password"
|
||||||
|
id="register-verify-password"
|
||||||
value={this.state.registerForm.password_verify}
|
value={this.state.registerForm.password_verify}
|
||||||
onInput={linkEvent(this, this.handleRegisterPasswordVerifyChange)}
|
onInput={linkEvent(this, this.handleRegisterPasswordVerifyChange)}
|
||||||
class="form-control"
|
class="form-control"
|
||||||
|
@ -198,18 +209,20 @@ export class Login extends Component<any, State> {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{this.state.enable_nsfw && (
|
|
||||||
|
{ this.state.enable_nsfw && (
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input
|
<input
|
||||||
class="form-check-input"
|
class="form-check-input"
|
||||||
|
id="register-show-nsfw"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
checked={this.state.registerForm.show_nsfw}
|
checked={this.state.registerForm.show_nsfw}
|
||||||
onChange={linkEvent(this, this.handleRegisterShowNsfwChange)}
|
onChange={linkEvent(this, this.handleRegisterShowNsfwChange)}
|
||||||
/>
|
/>
|
||||||
<label class="form-check-label">
|
<label class="form-check-label" for="register-show-nsfw">
|
||||||
<T i18nKey="show_nsfw">#</T>
|
{ i18n.t('show_nsfw') }
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -159,8 +159,8 @@ export class Main extends Component<any, MainState> {
|
||||||
return (
|
return (
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-8">{this.posts()}</div>
|
<main role="main" class="col-12 col-md-8">{this.posts()}</main>
|
||||||
<div class="col-12 col-md-4">{this.my_sidebar()}</div>
|
<aside class="col-12 col-md-4">{this.my_sidebar()}</aside>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -413,13 +413,13 @@ export class Main extends Component<any, MainState> {
|
||||||
|
|
||||||
posts() {
|
posts() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div class="main-content-wrapper">
|
||||||
{this.state.loading ? (
|
{this.state.loading ? (
|
||||||
<h5>
|
<p class="text-center">
|
||||||
<svg class="icon icon-spinner spin">
|
<svg class="icon icon-spinner spin">
|
||||||
<use xlinkHref="#icon-spinner"></use>
|
<use xlinkHref="#icon-spinner"></use>
|
||||||
</svg>
|
</svg>
|
||||||
</h5>
|
</p>
|
||||||
) : (
|
) : (
|
||||||
<div>
|
<div>
|
||||||
{this.selects()}
|
{this.selects()}
|
||||||
|
|
|
@ -343,7 +343,7 @@ export class Modlog extends Component<any, ModlogState> {
|
||||||
return (
|
return (
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{this.state.loading ? (
|
{this.state.loading ? (
|
||||||
<h5 class="">
|
<h5 class="text-center">
|
||||||
<svg class="icon icon-spinner spin">
|
<svg class="icon icon-spinner spin">
|
||||||
<use xlinkHref="#icon-spinner"></use>
|
<use xlinkHref="#icon-spinner"></use>
|
||||||
</svg>
|
</svg>
|
||||||
|
@ -359,15 +359,15 @@ export class Modlog extends Component<any, ModlogState> {
|
||||||
/c/{this.state.communityName}{' '}
|
/c/{this.state.communityName}{' '}
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
)}
|
||||||
<span>Modlog</span>
|
<span>{ i18n.t('modlog') }</span>
|
||||||
</h5>
|
</h5>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table id="modlog_table" class="table table-sm table-hover">
|
<table id="modlog_table" class="table table-sm table-hover">
|
||||||
<thead class="pointer">
|
<thead class="pointer">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Time</th>
|
<th> { i18n.t('time')}</th>
|
||||||
<th>Mod</th>
|
<th>{ i18n.t('mod')}</th>
|
||||||
<th>Action</th>
|
<th>{ i18n.t('action')}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
{this.combined()}
|
{this.combined()}
|
||||||
|
@ -388,14 +388,14 @@ export class Modlog extends Component<any, ModlogState> {
|
||||||
class="btn btn-sm btn-secondary mr-1"
|
class="btn btn-sm btn-secondary mr-1"
|
||||||
onClick={linkEvent(this, this.prevPage)}
|
onClick={linkEvent(this, this.prevPage)}
|
||||||
>
|
>
|
||||||
Prev
|
{ i18n.t('prev') }
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
<button
|
<button
|
||||||
class="btn btn-sm btn-secondary"
|
class="btn btn-sm btn-secondary"
|
||||||
onClick={linkEvent(this, this.nextPage)}
|
onClick={linkEvent(this, this.nextPage)}
|
||||||
>
|
>
|
||||||
Next
|
{ i18n.t('next') }
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -102,6 +102,7 @@ export class Navbar extends Component<any, NavbarState> {
|
||||||
<button
|
<button
|
||||||
class="navbar-toggler"
|
class="navbar-toggler"
|
||||||
type="button"
|
type="button"
|
||||||
|
aria-label="menu"
|
||||||
onClick={linkEvent(this, this.expandNavbar)}
|
onClick={linkEvent(this, this.expandNavbar)}
|
||||||
>
|
>
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
@ -112,12 +113,12 @@ export class Navbar extends Component<any, NavbarState> {
|
||||||
<ul class="navbar-nav mr-auto">
|
<ul class="navbar-nav mr-auto">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<Link class="nav-link" to="/communities">
|
<Link class="nav-link" to="/communities">
|
||||||
<T i18nKey="communities">#</T>
|
{ i18n.t('communities') }
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<Link class="nav-link" to="/search">
|
<Link class="nav-link" to="/search">
|
||||||
<T i18nKey="search">#</T>
|
{ i18n.t('search') }
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
|
@ -128,17 +129,17 @@ export class Navbar extends Component<any, NavbarState> {
|
||||||
state: { prevPath: this.currentLocation },
|
state: { prevPath: this.currentLocation },
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<T i18nKey="create_post">#</T>
|
{ i18n.t('create_post') }
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<Link class="nav-link" to="/create_community">
|
<Link class="nav-link" to="/create_community">
|
||||||
<T i18nKey="create_community">#</T>
|
{ i18n.t('create_community') }
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
<li className="nav-item">
|
<li className="nav-item">
|
||||||
<Link
|
<Link
|
||||||
class="nav-link"
|
class="nav-link ml-2"
|
||||||
to="/sponsors"
|
to="/sponsors"
|
||||||
title={i18n.t('donate_to_lemmy')}
|
title={i18n.t('donate_to_lemmy')}
|
||||||
>
|
>
|
||||||
|
@ -186,7 +187,7 @@ export class Navbar extends Component<any, NavbarState> {
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<Link class="nav-link" to="/login">
|
<Link class="nav-link" to="/login">
|
||||||
<T i18nKey="login_sign_up">#</T>
|
{ i18n.t('login_sign_up') }
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
)}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -59,7 +59,7 @@ export class PasswordChange extends Component<any, State> {
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-lg-6 offset-lg-3 mb-4">
|
<div class="col-12 col-lg-6 offset-lg-3 mb-4">
|
||||||
<h5>
|
<h5>
|
||||||
<T i18nKey="password_change">#</T>
|
{ i18n.t('password_change') }
|
||||||
</h5>
|
</h5>
|
||||||
{this.passwordChangeForm()}
|
{this.passwordChangeForm()}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -151,12 +151,13 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
|
||||||
<div>
|
<div>
|
||||||
<form onSubmit={linkEvent(this, this.handlePostSubmit)}>
|
<form onSubmit={linkEvent(this, this.handlePostSubmit)}>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label">
|
<label class="col-sm-2 col-form-label" for="post-url">
|
||||||
<T i18nKey="url">#</T>
|
{ i18n.t('url') }
|
||||||
</label>
|
</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input
|
<input
|
||||||
type="url"
|
type="url"
|
||||||
|
id="post-url"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
value={this.state.postForm.url}
|
value={this.state.postForm.url}
|
||||||
onInput={linkEvent(this, this.handlePostUrlChange)}
|
onInput={linkEvent(this, this.handlePostUrlChange)}
|
||||||
|
@ -181,7 +182,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
|
||||||
className={`${UserService.Instance.user &&
|
className={`${UserService.Instance.user &&
|
||||||
'pointer'} d-inline-block mr-2 float-right text-muted small font-weight-bold`}
|
'pointer'} d-inline-block mr-2 float-right text-muted small font-weight-bold`}
|
||||||
>
|
>
|
||||||
<T i18nKey="upload_image">#</T>
|
{ i18n.t('upload_image') }
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
id="file-upload"
|
id="file-upload"
|
||||||
|
@ -201,7 +202,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
|
||||||
target="_blank"
|
target="_blank"
|
||||||
class="mr-2 d-inline-block float-right text-muted small font-weight-bold"
|
class="mr-2 d-inline-block float-right text-muted small font-weight-bold"
|
||||||
>
|
>
|
||||||
<T i18nKey="archive_link">#</T>
|
{ i18n.t('archive_link') }
|
||||||
</a>
|
</a>
|
||||||
)}
|
)}
|
||||||
{this.state.imageLoading && (
|
{this.state.imageLoading && (
|
||||||
|
@ -215,7 +216,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
|
||||||
{this.state.crossPosts.length > 0 && (
|
{this.state.crossPosts.length > 0 && (
|
||||||
<>
|
<>
|
||||||
<div class="my-1 text-muted small font-weight-bold">
|
<div class="my-1 text-muted small font-weight-bold">
|
||||||
<T i18nKey="cross_posts">#</T>
|
{ i18n.t('cross_posts') }
|
||||||
</div>
|
</div>
|
||||||
<PostListings showCommunity posts={this.state.crossPosts} />
|
<PostListings showCommunity posts={this.state.crossPosts} />
|
||||||
</>
|
</>
|
||||||
|
@ -223,12 +224,13 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label">
|
<label class="col-sm-2 col-form-label" for="post-title">
|
||||||
<T i18nKey="title">#</T>
|
{ i18n.t('title') }
|
||||||
</label>
|
</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<textarea
|
<textarea
|
||||||
value={this.state.postForm.name}
|
value={this.state.postForm.name}
|
||||||
|
id="post-title"
|
||||||
onInput={linkEvent(this, this.handlePostNameChange)}
|
onInput={linkEvent(this, this.handlePostNameChange)}
|
||||||
class="form-control"
|
class="form-control"
|
||||||
required
|
required
|
||||||
|
@ -239,21 +241,23 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
|
||||||
{this.state.suggestedPosts.length > 0 && (
|
{this.state.suggestedPosts.length > 0 && (
|
||||||
<>
|
<>
|
||||||
<div class="my-1 text-muted small font-weight-bold">
|
<div class="my-1 text-muted small font-weight-bold">
|
||||||
<T i18nKey="related_posts">#</T>
|
{ i18n.t('related_posts') }
|
||||||
</div>
|
</div>
|
||||||
<PostListings posts={this.state.suggestedPosts} />
|
<PostListings posts={this.state.suggestedPosts} />
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label">
|
<label class="col-sm-2 col-form-label" for="post-body">
|
||||||
<T i18nKey="body">#</T>
|
{ i18n.t('body') }
|
||||||
</label>
|
</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<textarea
|
<textarea
|
||||||
id={this.id}
|
id={this.id}
|
||||||
value={this.state.postForm.body}
|
value={this.state.postForm.body}
|
||||||
|
id="post-body"
|
||||||
onInput={linkEvent(this, this.handlePostBodyChange)}
|
onInput={linkEvent(this, this.handlePostBodyChange)}
|
||||||
className={`form-control ${this.state.previewMode && 'd-none'}`}
|
className={`form-control ${this.state.previewMode && 'd-none'}`}
|
||||||
rows={4}
|
rows={4}
|
||||||
|
@ -271,7 +275,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
|
||||||
.previewMode && 'active'}`}
|
.previewMode && 'active'}`}
|
||||||
onClick={linkEvent(this, this.handlePreviewToggle)}
|
onClick={linkEvent(this, this.handlePreviewToggle)}
|
||||||
>
|
>
|
||||||
<T i18nKey="preview">#</T>
|
{ i18n.t('preview') }
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
<a
|
<a
|
||||||
|
@ -279,18 +283,19 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
|
||||||
target="_blank"
|
target="_blank"
|
||||||
class="d-inline-block float-right text-muted small font-weight-bold"
|
class="d-inline-block float-right text-muted small font-weight-bold"
|
||||||
>
|
>
|
||||||
<T i18nKey="formatting_help">#</T>
|
{ i18n.t('formatting_help') }
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{!this.props.post && (
|
{!this.props.post && (
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label">
|
<label class="col-sm-2 col-form-label" for="post-community">
|
||||||
<T i18nKey="community">#</T>
|
{ i18n.t('community') }
|
||||||
</label>
|
</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<select
|
<select
|
||||||
class="form-control"
|
class="form-control"
|
||||||
|
id="post-community"
|
||||||
value={this.state.postForm.community_id}
|
value={this.state.postForm.community_id}
|
||||||
onInput={linkEvent(this, this.handlePostCommunityChange)}
|
onInput={linkEvent(this, this.handlePostCommunityChange)}
|
||||||
>
|
>
|
||||||
|
@ -307,12 +312,13 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input
|
<input
|
||||||
class="form-check-input"
|
class="form-check-input"
|
||||||
|
id="post-nsfw"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
checked={this.state.postForm.nsfw}
|
checked={this.state.postForm.nsfw}
|
||||||
onChange={linkEvent(this, this.handlePostNsfwChange)}
|
onChange={linkEvent(this, this.handlePostNsfwChange)}
|
||||||
/>
|
/>
|
||||||
<label class="form-check-label">
|
<label class="form-check-label" for="post-nsfw">
|
||||||
<T i18nKey="nsfw">#</T>
|
{ i18n.t('nsfw') }
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -337,7 +343,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
|
||||||
class="btn btn-secondary"
|
class="btn btn-secondary"
|
||||||
onClick={linkEvent(this, this.handleCancel)}
|
onClick={linkEvent(this, this.handleCancel)}
|
||||||
>
|
>
|
||||||
<T i18nKey="cancel">#</T>
|
{ i18n.t('cancel') }
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -247,27 +247,27 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
)}
|
)}
|
||||||
{post.removed && (
|
{post.removed && (
|
||||||
<small className="ml-2 text-muted font-italic">
|
<small className="ml-2 text-muted font-italic">
|
||||||
<T i18nKey="removed">#</T>
|
{ i18n.t('removed') }
|
||||||
</small>
|
</small>
|
||||||
)}
|
)}
|
||||||
{post.deleted && (
|
{post.deleted && (
|
||||||
<small className="ml-2 text-muted font-italic">
|
<small className="ml-2 text-muted font-italic">
|
||||||
<T i18nKey="deleted">#</T>
|
{ i18n.t('deleted') }
|
||||||
</small>
|
</small>
|
||||||
)}
|
)}
|
||||||
{post.locked && (
|
{post.locked && (
|
||||||
<small className="ml-2 text-muted font-italic">
|
<small className="ml-2 text-muted font-italic">
|
||||||
<T i18nKey="locked">#</T>
|
{ i18n.t('locked') }
|
||||||
</small>
|
</small>
|
||||||
)}
|
)}
|
||||||
{post.stickied && (
|
{post.stickied && (
|
||||||
<small className="ml-2 text-muted font-italic">
|
<small className="ml-2 text-muted font-italic">
|
||||||
<T i18nKey="stickied">#</T>
|
{ i18n.t('stickied') }
|
||||||
</small>
|
</small>
|
||||||
)}
|
)}
|
||||||
{post.nsfw && (
|
{post.nsfw && (
|
||||||
<small className="ml-2 text-muted font-italic">
|
<small className="ml-2 text-muted font-italic">
|
||||||
<T i18nKey="nsfw">#</T>
|
{ i18n.t('nsfw') }
|
||||||
</small>
|
</small>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
@ -289,17 +289,17 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
</Link>
|
</Link>
|
||||||
{this.isMod && (
|
{this.isMod && (
|
||||||
<span className="mx-1 badge badge-light">
|
<span className="mx-1 badge badge-light">
|
||||||
<T i18nKey="mod">#</T>
|
{ i18n.t('mod') }
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{this.isAdmin && (
|
{this.isAdmin && (
|
||||||
<span className="mx-1 badge badge-light">
|
<span className="mx-1 badge badge-light">
|
||||||
<T i18nKey="admin">#</T>
|
{ i18n.t('admin') }
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{(post.banned_from_community || post.banned) && (
|
{(post.banned_from_community || post.banned) && (
|
||||||
<span className="mx-1 badge badge-danger">
|
<span className="mx-1 badge badge-danger">
|
||||||
<T i18nKey="banned">#</T>
|
{ i18n.t('banned') }
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{this.props.showCommunity && (
|
{this.props.showCommunity && (
|
||||||
|
@ -406,14 +406,14 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
class="pointer"
|
class="pointer"
|
||||||
onClick={linkEvent(this, this.handleModRemoveShow)}
|
onClick={linkEvent(this, this.handleModRemoveShow)}
|
||||||
>
|
>
|
||||||
<T i18nKey="remove">#</T>
|
{ i18n.t('remove') }
|
||||||
</span>
|
</span>
|
||||||
) : (
|
) : (
|
||||||
<span
|
<span
|
||||||
class="pointer"
|
class="pointer"
|
||||||
onClick={linkEvent(this, this.handleModRemoveSubmit)}
|
onClick={linkEvent(this, this.handleModRemoveSubmit)}
|
||||||
>
|
>
|
||||||
<T i18nKey="restore">#</T>
|
{ i18n.t('restore') }
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
</li>
|
</li>
|
||||||
|
@ -430,7 +430,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
this.handleModBanFromCommunityShow
|
this.handleModBanFromCommunityShow
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<T i18nKey="ban">#</T>
|
{ i18n.t('ban') }
|
||||||
</span>
|
</span>
|
||||||
) : (
|
) : (
|
||||||
<span
|
<span
|
||||||
|
@ -440,7 +440,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
this.handleModBanFromCommunitySubmit
|
this.handleModBanFromCommunitySubmit
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<T i18nKey="unban">#</T>
|
{ i18n.t('unban') }
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
</li>
|
</li>
|
||||||
|
@ -487,7 +487,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
this.handleTransferCommunity
|
this.handleTransferCommunity
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<T i18nKey="yes">#</T>
|
{ i18n.t('yes') }
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
class="pointer d-inline-block"
|
class="pointer d-inline-block"
|
||||||
|
@ -496,7 +496,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
this.handleCancelShowConfirmTransferCommunity
|
this.handleCancelShowConfirmTransferCommunity
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<T i18nKey="no">#</T>
|
{ i18n.t('no') }
|
||||||
</span>
|
</span>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
@ -512,14 +512,14 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
class="pointer"
|
class="pointer"
|
||||||
onClick={linkEvent(this, this.handleModBanShow)}
|
onClick={linkEvent(this, this.handleModBanShow)}
|
||||||
>
|
>
|
||||||
<T i18nKey="ban_from_site">#</T>
|
{ i18n.t('ban_from_site') }
|
||||||
</span>
|
</span>
|
||||||
) : (
|
) : (
|
||||||
<span
|
<span
|
||||||
class="pointer"
|
class="pointer"
|
||||||
onClick={linkEvent(this, this.handleModBanSubmit)}
|
onClick={linkEvent(this, this.handleModBanSubmit)}
|
||||||
>
|
>
|
||||||
<T i18nKey="unban_from_site">#</T>
|
{ i18n.t('unban_from_site') }
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
</li>
|
</li>
|
||||||
|
@ -549,18 +549,18 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
this.handleShowConfirmTransferSite
|
this.handleShowConfirmTransferSite
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<T i18nKey="transfer_site">#</T>
|
{ i18n.t('transfer_site') }
|
||||||
</span>
|
</span>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<span class="d-inline-block mr-1">
|
<span class="d-inline-block mr-1">
|
||||||
<T i18nKey="are_you_sure">#</T>
|
{ i18n.t('are_you_sure') }
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
class="pointer d-inline-block mr-1"
|
class="pointer d-inline-block mr-1"
|
||||||
onClick={linkEvent(this, this.handleTransferSite)}
|
onClick={linkEvent(this, this.handleTransferSite)}
|
||||||
>
|
>
|
||||||
<T i18nKey="yes">#</T>
|
{ i18n.t('yes') }
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
class="pointer d-inline-block"
|
class="pointer d-inline-block"
|
||||||
|
@ -569,7 +569,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
this.handleCancelShowConfirmTransferSite
|
this.handleCancelShowConfirmTransferSite
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<T i18nKey="no">#</T>
|
{ i18n.t('no') }
|
||||||
</span>
|
</span>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
@ -583,7 +583,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
className="pointer"
|
className="pointer"
|
||||||
onClick={linkEvent(this, this.handleViewSource)}
|
onClick={linkEvent(this, this.handleViewSource)}
|
||||||
>
|
>
|
||||||
<T i18nKey="view_source">#</T>
|
{ i18n.t('view_source') }
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
)}
|
)}
|
||||||
|
@ -601,18 +601,19 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
onInput={linkEvent(this, this.handleModRemoveReasonChange)}
|
onInput={linkEvent(this, this.handleModRemoveReasonChange)}
|
||||||
/>
|
/>
|
||||||
<button type="submit" class="btn btn-secondary">
|
<button type="submit" class="btn btn-secondary">
|
||||||
<T i18nKey="remove_post">#</T>
|
{ i18n.t('remove_post') }
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
)}
|
)}
|
||||||
{this.state.showBanDialog && (
|
{this.state.showBanDialog && (
|
||||||
<form onSubmit={linkEvent(this, this.handleModBanBothSubmit)}>
|
<form onSubmit={linkEvent(this, this.handleModBanBothSubmit)}>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-form-label">
|
<label class="col-form-label" for="post-listing-reason">
|
||||||
<T i18nKey="reason">#</T>
|
{ i18n.t('reason') }
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
|
id="post-listing-reason"
|
||||||
class="form-control mr-2"
|
class="form-control mr-2"
|
||||||
placeholder={i18n.t('reason')}
|
placeholder={i18n.t('reason')}
|
||||||
value={this.state.banReason}
|
value={this.state.banReason}
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { Component } from 'inferno';
|
||||||
import { Link } from 'inferno-router';
|
import { Link } from 'inferno-router';
|
||||||
import { Post } from '../interfaces';
|
import { Post } from '../interfaces';
|
||||||
import { PostListing } from './post-listing';
|
import { PostListing } from './post-listing';
|
||||||
|
import { i18n } from '../i18next';
|
||||||
import { T } from 'inferno-i18next';
|
import { T } from 'inferno-i18next';
|
||||||
|
|
||||||
interface PostListingsProps {
|
interface PostListingsProps {
|
||||||
|
@ -30,14 +31,12 @@ export class PostListings extends Component<PostListingsProps, any> {
|
||||||
))
|
))
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<div>
|
<h2>
|
||||||
<T i18nKey="no_posts">#</T>
|
{ i18n.t('no_posts') }
|
||||||
</div>
|
</h2>
|
||||||
{this.props.showCommunity !== undefined && (
|
{this.props.showCommunity !== undefined && (
|
||||||
<div>
|
<div>
|
||||||
<T i18nKey="subscribe_to_communities">
|
<Link to="/communities">{ i18n.t('subscribe_to_communities') }</Link>
|
||||||
#<Link to="/communities">#</Link>
|
|
||||||
</T>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|
|
@ -155,11 +155,11 @@ export class Post extends Component<any, PostState> {
|
||||||
return (
|
return (
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{this.state.loading ? (
|
{this.state.loading ? (
|
||||||
<h5>
|
<p class="text-center">
|
||||||
<svg class="icon icon-spinner spin">
|
<svg class="icon icon-spinner spin">
|
||||||
<use xlinkHref="#icon-spinner"></use>
|
<use xlinkHref="#icon-spinner"></use>
|
||||||
</svg>
|
</svg>
|
||||||
</h5>
|
</p>
|
||||||
) : (
|
) : (
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-8 mb-3">
|
<div class="col-12 col-md-8 mb-3">
|
||||||
|
@ -173,7 +173,7 @@ export class Post extends Component<any, PostState> {
|
||||||
{this.state.crossPosts.length > 0 && (
|
{this.state.crossPosts.length > 0 && (
|
||||||
<>
|
<>
|
||||||
<div class="my-1 text-muted small font-weight-bold">
|
<div class="my-1 text-muted small font-weight-bold">
|
||||||
<T i18nKey="cross_posts">#</T>
|
{ i18n.t('cross_posts') }
|
||||||
</div>
|
</div>
|
||||||
<PostListings showCommunity posts={this.state.crossPosts} />
|
<PostListings showCommunity posts={this.state.crossPosts} />
|
||||||
</>
|
</>
|
||||||
|
@ -235,18 +235,6 @@ export class Post extends Component<any, PostState> {
|
||||||
onChange={linkEvent(this, this.handleCommentSortChange)}
|
onChange={linkEvent(this, this.handleCommentSortChange)}
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
<label
|
|
||||||
className={`btn btn-sm btn-secondary pointer ${this.state
|
|
||||||
.commentSort === CommentSortType.Old && 'active'}`}
|
|
||||||
>
|
|
||||||
{i18n.t('old')}
|
|
||||||
<input
|
|
||||||
type="radio"
|
|
||||||
value={CommentSortType.Old}
|
|
||||||
checked={this.state.commentSort === CommentSortType.Old}
|
|
||||||
onChange={linkEvent(this, this.handleCommentSortChange)}
|
|
||||||
/>
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -256,7 +244,7 @@ export class Post extends Component<any, PostState> {
|
||||||
<div class="d-none d-md-block new-comments mb-3 card border-secondary">
|
<div class="d-none d-md-block new-comments mb-3 card border-secondary">
|
||||||
<div class="card-body small">
|
<div class="card-body small">
|
||||||
<h6>
|
<h6>
|
||||||
<T i18nKey="recent_comments">#</T>
|
{ i18n.t('recent_comments') }
|
||||||
</h6>
|
</h6>
|
||||||
{this.state.comments.map(comment => (
|
{this.state.comments.map(comment => (
|
||||||
<CommentNodes
|
<CommentNodes
|
||||||
|
@ -329,13 +317,6 @@ export class Post extends Component<any, PostState> {
|
||||||
+a.comment.deleted - +b.comment.deleted ||
|
+a.comment.deleted - +b.comment.deleted ||
|
||||||
b.comment.published.localeCompare(a.comment.published)
|
b.comment.published.localeCompare(a.comment.published)
|
||||||
);
|
);
|
||||||
} else if (this.state.commentSort == CommentSortType.Old) {
|
|
||||||
tree.sort(
|
|
||||||
(a, b) =>
|
|
||||||
+a.comment.removed - +b.comment.removed ||
|
|
||||||
+a.comment.deleted - +b.comment.deleted ||
|
|
||||||
a.comment.published.localeCompare(b.comment.published)
|
|
||||||
);
|
|
||||||
} else if (this.state.commentSort == CommentSortType.Hot) {
|
} else if (this.state.commentSort == CommentSortType.Hot) {
|
||||||
tree.sort(
|
tree.sort(
|
||||||
(a, b) =>
|
(a, b) =>
|
||||||
|
|
|
@ -127,7 +127,7 @@ export class Search extends Component<any, SearchState> {
|
||||||
return (
|
return (
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h5>
|
<h5>
|
||||||
<T i18nKey="search">#</T>
|
{ i18n.t('search') }
|
||||||
</h5>
|
</h5>
|
||||||
{this.selects()}
|
{this.selects()}
|
||||||
{this.searchForm()}
|
{this.searchForm()}
|
||||||
|
@ -164,7 +164,7 @@ export class Search extends Component<any, SearchState> {
|
||||||
</svg>
|
</svg>
|
||||||
) : (
|
) : (
|
||||||
<span>
|
<span>
|
||||||
<T i18nKey="search">#</T>
|
{ i18n.t('search') }
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
</button>
|
</button>
|
||||||
|
@ -181,22 +181,22 @@ export class Search extends Component<any, SearchState> {
|
||||||
class="custom-select custom-select-sm w-auto"
|
class="custom-select custom-select-sm w-auto"
|
||||||
>
|
>
|
||||||
<option disabled>
|
<option disabled>
|
||||||
<T i18nKey="type">#</T>
|
{ i18n.t('type') }
|
||||||
</option>
|
</option>
|
||||||
<option value={SearchType.All}>
|
<option value={SearchType.All}>
|
||||||
<T i18nKey="all">#</T>
|
{ i18n.t('all') }
|
||||||
</option>
|
</option>
|
||||||
<option value={SearchType.Comments}>
|
<option value={SearchType.Comments}>
|
||||||
<T i18nKey="comments">#</T>
|
{ i18n.t('comments') }
|
||||||
</option>
|
</option>
|
||||||
<option value={SearchType.Posts}>
|
<option value={SearchType.Posts}>
|
||||||
<T i18nKey="posts">#</T>
|
{ i18n.t('posts') }
|
||||||
</option>
|
</option>
|
||||||
<option value={SearchType.Communities}>
|
<option value={SearchType.Communities}>
|
||||||
<T i18nKey="communities">#</T>
|
{ i18n.t('communities') }
|
||||||
</option>
|
</option>
|
||||||
<option value={SearchType.Users}>
|
<option value={SearchType.Users}>
|
||||||
<T i18nKey="users">#</T>
|
{ i18n.t('users') }
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
<span class="ml-2">
|
<span class="ml-2">
|
||||||
|
@ -383,14 +383,14 @@ export class Search extends Component<any, SearchState> {
|
||||||
class="btn btn-sm btn-secondary mr-1"
|
class="btn btn-sm btn-secondary mr-1"
|
||||||
onClick={linkEvent(this, this.prevPage)}
|
onClick={linkEvent(this, this.prevPage)}
|
||||||
>
|
>
|
||||||
<T i18nKey="prev">#</T>
|
{ i18n.t('prev') }
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
<button
|
<button
|
||||||
class="btn btn-sm btn-secondary"
|
class="btn btn-sm btn-secondary"
|
||||||
onClick={linkEvent(this, this.nextPage)}
|
onClick={linkEvent(this, this.nextPage)}
|
||||||
>
|
>
|
||||||
<T i18nKey="next">#</T>
|
{ i18n.t('next') }
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -406,7 +406,7 @@ export class Search extends Component<any, SearchState> {
|
||||||
res.communities.length == 0 &&
|
res.communities.length == 0 &&
|
||||||
res.users.length == 0 && (
|
res.users.length == 0 && (
|
||||||
<span>
|
<span>
|
||||||
<T i18nKey="no_results">#</T>
|
{ i18n.t('no_results') }
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -62,7 +62,7 @@ export class Setup extends Component<any, State> {
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 offset-lg-3 col-lg-6">
|
<div class="col-12 offset-lg-3 col-lg-6">
|
||||||
<h3>
|
<h3>
|
||||||
<T i18nKey="lemmy_instance_setup">#</T>
|
{ i18n.t('lemmy_instance_setup') }
|
||||||
</h3>
|
</h3>
|
||||||
{!this.state.doneRegisteringUser ? (
|
{!this.state.doneRegisteringUser ? (
|
||||||
this.registerUser()
|
this.registerUser()
|
||||||
|
@ -78,17 +78,16 @@ export class Setup extends Component<any, State> {
|
||||||
registerUser() {
|
registerUser() {
|
||||||
return (
|
return (
|
||||||
<form onSubmit={linkEvent(this, this.handleRegisterSubmit)}>
|
<form onSubmit={linkEvent(this, this.handleRegisterSubmit)}>
|
||||||
<h5>
|
<h4>{ i18n.t('setup_admin')}</h4>
|
||||||
<T i18nKey="setup_admin">#</T>
|
|
||||||
</h5>
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label">
|
<label class="col-sm-2 col-form-label" for="username">
|
||||||
<T i18nKey="username">#</T>
|
{ i18n.t('username') }
|
||||||
</label>
|
</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
|
id="username"
|
||||||
value={this.state.userForm.username}
|
value={this.state.userForm.username}
|
||||||
onInput={linkEvent(this, this.handleRegisterUsernameChange)}
|
onInput={linkEvent(this, this.handleRegisterUsernameChange)}
|
||||||
required
|
required
|
||||||
|
@ -99,12 +98,14 @@ export class Setup extends Component<any, State> {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label">
|
<label class="col-sm-2 col-form-label" for="email">
|
||||||
<T i18nKey="email">#</T>
|
{ i18n.t('email') }
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input
|
<input
|
||||||
type="email"
|
type="email"
|
||||||
|
id="email"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
placeholder={i18n.t('optional')}
|
placeholder={i18n.t('optional')}
|
||||||
value={this.state.userForm.email}
|
value={this.state.userForm.email}
|
||||||
|
@ -114,12 +115,13 @@ export class Setup extends Component<any, State> {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label">
|
<label class="col-sm-2 col-form-label" for="password">
|
||||||
<T i18nKey="password">#</T>
|
{ i18n.t('password')}
|
||||||
</label>
|
</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input
|
<input
|
||||||
type="password"
|
type="password"
|
||||||
|
id="password"
|
||||||
value={this.state.userForm.password}
|
value={this.state.userForm.password}
|
||||||
onInput={linkEvent(this, this.handleRegisterPasswordChange)}
|
onInput={linkEvent(this, this.handleRegisterPasswordChange)}
|
||||||
class="form-control"
|
class="form-control"
|
||||||
|
@ -128,12 +130,13 @@ export class Setup extends Component<any, State> {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label">
|
<label class="col-sm-2 col-form-label" for="verify-password">
|
||||||
<T i18nKey="verify_password">#</T>
|
{ i18n.t('verify_password') }
|
||||||
</label>
|
</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input
|
<input
|
||||||
type="password"
|
type="password"
|
||||||
|
id="verify-password"
|
||||||
value={this.state.userForm.password_verify}
|
value={this.state.userForm.password_verify}
|
||||||
onInput={linkEvent(this, this.handleRegisterPasswordVerifyChange)}
|
onInput={linkEvent(this, this.handleRegisterPasswordVerifyChange)}
|
||||||
class="form-control"
|
class="form-control"
|
||||||
|
|
|
@ -72,7 +72,7 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
|
||||||
<span>{community.title}</span>
|
<span>{community.title}</span>
|
||||||
{community.removed && (
|
{community.removed && (
|
||||||
<small className="ml-2 text-muted font-italic">
|
<small className="ml-2 text-muted font-italic">
|
||||||
<T i18nKey="removed">#</T>
|
{ i18n.t('removed') }
|
||||||
</small>
|
</small>
|
||||||
)}
|
)}
|
||||||
{community.deleted && (
|
{community.deleted && (
|
||||||
|
@ -92,7 +92,7 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
|
||||||
class="pointer"
|
class="pointer"
|
||||||
onClick={linkEvent(this, this.handleEditClick)}
|
onClick={linkEvent(this, this.handleEditClick)}
|
||||||
>
|
>
|
||||||
<T i18nKey="edit">#</T>
|
{ i18n.t('edit') }
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
{this.amCreator && (
|
{this.amCreator && (
|
||||||
|
@ -116,14 +116,14 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
|
||||||
class="pointer"
|
class="pointer"
|
||||||
onClick={linkEvent(this, this.handleModRemoveShow)}
|
onClick={linkEvent(this, this.handleModRemoveShow)}
|
||||||
>
|
>
|
||||||
<T i18nKey="remove">#</T>
|
{ i18n.t('remove') }
|
||||||
</span>
|
</span>
|
||||||
) : (
|
) : (
|
||||||
<span
|
<span
|
||||||
class="pointer"
|
class="pointer"
|
||||||
onClick={linkEvent(this, this.handleModRemoveSubmit)}
|
onClick={linkEvent(this, this.handleModRemoveSubmit)}
|
||||||
>
|
>
|
||||||
<T i18nKey="restore">#</T>
|
{ i18n.t('restore') }
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
</li>
|
</li>
|
||||||
|
@ -132,11 +132,12 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
|
||||||
{this.state.showRemoveDialog && (
|
{this.state.showRemoveDialog && (
|
||||||
<form onSubmit={linkEvent(this, this.handleModRemoveSubmit)}>
|
<form onSubmit={linkEvent(this, this.handleModRemoveSubmit)}>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-form-label">
|
<label class="col-form-label" for="remove-reason">
|
||||||
<T i18nKey="reason">#</T>
|
{ i18n.t('reason') }
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
|
id="remove-reason"
|
||||||
class="form-control mr-2"
|
class="form-control mr-2"
|
||||||
placeholder={i18n.t('optional')}
|
placeholder={i18n.t('optional')}
|
||||||
value={this.state.removeReason}
|
value={this.state.removeReason}
|
||||||
|
@ -150,7 +151,7 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
|
||||||
{/* </div> */}
|
{/* </div> */}
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<button type="submit" class="btn btn-secondary">
|
<button type="submit" class="btn btn-secondary">
|
||||||
<T i18nKey="remove_community">#</T>
|
{ i18n.t('remove_community') }
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -218,7 +219,7 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
|
||||||
'no-click'}`}
|
'no-click'}`}
|
||||||
to={`/create_post?community=${community.name}`}
|
to={`/create_post?community=${community.name}`}
|
||||||
>
|
>
|
||||||
<T i18nKey="create_a_post">#</T>
|
{ i18n.t('create_a_post') }
|
||||||
</Link>
|
</Link>
|
||||||
<div>
|
<div>
|
||||||
{community.subscribed ? (
|
{community.subscribed ? (
|
||||||
|
@ -226,14 +227,14 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
|
||||||
class="btn btn-sm btn-secondary btn-block"
|
class="btn btn-sm btn-secondary btn-block"
|
||||||
onClick={linkEvent(community.id, this.handleUnsubscribe)}
|
onClick={linkEvent(community.id, this.handleUnsubscribe)}
|
||||||
>
|
>
|
||||||
<T i18nKey="unsubscribe">#</T>
|
{ i18n.t('unsubscribe') }
|
||||||
</button>
|
</button>
|
||||||
) : (
|
) : (
|
||||||
<button
|
<button
|
||||||
class="btn btn-sm btn-secondary btn-block"
|
class="btn btn-sm btn-secondary btn-block"
|
||||||
onClick={linkEvent(community.id, this.handleSubscribe)}
|
onClick={linkEvent(community.id, this.handleSubscribe)}
|
||||||
>
|
>
|
||||||
<T i18nKey="subscribe">#</T>
|
{ i18n.t('subscribe') }
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -67,12 +67,13 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
|
||||||
: capitalizeFirstLetter(i18n.t('name'))
|
: capitalizeFirstLetter(i18n.t('name'))
|
||||||
} ${i18n.t('your_site')}`}</h5>
|
} ${i18n.t('your_site')}`}</h5>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-12 col-form-label">
|
<label class="col-12 col-form-label" for="create-site-name">
|
||||||
<T i18nKey="name">#</T>
|
{ i18n.t('name') }
|
||||||
</label>
|
</label>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
|
id="create-site-name"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
value={this.state.siteForm.name}
|
value={this.state.siteForm.name}
|
||||||
onInput={linkEvent(this, this.handleSiteNameChange)}
|
onInput={linkEvent(this, this.handleSiteNameChange)}
|
||||||
|
@ -83,13 +84,14 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-12 col-form-label">
|
<label class="col-12 col-form-label" for="create-site-sidebar">
|
||||||
<T i18nKey="sidebar">#</T>
|
{ i18n.t('sidebar') }
|
||||||
</label>
|
</label>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<textarea
|
<textarea
|
||||||
id={this.id}
|
id={this.id}
|
||||||
value={this.state.siteForm.description}
|
value={this.state.siteForm.description}
|
||||||
|
id="create-site-sidebar"
|
||||||
onInput={linkEvent(this, this.handleSiteDescriptionChange)}
|
onInput={linkEvent(this, this.handleSiteDescriptionChange)}
|
||||||
class="form-control"
|
class="form-control"
|
||||||
rows={3}
|
rows={3}
|
||||||
|
@ -102,12 +104,13 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input
|
<input
|
||||||
class="form-check-input"
|
class="form-check-input"
|
||||||
|
id="create-site-downvotes"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
checked={this.state.siteForm.enable_downvotes}
|
checked={this.state.siteForm.enable_downvotes}
|
||||||
onChange={linkEvent(this, this.handleSiteEnableDownvotesChange)}
|
onChange={linkEvent(this, this.handleSiteEnableDownvotesChange)}
|
||||||
/>
|
/>
|
||||||
<label class="form-check-label">
|
<label class="form-check-label" for="create-site-downvotes">
|
||||||
<T i18nKey="enable_downvotes">#</T>
|
{ i18n.t('enable_downvotes') }
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -117,12 +120,13 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input
|
<input
|
||||||
class="form-check-input"
|
class="form-check-input"
|
||||||
|
id="create-site-enable-nsfw"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
checked={this.state.siteForm.enable_nsfw}
|
checked={this.state.siteForm.enable_nsfw}
|
||||||
onChange={linkEvent(this, this.handleSiteEnableNsfwChange)}
|
onChange={linkEvent(this, this.handleSiteEnableNsfwChange)}
|
||||||
/>
|
/>
|
||||||
<label class="form-check-label">
|
<label class="form-check-label" for="create-site-enable-nsfw">
|
||||||
<T i18nKey="enable_nsfw">#</T>
|
{ i18n.t('enable_nsfw') }
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -132,6 +136,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input
|
<input
|
||||||
class="form-check-input"
|
class="form-check-input"
|
||||||
|
id="create-site-open-registration"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
checked={this.state.siteForm.open_registration}
|
checked={this.state.siteForm.open_registration}
|
||||||
onChange={linkEvent(
|
onChange={linkEvent(
|
||||||
|
@ -139,8 +144,8 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
|
||||||
this.handleSiteOpenRegistrationChange
|
this.handleSiteOpenRegistrationChange
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<label class="form-check-label">
|
<label class="form-check-label" for="create-site-open-registration">
|
||||||
<T i18nKey="open_registration">#</T>
|
{ i18n.t('open_registration') }
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -164,7 +169,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
|
||||||
class="btn btn-secondary"
|
class="btn btn-secondary"
|
||||||
onClick={linkEvent(this, this.handleCancel)}
|
onClick={linkEvent(this, this.handleCancel)}
|
||||||
>
|
>
|
||||||
<T i18nKey="cancel">#</T>
|
{ i18n.t('cancel') }
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Component, linkEvent } from 'inferno';
|
import { Component, linkEvent } from 'inferno';
|
||||||
import { SortType } from '../interfaces';
|
import { SortType } from '../interfaces';
|
||||||
|
import { i18n } from '../i18next';
|
||||||
import { T } from 'inferno-i18next';
|
import { T } from 'inferno-i18next';
|
||||||
|
|
||||||
interface SortSelectProps {
|
interface SortSelectProps {
|
||||||
|
@ -31,31 +31,31 @@ export class SortSelect extends Component<SortSelectProps, SortSelectState> {
|
||||||
class="custom-select custom-select-sm w-auto"
|
class="custom-select custom-select-sm w-auto"
|
||||||
>
|
>
|
||||||
<option disabled>
|
<option disabled>
|
||||||
<T i18nKey="sort_type">#</T>
|
{ i18n.t('sort_type') }
|
||||||
</option>
|
</option>
|
||||||
{!this.props.hideHot && (
|
{!this.props.hideHot && (
|
||||||
<option value={SortType.Hot}>
|
<option value={SortType.Hot}>
|
||||||
<T i18nKey="hot">#</T>
|
{ i18n.t('hot') }
|
||||||
</option>
|
</option>
|
||||||
)}
|
)}
|
||||||
<option value={SortType.New}>
|
<option value={SortType.New}>
|
||||||
<T i18nKey="new">#</T>
|
{ i18n.t('new') }
|
||||||
</option>
|
</option>
|
||||||
<option disabled>─────</option>
|
<option disabled>─────</option>
|
||||||
<option value={SortType.TopDay}>
|
<option value={SortType.TopDay}>
|
||||||
<T i18nKey="top_day">#</T>
|
{ i18n.t('top_day') }
|
||||||
</option>
|
</option>
|
||||||
<option value={SortType.TopWeek}>
|
<option value={SortType.TopWeek}>
|
||||||
<T i18nKey="week">#</T>
|
{ i18n.t('week') }
|
||||||
</option>
|
</option>
|
||||||
<option value={SortType.TopMonth}>
|
<option value={SortType.TopMonth}>
|
||||||
<T i18nKey="month">#</T>
|
{ i18n.t('month') }
|
||||||
</option>
|
</option>
|
||||||
<option value={SortType.TopYear}>
|
<option value={SortType.TopYear}>
|
||||||
<T i18nKey="year">#</T>
|
{ i18n.t('year') }
|
||||||
</option>
|
</option>
|
||||||
<option value={SortType.TopAll}>
|
<option value={SortType.TopAll}>
|
||||||
<T i18nKey="all">#</T>
|
{ i18n.t('all') }
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
);
|
);
|
||||||
|
|
|
@ -37,7 +37,7 @@ export class Sponsors extends Component<any, any> {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<h5>
|
<h5>
|
||||||
<T i18nKey="donate_to_lemmy">#</T>
|
{ i18n.t('donate_to_lemmy') }
|
||||||
</h5>
|
</h5>
|
||||||
<p>
|
<p>
|
||||||
<T i18nKey="sponsor_message">
|
<T i18nKey="sponsor_message">
|
||||||
|
@ -45,7 +45,7 @@ export class Sponsors extends Component<any, any> {
|
||||||
</T>
|
</T>
|
||||||
</p>
|
</p>
|
||||||
<a class="btn btn-secondary" href="https://www.patreon.com/dessalines">
|
<a class="btn btn-secondary" href="https://www.patreon.com/dessalines">
|
||||||
<T i18nKey="support_on_patreon">#</T>
|
{ i18n.t('support_on_patreon') }
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -54,10 +54,10 @@ export class Sponsors extends Component<any, any> {
|
||||||
return (
|
return (
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h5>
|
<h5>
|
||||||
<T i18nKey="sponsors">#</T>
|
{ i18n.t('sponsors') }
|
||||||
</h5>
|
</h5>
|
||||||
<p>
|
<p>
|
||||||
<T i18nKey="general_sponsors">#</T>
|
{ i18n.t('general_sponsors') }
|
||||||
</p>
|
</p>
|
||||||
<div class="row card-columns">
|
<div class="row card-columns">
|
||||||
{highlighted.map(s => (
|
{highlighted.map(s => (
|
||||||
|
@ -79,14 +79,14 @@ export class Sponsors extends Component<any, any> {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<h5>
|
<h5>
|
||||||
<T i18nKey="crypto">#</T>
|
{ i18n.t('crypto') }
|
||||||
</h5>
|
</h5>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-hover text-center">
|
<table class="table table-hover text-center">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<T i18nKey="bitcoin">#</T>
|
{ i18n.t('bitcoin') }
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<code>1Hefs7miXS5ff5Ck5xvmjKjXf5242KzRtK</code>
|
<code>1Hefs7miXS5ff5Ck5xvmjKjXf5242KzRtK</code>
|
||||||
|
@ -94,7 +94,7 @@ export class Sponsors extends Component<any, any> {
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<T i18nKey="ethereum">#</T>
|
{ i18n.t('ethereum') }
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<code>0x400c96c96acbC6E7B3B43B1dc1BB446540a88A01</code>
|
<code>0x400c96c96acbC6E7B3B43B1dc1BB446540a88A01</code>
|
||||||
|
@ -102,7 +102,7 @@ export class Sponsors extends Component<any, any> {
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<T i18nKey="monero">#</T>
|
{ i18n.t('monero') }
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<code>
|
<code>
|
||||||
|
|
|
@ -199,11 +199,11 @@ export class User extends Component<any, UserState> {
|
||||||
return (
|
return (
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{this.state.loading ? (
|
{this.state.loading ? (
|
||||||
<h5>
|
<p class="text-center">
|
||||||
<svg class="icon icon-spinner spin">
|
<svg class="icon icon-spinner spin">
|
||||||
<use xlinkHref="#icon-spinner"></use>
|
<use xlinkHref="#icon-spinner"></use>
|
||||||
</svg>
|
</svg>
|
||||||
</h5>
|
</p>
|
||||||
) : (
|
) : (
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-8">
|
<div class="col-12 col-md-8">
|
||||||
|
@ -246,19 +246,19 @@ export class User extends Component<any, UserState> {
|
||||||
class="custom-select custom-select-sm w-auto"
|
class="custom-select custom-select-sm w-auto"
|
||||||
>
|
>
|
||||||
<option disabled>
|
<option disabled>
|
||||||
<T i18nKey="view">#</T>
|
{ i18n.t('view') }
|
||||||
</option>
|
</option>
|
||||||
<option value={View.Overview}>
|
<option value={View.Overview}>
|
||||||
<T i18nKey="overview">#</T>
|
{ i18n.t('overview') }
|
||||||
</option>
|
</option>
|
||||||
<option value={View.Comments}>
|
<option value={View.Comments}>
|
||||||
<T i18nKey="comments">#</T>
|
{ i18n.t('comments') }
|
||||||
</option>
|
</option>
|
||||||
<option value={View.Posts}>
|
<option value={View.Posts}>
|
||||||
<T i18nKey="posts">#</T>
|
{ i18n.t('posts') }
|
||||||
</option>
|
</option>
|
||||||
<option value={View.Saved}>
|
<option value={View.Saved}>
|
||||||
<T i18nKey="saved">#</T>
|
{ i18n.t('saved') }
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
<span class="ml-2">
|
<span class="ml-2">
|
||||||
|
@ -359,7 +359,7 @@ export class User extends Component<any, UserState> {
|
||||||
<li className="list-inline-item">{user.name}</li>
|
<li className="list-inline-item">{user.name}</li>
|
||||||
{user.banned && (
|
{user.banned && (
|
||||||
<li className="list-inline-item badge badge-danger">
|
<li className="list-inline-item badge badge-danger">
|
||||||
<T i18nKey="banned">#</T>
|
{ i18n.t('banned') }
|
||||||
</li>
|
</li>
|
||||||
)}
|
)}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -412,7 +412,7 @@ export class User extends Component<any, UserState> {
|
||||||
class="btn btn-block btn-secondary mt-3"
|
class="btn btn-block btn-secondary mt-3"
|
||||||
onClick={linkEvent(this, this.handleLogoutClick)}
|
onClick={linkEvent(this, this.handleLogoutClick)}
|
||||||
>
|
>
|
||||||
<T i18nKey="logout">#</T>
|
{ i18n.t('logout') }
|
||||||
</button>
|
</button>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
|
@ -444,12 +444,12 @@ export class User extends Component<any, UserState> {
|
||||||
<div class="card border-secondary mb-3">
|
<div class="card border-secondary mb-3">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5>
|
<h5>
|
||||||
<T i18nKey="settings">#</T>
|
{ i18n.t('settings') }
|
||||||
</h5>
|
</h5>
|
||||||
<form onSubmit={linkEvent(this, this.handleUserSettingsSubmit)}>
|
<form onSubmit={linkEvent(this, this.handleUserSettingsSubmit)}>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>
|
<label>
|
||||||
<T i18nKey="avatar">#</T>
|
{ i18n.t('avatar') }
|
||||||
</label>
|
</label>
|
||||||
<form class="d-inline">
|
<form class="d-inline">
|
||||||
<label
|
<label
|
||||||
|
@ -458,7 +458,7 @@ export class User extends Component<any, UserState> {
|
||||||
>
|
>
|
||||||
{!this.state.userSettingsForm.avatar ? (
|
{!this.state.userSettingsForm.avatar ? (
|
||||||
<span class="btn btn-sm btn-secondary">
|
<span class="btn btn-sm btn-secondary">
|
||||||
<T i18nKey="upload_avatar">#</T>
|
{ i18n.t('upload_avatar') }
|
||||||
</span>
|
</span>
|
||||||
) : (
|
) : (
|
||||||
<img
|
<img
|
||||||
|
@ -482,7 +482,7 @@ export class User extends Component<any, UserState> {
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>
|
<label>
|
||||||
<T i18nKey="language">#</T>
|
{ i18n.t('language') }
|
||||||
</label>
|
</label>
|
||||||
<select
|
<select
|
||||||
value={this.state.userSettingsForm.lang}
|
value={this.state.userSettingsForm.lang}
|
||||||
|
@ -490,10 +490,10 @@ export class User extends Component<any, UserState> {
|
||||||
class="ml-2 custom-select custom-select-sm w-auto"
|
class="ml-2 custom-select custom-select-sm w-auto"
|
||||||
>
|
>
|
||||||
<option disabled>
|
<option disabled>
|
||||||
<T i18nKey="language">#</T>
|
{ i18n.t('language') }
|
||||||
</option>
|
</option>
|
||||||
<option value="browser">
|
<option value="browser">
|
||||||
<T i18nKey="browser_default">#</T>
|
{ i18n.t('browser_default') }
|
||||||
</option>
|
</option>
|
||||||
<option disabled>──</option>
|
<option disabled>──</option>
|
||||||
{languages.map(lang => (
|
{languages.map(lang => (
|
||||||
|
@ -503,7 +503,7 @@ export class User extends Component<any, UserState> {
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>
|
<label>
|
||||||
<T i18nKey="theme">#</T>
|
{ i18n.t('theme') }
|
||||||
</label>
|
</label>
|
||||||
<select
|
<select
|
||||||
value={this.state.userSettingsForm.theme}
|
value={this.state.userSettingsForm.theme}
|
||||||
|
@ -511,7 +511,7 @@ export class User extends Component<any, UserState> {
|
||||||
class="ml-2 custom-select custom-select-sm w-auto"
|
class="ml-2 custom-select custom-select-sm w-auto"
|
||||||
>
|
>
|
||||||
<option disabled>
|
<option disabled>
|
||||||
<T i18nKey="theme">#</T>
|
{ i18n.t('theme') }
|
||||||
</option>
|
</option>
|
||||||
{themes.map(theme => (
|
{themes.map(theme => (
|
||||||
<option value={theme}>{theme}</option>
|
<option value={theme}>{theme}</option>
|
||||||
|
@ -541,12 +541,13 @@ export class User extends Component<any, UserState> {
|
||||||
/>
|
/>
|
||||||
</form>
|
</form>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-lg-3 col-form-label">
|
<label class="col-lg-3 col-form-label" for="user-email">
|
||||||
<T i18nKey="email">#</T>
|
{ i18n.t('email') }
|
||||||
</label>
|
</label>
|
||||||
<div class="col-lg-9">
|
<div class="col-lg-9">
|
||||||
<input
|
<input
|
||||||
type="email"
|
type="email"
|
||||||
|
id="user-email"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
placeholder={i18n.t('optional')}
|
placeholder={i18n.t('optional')}
|
||||||
value={this.state.userSettingsForm.email}
|
value={this.state.userSettingsForm.email}
|
||||||
|
@ -579,12 +580,13 @@ export class User extends Component<any, UserState> {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-lg-5 col-form-label">
|
<label class="col-lg-5 col-form-label" for="user-password">
|
||||||
<T i18nKey="new_password">#</T>
|
{ i18n.t('new_password') }
|
||||||
</label>
|
</label>
|
||||||
<div class="col-lg-7">
|
<div class="col-lg-7">
|
||||||
<input
|
<input
|
||||||
type="password"
|
type="password"
|
||||||
|
id="user-password"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
value={this.state.userSettingsForm.new_password}
|
value={this.state.userSettingsForm.new_password}
|
||||||
onInput={linkEvent(
|
onInput={linkEvent(
|
||||||
|
@ -595,12 +597,13 @@ export class User extends Component<any, UserState> {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-lg-5 col-form-label">
|
<label class="col-lg-5 col-form-label" for="user-verify-password">
|
||||||
<T i18nKey="verify_password">#</T>
|
{ i18n.t('verify_password') }
|
||||||
</label>
|
</label>
|
||||||
<div class="col-lg-7">
|
<div class="col-lg-7">
|
||||||
<input
|
<input
|
||||||
type="password"
|
type="password"
|
||||||
|
id="user-verify-password"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
value={this.state.userSettingsForm.new_password_verify}
|
value={this.state.userSettingsForm.new_password_verify}
|
||||||
onInput={linkEvent(
|
onInput={linkEvent(
|
||||||
|
@ -611,12 +614,13 @@ export class User extends Component<any, UserState> {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-lg-5 col-form-label">
|
<label class="col-lg-5 col-form-label" for="user-old-password">
|
||||||
<T i18nKey="old_password">#</T>
|
{ i18n.t('old_password') }
|
||||||
</label>
|
</label>
|
||||||
<div class="col-lg-7">
|
<div class="col-lg-7">
|
||||||
<input
|
<input
|
||||||
type="password"
|
type="password"
|
||||||
|
id="user-old-password"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
value={this.state.userSettingsForm.old_password}
|
value={this.state.userSettingsForm.old_password}
|
||||||
onInput={linkEvent(
|
onInput={linkEvent(
|
||||||
|
@ -631,6 +635,7 @@ export class User extends Component<any, UserState> {
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input
|
<input
|
||||||
class="form-check-input"
|
class="form-check-input"
|
||||||
|
id="user-show-nsfw"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
checked={this.state.userSettingsForm.show_nsfw}
|
checked={this.state.userSettingsForm.show_nsfw}
|
||||||
onChange={linkEvent(
|
onChange={linkEvent(
|
||||||
|
@ -638,8 +643,8 @@ export class User extends Component<any, UserState> {
|
||||||
this.handleUserSettingsShowNsfwChange
|
this.handleUserSettingsShowNsfwChange
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<label class="form-check-label">
|
<label class="form-check-label" for="user-show-nsfw">
|
||||||
<T i18nKey="show_nsfw">#</T>
|
{ i18n.t('show_nsfw') }
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -648,6 +653,7 @@ export class User extends Component<any, UserState> {
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input
|
<input
|
||||||
class="form-check-input"
|
class="form-check-input"
|
||||||
|
id="user-show-avatars"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
checked={this.state.userSettingsForm.show_avatars}
|
checked={this.state.userSettingsForm.show_avatars}
|
||||||
onChange={linkEvent(
|
onChange={linkEvent(
|
||||||
|
@ -655,8 +661,8 @@ export class User extends Component<any, UserState> {
|
||||||
this.handleUserSettingsShowAvatarsChange
|
this.handleUserSettingsShowAvatarsChange
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<label class="form-check-label">
|
<label class="form-check-label" for="user-show-avatars">
|
||||||
<T i18nKey="show_avatars">#</T>
|
{ i18n.t('show_avatars') }
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -664,6 +670,7 @@ export class User extends Component<any, UserState> {
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input
|
<input
|
||||||
class="form-check-input"
|
class="form-check-input"
|
||||||
|
id="user-send-notifications-to-email"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
disabled={!this.state.user.email}
|
disabled={!this.state.user.email}
|
||||||
checked={
|
checked={
|
||||||
|
@ -674,8 +681,8 @@ export class User extends Component<any, UserState> {
|
||||||
this.handleUserSettingsSendNotificationsToEmailChange
|
this.handleUserSettingsSendNotificationsToEmailChange
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<label class="form-check-label">
|
<label class="form-check-label" for="user-send-notifications-to-email">
|
||||||
<T i18nKey="send_notifications_to_email">#</T>
|
{ i18n.t('send_notifications_to_email') }
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -699,12 +706,12 @@ export class User extends Component<any, UserState> {
|
||||||
this.handleDeleteAccountShowConfirmToggle
|
this.handleDeleteAccountShowConfirmToggle
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<T i18nKey="delete_account">#</T>
|
{ i18n.t('delete_account') }
|
||||||
</button>
|
</button>
|
||||||
{this.state.deleteAccountShowConfirm && (
|
{this.state.deleteAccountShowConfirm && (
|
||||||
<>
|
<>
|
||||||
<div class="my-2 alert alert-danger" role="alert">
|
<div class="my-2 alert alert-danger" role="alert">
|
||||||
<T i18nKey="delete_account_confirm">#</T>
|
{ i18n.t('delete_account_confirm') }
|
||||||
</div>
|
</div>
|
||||||
<input
|
<input
|
||||||
type="password"
|
type="password"
|
||||||
|
@ -735,7 +742,7 @@ export class User extends Component<any, UserState> {
|
||||||
this.handleDeleteAccountShowConfirmToggle
|
this.handleDeleteAccountShowConfirmToggle
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<T i18nKey="cancel">#</T>
|
{ i18n.t('cancel') }
|
||||||
</button>
|
</button>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
@ -754,7 +761,7 @@ export class User extends Component<any, UserState> {
|
||||||
<div class="card border-secondary mb-3">
|
<div class="card border-secondary mb-3">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5>
|
<h5>
|
||||||
<T i18nKey="moderates">#</T>
|
{ i18n.t('moderates') }
|
||||||
</h5>
|
</h5>
|
||||||
<ul class="list-unstyled mb-0">
|
<ul class="list-unstyled mb-0">
|
||||||
{this.state.moderates.map(community => (
|
{this.state.moderates.map(community => (
|
||||||
|
@ -779,7 +786,7 @@ export class User extends Component<any, UserState> {
|
||||||
<div class="card border-secondary mb-3">
|
<div class="card border-secondary mb-3">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5>
|
<h5>
|
||||||
<T i18nKey="subscribed">#</T>
|
{ i18n.t('subscribed') }
|
||||||
</h5>
|
</h5>
|
||||||
<ul class="list-unstyled mb-0">
|
<ul class="list-unstyled mb-0">
|
||||||
{this.state.follows.map(community => (
|
{this.state.follows.map(community => (
|
||||||
|
@ -812,7 +819,7 @@ export class User extends Component<any, UserState> {
|
||||||
class="btn btn-sm btn-secondary"
|
class="btn btn-sm btn-secondary"
|
||||||
onClick={linkEvent(this, this.nextPage)}
|
onClick={linkEvent(this, this.nextPage)}
|
||||||
>
|
>
|
||||||
<T i18nKey="next">#</T>
|
{ i18n.t('next') }
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -15,9 +15,9 @@ export const de = {
|
||||||
remove_comment: 'Kommentar löschen',
|
remove_comment: 'Kommentar löschen',
|
||||||
communities: 'Communities',
|
communities: 'Communities',
|
||||||
users: 'Benutzer',
|
users: 'Benutzer',
|
||||||
create_a_community: 'Eine Gemeinschaft anlegen',
|
create_a_community: 'Eine community anlegen',
|
||||||
create_community: 'Gemeinschaft anlegen',
|
create_community: 'Community anlegen',
|
||||||
remove_community: 'Gemeinschaft entfernen',
|
remove_community: 'Community entfernen',
|
||||||
subscribed_to_communities: 'Abonnierte <1>communities</1>',
|
subscribed_to_communities: 'Abonnierte <1>communities</1>',
|
||||||
trending_communities: 'Trending <1>communities</1>',
|
trending_communities: 'Trending <1>communities</1>',
|
||||||
list_of_communities: 'Liste von communities',
|
list_of_communities: 'Liste von communities',
|
||||||
|
@ -36,17 +36,17 @@ export const de = {
|
||||||
unsticky: 'nicht haftend',
|
unsticky: 'nicht haftend',
|
||||||
link: 'link',
|
link: 'link',
|
||||||
archive_link: 'Archiv-Link',
|
archive_link: 'Archiv-Link',
|
||||||
mod: 'Moderator',
|
mod: 'mod',
|
||||||
mods: 'Moderatoren',
|
mods: 'mods',
|
||||||
moderates: 'Moderiert',
|
moderates: 'Moderiert',
|
||||||
settings: 'Einstellungen',
|
settings: 'Einstellungen',
|
||||||
remove_as_mod: 'Als Moderator entfernen',
|
remove_as_mod: 'Als mod entfernen',
|
||||||
appoint_as_mod: 'Zum Moderator ernennen',
|
appoint_as_mod: 'Zum mod ernennen',
|
||||||
modlog: 'Modlog',
|
modlog: 'Modlog',
|
||||||
admin: 'Administrator',
|
admin: 'admin',
|
||||||
admins: 'Administratoren',
|
admins: 'admins',
|
||||||
remove_as_admin: 'Als Administrator entfernen',
|
remove_as_admin: 'Als admin entfernen',
|
||||||
appoint_as_admin: 'Zum Administrator ernennen',
|
appoint_as_admin: 'Zum admin ernennen',
|
||||||
remove: 'entfernen',
|
remove: 'entfernen',
|
||||||
removed: 'entfernt',
|
removed: 'entfernt',
|
||||||
locked: 'gesperrt',
|
locked: 'gesperrt',
|
||||||
|
@ -66,11 +66,11 @@ export const de = {
|
||||||
unban_from_site: 'Von der Seite entbannen',
|
unban_from_site: 'Von der Seite entbannen',
|
||||||
banned: 'gesperrt',
|
banned: 'gesperrt',
|
||||||
save: 'speichern',
|
save: 'speichern',
|
||||||
unsave: 'nicht speichern',
|
unsave: 'unsave',
|
||||||
create: 'anlegen',
|
create: 'anlegen',
|
||||||
creator: 'Ersteller',
|
creator: 'Ersteller',
|
||||||
username: 'Benutzername',
|
username: 'Username',
|
||||||
email_or_username: 'E-mail oder Username',
|
email_or_username: 'Email oder Username',
|
||||||
number_of_users: '{{count}} Benutzer',
|
number_of_users: '{{count}} Benutzer',
|
||||||
number_of_subscribers: '{{count}} Abonnenten',
|
number_of_subscribers: '{{count}} Abonnenten',
|
||||||
number_of_points: '{{count}} Punkte',
|
number_of_points: '{{count}} Punkte',
|
||||||
|
@ -86,7 +86,7 @@ export const de = {
|
||||||
subscribed: 'Abonniert',
|
subscribed: 'Abonniert',
|
||||||
prev: 'Zurück',
|
prev: 'Zurück',
|
||||||
next: 'Weiter',
|
next: 'Weiter',
|
||||||
sidebar: 'Seitenleiste',
|
sidebar: 'Sidebar',
|
||||||
sort_type: 'Sortieren nach',
|
sort_type: 'Sortieren nach',
|
||||||
hot: 'Hot',
|
hot: 'Hot',
|
||||||
new: 'Neu',
|
new: 'Neu',
|
||||||
|
@ -122,22 +122,22 @@ export const de = {
|
||||||
no_email_setup: "Dieser Server hat E-Mails nicht korrekt eingerichtet.",
|
no_email_setup: "Dieser Server hat E-Mails nicht korrekt eingerichtet.",
|
||||||
login: 'Einloggen',
|
login: 'Einloggen',
|
||||||
sign_up: 'Registrieren',
|
sign_up: 'Registrieren',
|
||||||
email: 'E-Mail',
|
email: 'Email',
|
||||||
optional: 'optional',
|
optional: 'Optional',
|
||||||
expires: 'Ablaufdatum',
|
expires: 'Ablaufdatum',
|
||||||
language: 'Sprache',
|
language: 'Sprache',
|
||||||
browser_default: 'Standard-Browser',
|
browser_default: 'Standard-Browser',
|
||||||
url: 'URL',
|
url: 'URL',
|
||||||
body: 'Text',
|
body: 'Text',
|
||||||
copy_suggested_title: 'Vorgeschlagenen Titel übernehmen: {{title}}',
|
copy_suggested_title: 'Vorgeschlagenen Titel übernehmen: {{title}}',
|
||||||
community: 'Gemeinschaft',
|
community: 'Community',
|
||||||
expand_here: 'hier erweitern',
|
expand_here: 'Expand here',
|
||||||
subscribe_to_communities: 'Abonniere ein paar <1>communities</1>.',
|
subscribe_to_communities: 'Abonniere ein paar <1>communities</1>.',
|
||||||
chat: 'Chat',
|
chat: 'Chat',
|
||||||
recent_comments: 'Neueste Kommentare',
|
recent_comments: 'Neueste Kommentare',
|
||||||
no_results: 'Keine Ergebnisse.',
|
no_results: 'Keine Ergebnisse.',
|
||||||
setup: 'Einrichten',
|
setup: 'Setup',
|
||||||
lemmy_instance_setup: 'Lemmy Instanz Einrichten',
|
lemmy_instance_setup: 'Lemmy Instanz Setup',
|
||||||
setup_admin: 'Seiten Administrator konfigurieren',
|
setup_admin: 'Seiten Administrator konfigurieren',
|
||||||
your_site: 'deine Seite',
|
your_site: 'deine Seite',
|
||||||
modified: 'verändert',
|
modified: 'verändert',
|
||||||
|
@ -151,7 +151,7 @@ export const de = {
|
||||||
support_on_patreon: 'Auf Patreon unterstützen',
|
support_on_patreon: 'Auf Patreon unterstützen',
|
||||||
general_sponsors:
|
general_sponsors:
|
||||||
'Allgemeine Sponsoren sind die, die zwischen $10 und $39 zu Lemmy beitragen.',
|
'Allgemeine Sponsoren sind die, die zwischen $10 und $39 zu Lemmy beitragen.',
|
||||||
crypto: 'Kryptowährung',
|
crypto: 'Crypto',
|
||||||
bitcoin: 'Bitcoin',
|
bitcoin: 'Bitcoin',
|
||||||
ethereum: 'Ethereum',
|
ethereum: 'Ethereum',
|
||||||
monero: 'Monero',
|
monero: 'Monero',
|
||||||
|
@ -159,16 +159,16 @@ export const de = {
|
||||||
joined: 'beigetreten',
|
joined: 'beigetreten',
|
||||||
by: 'von',
|
by: 'von',
|
||||||
to: 'bis',
|
to: 'bis',
|
||||||
transfer_community: 'Gemeinschaft übertragen',
|
transfer_community: 'Transfer-Community',
|
||||||
transfer_site: 'Transferseite',
|
transfer_site: 'Transferseite',
|
||||||
are_you_sure: 'Bist du sicher?',
|
are_you_sure: 'Bist du sicher?',
|
||||||
yes: 'Ja',
|
yes: 'Ja',
|
||||||
no: 'Nein',
|
no: 'Nein',
|
||||||
powered_by: 'Bereitgestellt durch',
|
powered_by: 'Bereitgestellt durch',
|
||||||
landing_0:
|
landing_0:
|
||||||
'Lemmy ist ein <1>Link-Aggregator</1> / Reddit Alternative im <2>Fediverse</2>.<3></3>Es ist selbst-hostbar, hat live-updates von Kommentar-threads und ist winzig (<4>~80kB</4>). Federation in das ActivityPub Netzwerk ist geplant. <5></5>Dies ist eine <6>sehr frühe Beta Version</6>, und viele Features funktionieren zurzeit nicht richtig oder fehlen. <7></7>Schlage neue Features vor oder melde Bugs <8>hier.</8><9></9>Gebaut mit <10>Rust</10>, <11>Actix</11>, <12>Inferno</12>, <13>Typescript</13>.',
|
'Lemmy ist ein <1>Link Aggregator</1> / Reddit Alternative im <2>Fediverse</2>.<3></3>Es ist selbst-hostbar, hat live-updates von Kommentar-threads und ist winzig (<4>~80kB</4>). Federation in das ActivityPub Netzwerk ist geplant. <5></5>Dies ist eine <6>sehr frühe Beta Version</6>, und viele Features funktionieren zurzeit nicht richtig oder fehlen. <7></7>Schlage neue Features vor oder melde Bugs <8>hier.</8><9></9>Gebaut mit <10>Rust</10>, <11>Actix</11>, <12>Inferno</12>, <13>Typescript</13>.',
|
||||||
not_logged_in: 'Nicht eingeloggt.',
|
not_logged_in: 'Nicht eingeloggt.',
|
||||||
community_ban: 'Du wurdest von dieser Gemeinschaft gebannt.',
|
community_ban: 'Du wurdest von dieser Community gebannt.',
|
||||||
site_ban: 'Du wurdest von dieser Seite gebannt',
|
site_ban: 'Du wurdest von dieser Seite gebannt',
|
||||||
couldnt_create_comment: 'Konnte Kommentar nicht anlegen.',
|
couldnt_create_comment: 'Konnte Kommentar nicht anlegen.',
|
||||||
couldnt_like_comment: 'Konnte nicht liken.',
|
couldnt_like_comment: 'Konnte nicht liken.',
|
||||||
|
@ -176,14 +176,14 @@ export const de = {
|
||||||
couldnt_save_comment: 'Konnte Kommentar nicht speichern.',
|
couldnt_save_comment: 'Konnte Kommentar nicht speichern.',
|
||||||
no_comment_edit_allowed: 'Keine Erlaubnis Kommentar zu editieren.',
|
no_comment_edit_allowed: 'Keine Erlaubnis Kommentar zu editieren.',
|
||||||
no_post_edit_allowed: 'Keine Erlaubnis Beitrag zu editieren.',
|
no_post_edit_allowed: 'Keine Erlaubnis Beitrag zu editieren.',
|
||||||
no_community_edit_allowed: 'Keine Erlaubnis Gemeinschaft zu editieren.',
|
no_community_edit_allowed: 'Keine Erlaubnis Community zu editieren.',
|
||||||
couldnt_find_community: 'Konnte Gemeinschaft nicht finden.',
|
couldnt_find_community: 'Konnte Community nicht finden.',
|
||||||
couldnt_update_community: 'Konnte Gemeinschaft nicht aktualisieren.',
|
couldnt_update_community: 'Konnte Community nicht aktualisieren.',
|
||||||
community_already_exists: 'Gemeinschaft existiert bereits.',
|
community_already_exists: 'Community existiert bereits.',
|
||||||
community_moderator_already_exists:
|
community_moderator_already_exists:
|
||||||
'Gemeinschaft Moderator existiert bereits.',
|
'Community Moderator existiert bereits.',
|
||||||
community_follower_already_exists: 'Gemeinschaft Follower existiert bereits.',
|
community_follower_already_exists: 'Community Follower existiert bereits.',
|
||||||
community_user_already_banned: 'Gemeinschaft Nutzer schon gebannt.',
|
community_user_already_banned: 'Community Nutzer schon gebannt.',
|
||||||
couldnt_create_post: 'Konnte Beitrag nicht anlegen.',
|
couldnt_create_post: 'Konnte Beitrag nicht anlegen.',
|
||||||
couldnt_like_post: 'Konnte Beitrag nicht liken.',
|
couldnt_like_post: 'Konnte Beitrag nicht liken.',
|
||||||
couldnt_find_post: 'Konnte Beitrag nicht finden.',
|
couldnt_find_post: 'Konnte Beitrag nicht finden.',
|
||||||
|
|
|
@ -230,5 +230,7 @@ export const en = {
|
||||||
couldnt_create_private_message: "Couldn't create private message.",
|
couldnt_create_private_message: "Couldn't create private message.",
|
||||||
no_private_message_edit_allowed: 'Not allowed to edit private message.',
|
no_private_message_edit_allowed: 'Not allowed to edit private message.',
|
||||||
couldnt_update_private_message: "Couldn't update private message.",
|
couldnt_update_private_message: "Couldn't update private message.",
|
||||||
|
time: 'Time',
|
||||||
|
action: 'Action'
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue