summaryrefslogtreecommitdiffstats
path: root/ui/src/components/post-form.tsx
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2019-12-11 12:21:47 -0800
committerDessalines <tyhou13@gmx.com>2019-12-11 12:21:47 -0800
commitfca8e6a0a9308340e88ad291c89c40e7d17f27be (patch)
tree7b5cdfa2323499d4f477645962baee2948f482ec /ui/src/components/post-form.tsx
parente9f476566378b6745ecb82808c0943550285c3fd (diff)
Adding some site oriented settings.
- Adding option to close registration. Fixes #350 - Adding option to disable showing NSFW buttons. Fixes #364 - Adding option to disable downvotes. Fixes #239
Diffstat (limited to 'ui/src/components/post-form.tsx')
-rw-r--r--ui/src/components/post-form.tsx28
1 files changed, 15 insertions, 13 deletions
diff --git a/ui/src/components/post-form.tsx b/ui/src/components/post-form.tsx
index a3ea8fa3..12fb42c5 100644
--- a/ui/src/components/post-form.tsx
+++ b/ui/src/components/post-form.tsx
@@ -280,21 +280,23 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
</div>
</div>
)}
- <div class="form-group row">
- <div class="col-sm-10">
- <div class="form-check">
- <input
- class="form-check-input"
- type="checkbox"
- checked={this.state.postForm.nsfw}
- onChange={linkEvent(this, this.handlePostNsfwChange)}
- />
- <label class="form-check-label">
- <T i18nKey="nsfw">#</T>
- </label>
+ {WebSocketService.Instance.site.enable_nsfw && (
+ <div class="form-group row">
+ <div class="col-sm-10">
+ <div class="form-check">
+ <input
+ class="form-check-input"
+ type="checkbox"
+ checked={this.state.postForm.nsfw}
+ onChange={linkEvent(this, this.handlePostNsfwChange)}
+ />
+ <label class="form-check-label">
+ <T i18nKey="nsfw">#</T>
+ </label>
+ </div>
</div>
</div>
- </div>
+ )}
<div class="form-group row">
<div class="col-sm-10">
<button type="submit" class="btn btn-secondary mr-2">