Add enable local public visibility setting for admin

This commit is contained in:
KMY 2023-09-23 09:18:50 +09:00
parent 454008e432
commit 8eae7e6179
15 changed files with 35 additions and 7 deletions

View file

@ -9,7 +9,7 @@ import { supportsPassiveEvents } from 'detect-passive-events';
import Overlay from 'react-overlays/Overlay';
import { Icon } from 'mastodon/components/icon';
import { enableLoginPrivacy } from 'mastodon/initial_state';
import { enableLoginPrivacy, enableLocalPrivacy } from 'mastodon/initial_state';
import { IconButton } from '../../../components/icon_button';
@ -246,6 +246,10 @@ class PrivacyDropdown extends PureComponent {
this.selectableOptions = this.selectableOptions.filter((opt) => opt.value !== 'login');
}
if (!enableLocalPrivacy) {
this.selectableOptions = this.selectableOptions.filter((opt) => opt.value !== 'public_unlisted');
}
if (this.props.noDirect) {
this.selectableOptions = this.selectableOptions.filter((opt) => opt.value !== 'direct');
}