SoapboxConfig: make displayFqn configurable

This commit is contained in:
Alex Gleason 2021-04-10 16:21:10 -05:00
parent e03f551676
commit 6050991934
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
2 changed files with 8 additions and 1 deletions

View file

@ -42,7 +42,7 @@ export const defaultConfig = ImmutableMap({
}),
allowedEmoji: allowedEmoji,
verifiedCanEditName: false,
displayFqn: false,
displayFqn: true,
});
export function getSoapboxConfig(state) {

View file

@ -41,6 +41,7 @@ const messages = defineMessages({
rawJSONLabel: { id: 'soapbox_config.raw_json_label', defaultMessage: 'Advanced: Edit raw JSON data' },
rawJSONHint: { id: 'soapbox_config.raw_json_hint', defaultMessage: 'Edit the settings data directly. Changes made directly to the JSON file will override the form fields above. Click "Save" to apply your changes.' },
verifiedCanEditNameLabel: { id: 'soapbox_config.verified_can_edit_name_label', defaultMessage: 'Allow verified users to edit their own display name.' },
displayFqnLabel: { id: 'soapbox_config.display_fqn_label', defaultMessage: 'Display domain even for local accounts.' },
});
const listenerOptions = supportsPassiveEvents ? { passive: true } : false;
@ -241,6 +242,12 @@ class SoapboxConfig extends ImmutablePureComponent {
checked={soapbox.get('verifiedCanEditName') === true}
onChange={this.handleChange(['verifiedCanEditName'], (e) => e.target.checked)}
/>
<Checkbox
name='verifiedCanEditName'
label={intl.formatMessage(messages.displayFqnLabel)}
checked={soapbox.get('displayFqn') === true}
onChange={this.handleChange(['displayFqn'], (e) => e.target.checked)}
/>
</FieldsGroup>
<FieldsGroup>
<div className='input with_block_label popup'>