diff --git a/app/soapbox/features/edit_profile/index.js b/app/soapbox/features/edit_profile/index.js index b75995bc9..b683e8f19 100644 --- a/app/soapbox/features/edit_profile/index.js +++ b/app/soapbox/features/edit_profile/index.js @@ -56,12 +56,13 @@ const makeMapStateToProps = () => { const me = state.get('me'); const account = getAccount(state, me); const soapbox = getSoapboxConfig(state); + const features = getFeatures(state.instance); return { account, + features, maxFields: state.getIn(['instance', 'pleroma', 'metadata', 'fields_limits', 'max_fields'], 4), verifiedCanEditName: soapbox.get('verifiedCanEditName'), - supportsEmailList: getFeatures(state.get('instance')).emailList, }; }; @@ -242,7 +243,7 @@ class EditProfile extends ImmutablePureComponent { } render() { - const { intl, account, verifiedCanEditName, supportsEmailList /* maxFields */ } = this.props; + const { intl, account, verifiedCanEditName, features /* maxFields */ } = this.props; const verified = account.get('verified'); const canEditName = verifiedCanEditName || !verified; @@ -262,27 +263,31 @@ class EditProfile extends ImmutablePureComponent { /> - } - > - - + {features.accountLocation && ( + } + > + + + )} - } - > - - + {features.accountWebsite && ( + } + > + + + )} } @@ -351,13 +356,15 @@ class EditProfile extends ImmutablePureComponent { checked={this.state.discoverable} onChange={this.handleCheckboxChange} />*/} - {supportsEmailList && } - hint={} - name='accepts_email_list' - checked={this.state.accepts_email_list} - onChange={this.handleCheckboxChange} - />} + {features.emailList && ( + } + hint={} + name='accepts_email_list' + checked={this.state.accepts_email_list} + onChange={this.handleCheckboxChange} + /> + )} {/* */} {/*
diff --git a/app/soapbox/utils/features.ts b/app/soapbox/utils/features.ts index 94c0da574..2fdc310f9 100644 --- a/app/soapbox/utils/features.ts +++ b/app/soapbox/utils/features.ts @@ -142,6 +142,8 @@ const getInstanceFeatures = (instance: Instance) => { trendingTruths: v.software === TRUTHSOCIAL, trendingStatuses: v.software === MASTODON && gte(v.compatVersion, '3.5.0'), pepe: v.software === TRUTHSOCIAL, + accountLocation: v.software === TRUTHSOCIAL, + accountWebsite: v.software === TRUTHSOCIAL, // FIXME: long-term this shouldn't be a feature, // but for now we want it to be overrideable in the build