Disable the federation dropdown when editing posts
You're not allowed to change post visibility on an edit so the dropdown is misleading.
This commit is contained in:
parent
e1df6bc049
commit
7548424b02
|
@ -276,7 +276,7 @@ class ComposeForm extends ImmutablePureComponent {
|
|||
<PollButtonContainer />
|
||||
<PrivacyDropdownContainer disabled={this.props.isEditing} />
|
||||
<SpoilerButtonContainer />
|
||||
<FederationDropdownContainer />
|
||||
<FederationDropdownContainer disabled={this.props.isEditing} />
|
||||
<LanguageDropdown />
|
||||
</div>
|
||||
|
||||
|
|
|
@ -154,6 +154,7 @@ export default class FederationDropdown extends React.PureComponent {
|
|||
onModalClose: PropTypes.func,
|
||||
value: PropTypes.bool.isRequired,
|
||||
onChange: PropTypes.func.isRequired,
|
||||
disabled: PropTypes.bool,
|
||||
intl: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
|
@ -214,7 +215,7 @@ export default class FederationDropdown extends React.PureComponent {
|
|||
}
|
||||
|
||||
render () {
|
||||
const { value, intl } = this.props;
|
||||
const { value, intl, disabled } = this.props;
|
||||
const { open, placement } = this.state;
|
||||
|
||||
const valueOption = this.options.find(item => item.value === value);
|
||||
|
@ -232,6 +233,7 @@ export default class FederationDropdown extends React.PureComponent {
|
|||
inverted
|
||||
onClick={this.handleToggle}
|
||||
style={{ height: null, lineHeight: '27px' }}
|
||||
disabled={disabled}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue