summaryrefslogtreecommitdiffstats
path: root/ui/src/components/user.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/user.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/user.tsx')
-rw-r--r--ui/src/components/user.tsx34
1 files changed, 18 insertions, 16 deletions
diff --git a/ui/src/components/user.tsx b/ui/src/components/user.tsx
index bf77d4b7..2624a966 100644
--- a/ui/src/components/user.tsx
+++ b/ui/src/components/user.tsx
@@ -496,24 +496,26 @@ export class User extends Component<any, UserState> {
/>
</div>
</form>
- <div class="form-group">
- <div class="col-12">
- <div class="form-check">
- <input
- class="form-check-input"
- type="checkbox"
- checked={this.state.userSettingsForm.show_nsfw}
- onChange={linkEvent(
- this,
- this.handleUserSettingsShowNsfwChange
- )}
- />
- <label class="form-check-label">
- <T i18nKey="show_nsfw">#</T>
- </label>
+ {WebSocketService.Instance.site.enable_nsfw && (
+ <div class="form-group">
+ <div class="col-12">
+ <div class="form-check">
+ <input
+ class="form-check-input"
+ type="checkbox"
+ checked={this.state.userSettingsForm.show_nsfw}
+ onChange={linkEvent(
+ this,
+ this.handleUserSettingsShowNsfwChange
+ )}
+ />
+ <label class="form-check-label">
+ <T i18nKey="show_nsfw">#</T>
+ </label>
+ </div>
</div>
</div>
- </div>
+ )}
<div class="form-group">
<div class="col-12">
<button