diff options
Diffstat (limited to 'ui/src/components/user.tsx')
-rw-r--r-- | ui/src/components/user.tsx | 34 |
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 |