Add: #559 公開投稿を禁止する管理者設定 (#564)

This commit is contained in:
KMY(雪あすか) 2024-02-16 18:43:43 +09:00 committed by GitHub
parent f1ce14e396
commit c534c3d7fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 29 additions and 3 deletions

View file

@ -20,7 +20,7 @@ import QuietTimeIcon from '@/material-icons/400-24px/quiet_time.svg?react';
import ReplyIcon from '@/material-icons/400-24px/reply.svg?react';
import LimitedIcon from '@/material-icons/400-24px/shield.svg?react';
import { Icon } from 'mastodon/components/icon';
import { enableLoginPrivacy, enableLocalPrivacy } from 'mastodon/initial_state';
import { enableLoginPrivacy, enableLocalPrivacy, enablePublicPrivacy } from 'mastodon/initial_state';
const messages = defineMessages({
public_short: { id: 'privacy.public.short', defaultMessage: 'Public' },
@ -279,6 +279,10 @@ class PrivacyDropdown extends PureComponent {
this.options = this.options.filter((opt) => opt.value !== 'public_unlisted');
}
if (!enablePublicPrivacy) {
this.options = this.options.filter((opt) => opt.value !== 'public');
}
this.selectableOptions = [...this.options];
}