Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide sensitive content #512

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions data/option-groups.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome'
import { faPalette } from '@fortawesome/free-solid-svg-icons/faPalette'
import { faRulerVertical } from '@fortawesome/free-solid-svg-icons/faRulerVertical'
import { faRuler } from '@fortawesome/free-solid-svg-icons/faRuler'
import { faEyeSlash } from '@fortawesome/free-solid-svg-icons/faEyeSlash'
import { faHandsPraying } from '@fortawesome/free-solid-svg-icons/faHandsPraying'
import { faPills } from '@fortawesome/free-solid-svg-icons/faPills'
import { faSmoking } from '@fortawesome/free-solid-svg-icons/faSmoking'
Expand Down Expand Up @@ -936,6 +937,33 @@ const themePickerOptionGroups: OptionGroup<OptionGroupThemePicker>[] = [
];

const generalSettingsOptionGroups: OptionGroup<OptionGroupButtons>[] = [
{
title: 'Hide Lewd Content',
Icon: () => (
<FontAwesomeIcon
icon={faEyeSlash}
size={14}
style={{color: 'black'}}
/>
),
description: "Do you want to hide content which was automatically flagged as being potentially lewd?",
input: {
buttons: {
values: yesNo,
submit: async function(hideLewdContent: string) {
const ok = (await japi(
'patch',
'/profile-info',
{ hide_lewd_content: hideLewdContent }
)).ok;
if (ok) {
this.currentValue = hideLewdContent;
}
return ok;
},
}
}
},
{
title: 'Units',
Icon: () => (
Expand Down
Loading