Always allow users to control whether they see NSFW content

This commit is contained in:
sunaurus 2023-06-18 14:02:49 +03:00
parent b19df45969
commit 3f80010434
No known key found for this signature in database
2 changed files with 27 additions and 35 deletions

View file

@ -298,7 +298,6 @@ export class Signup extends Component<any, State> {
</> </>
)} )}
{this.renderCaptcha()} {this.renderCaptcha()}
{siteView.local_site.enable_nsfw && (
<div className="form-group row"> <div className="form-group row">
<div className="col-sm-10"> <div className="col-sm-10">
<div className="form-check"> <div className="form-check">
@ -309,16 +308,12 @@ export class Signup extends Component<any, State> {
checked={this.state.form.show_nsfw} checked={this.state.form.show_nsfw}
onChange={linkEvent(this, this.handleRegisterShowNsfwChange)} onChange={linkEvent(this, this.handleRegisterShowNsfwChange)}
/> />
<label <label className="form-check-label" htmlFor="register-show-nsfw">
className="form-check-label"
htmlFor="register-show-nsfw"
>
{i18n.t("show_nsfw")} {i18n.t("show_nsfw")}
</label> </label>
</div> </div>
</div> </div>
</div> </div>
)}
<input <input
tabIndex={-1} tabIndex={-1}
autoComplete="false" autoComplete="false"

View file

@ -21,7 +21,6 @@ import {
debounce, debounce,
elementUrl, elementUrl,
emDash, emDash,
enableNsfw,
fetchCommunities, fetchCommunities,
fetchThemeList, fetchThemeList,
fetchUsers, fetchUsers,
@ -642,7 +641,6 @@ export class Settings extends Component<any, SettingsState> {
/> />
</div> </div>
</form> </form>
{enableNsfw(this.state.siteRes) && (
<div className="form-group"> <div className="form-group">
<div className="form-check"> <div className="form-check">
<input <input
@ -657,7 +655,6 @@ export class Settings extends Component<any, SettingsState> {
</label> </label>
</div> </div>
</div> </div>
)}
<div className="form-group"> <div className="form-group">
<div className="form-check"> <div className="form-check">
<input <input