From 1cc775200eab449c90e1ebb463ee19ee76c2935b Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 15 Jun 2018 15:51:37 +0200 Subject: Add "find friends", "invite people", and more to getting started footer (#7803) - Find friends from Twitter (bridge) - Invite people (when invites enabled) - Security (change e-mail/password) - Developers (create OAuth apps/tokens) --- app/javascript/mastodon/features/getting_started/index.js | 6 +++++- app/javascript/mastodon/initial_state.js | 1 + app/serializers/initial_state_serializer.rb | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/features/getting_started/index.js b/app/javascript/mastodon/features/getting_started/index.js index 115dfd2b9..0df2d8bbf 100644 --- a/app/javascript/mastodon/features/getting_started/index.js +++ b/app/javascript/mastodon/features/getting_started/index.js @@ -7,7 +7,7 @@ import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import { me } from '../../initial_state'; +import { me, invitesEnabled } from '../../initial_state'; import { fetchFollowRequests } from '../../actions/accounts'; import { List as ImmutableList } from 'immutable'; import { Link } from 'react-router-dom'; @@ -135,9 +135,13 @@ export default class GettingStarted extends ImmutablePureComponent {
diff --git a/app/javascript/mastodon/initial_state.js b/app/javascript/mastodon/initial_state.js index df310e7e1..807262fd7 100644 --- a/app/javascript/mastodon/initial_state.js +++ b/app/javascript/mastodon/initial_state.js @@ -11,5 +11,6 @@ export const boostModal = getMeta('boost_modal'); export const deleteModal = getMeta('delete_modal'); export const me = getMeta('me'); export const searchEnabled = getMeta('search_enabled'); +export const invitesEnabled = getMeta('invites_enabled'); export default initialState; diff --git a/app/serializers/initial_state_serializer.rb b/app/serializers/initial_state_serializer.rb index 6c9fba2f5..42d0e4bf3 100644 --- a/app/serializers/initial_state_serializer.rb +++ b/app/serializers/initial_state_serializer.rb @@ -14,6 +14,7 @@ class InitialStateSerializer < ActiveModel::Serializer domain: Rails.configuration.x.local_domain, admin: object.admin&.id&.to_s, search_enabled: Chewy.enabled?, + invites_enabled: Setting.min_invite_role == 'user', } if object.current_account -- cgit