diff --git a/app/javascript/gabsocial/actions/identity_proofs.js b/app/javascript/gabsocial/actions/identity_proofs.js deleted file mode 100644 index 449debf6..00000000 --- a/app/javascript/gabsocial/actions/identity_proofs.js +++ /dev/null @@ -1,30 +0,0 @@ -import api from '../api'; - -export const IDENTITY_PROOFS_ACCOUNT_FETCH_REQUEST = 'IDENTITY_PROOFS_ACCOUNT_FETCH_REQUEST'; -export const IDENTITY_PROOFS_ACCOUNT_FETCH_SUCCESS = 'IDENTITY_PROOFS_ACCOUNT_FETCH_SUCCESS'; -export const IDENTITY_PROOFS_ACCOUNT_FETCH_FAIL = 'IDENTITY_PROOFS_ACCOUNT_FETCH_FAIL'; - -export const fetchAccountIdentityProofs = accountId => (dispatch, getState) => { - dispatch(fetchAccountIdentityProofsRequest(accountId)); - - api(getState).get(`/api/v1/accounts/${accountId}/identity_proofs`) - .then(({ data }) => dispatch(fetchAccountIdentityProofsSuccess(accountId, data))) - .catch(err => dispatch(fetchAccountIdentityProofsFail(accountId, err))); -}; - -export const fetchAccountIdentityProofsRequest = id => ({ - type: IDENTITY_PROOFS_ACCOUNT_FETCH_REQUEST, - id, -}); - -export const fetchAccountIdentityProofsSuccess = (accountId, identity_proofs) => ({ - type: IDENTITY_PROOFS_ACCOUNT_FETCH_SUCCESS, - accountId, - identity_proofs, -}); - -export const fetchAccountIdentityProofsFail = (accountId, err) => ({ - type: IDENTITY_PROOFS_ACCOUNT_FETCH_FAIL, - accountId, - err, -}); diff --git a/app/javascript/gabsocial/components/panel/profile_info_panel.js b/app/javascript/gabsocial/components/panel/profile_info_panel.js index 2f5ca887..1000827d 100644 --- a/app/javascript/gabsocial/components/panel/profile_info_panel.js +++ b/app/javascript/gabsocial/components/panel/profile_info_panel.js @@ -18,21 +18,11 @@ const messages = defineMessages({ memberSince: { id: 'account.member_since', defaultMessage: 'Member since {date}' }, }) -const mapStateToProps = (state, { account }) => { - const identityProofs = !!account ? state.getIn(['identity_proofs', account.get('id')], ImmutableList()) : ImmutableList() - return { - identityProofs, - domain: state.getIn(['meta', 'domain']), - } -} - export default -@connect(mapStateToProps, null) @injectIntl class ProfileInfoPanel extends ImmutablePureComponent { static propTypes = { - identityProofs: ImmutablePropTypes.list, account: ImmutablePropTypes.map, noPanel: PropTypes.bool, intl: PropTypes.object.isRequired, @@ -42,7 +32,6 @@ class ProfileInfoPanel extends ImmutablePureComponent { const { intl, account, - identityProofs, noPanel } = this.props @@ -112,35 +101,9 @@ class ProfileInfoPanel extends ImmutablePureComponent { } - {(fields.size > 0 || identityProofs.size > 0) && ( + { + fields.size > 0 &&
- )} + } diff --git a/app/javascript/gabsocial/features/account_timeline.js b/app/javascript/gabsocial/features/account_timeline.js index eb9a16df..f25ad168 100644 --- a/app/javascript/gabsocial/features/account_timeline.js +++ b/app/javascript/gabsocial/features/account_timeline.js @@ -3,7 +3,6 @@ import ImmutablePureComponent from 'react-immutable-pure-component' import { List as ImmutableList } from 'immutable' import { injectIntl, defineMessages } from 'react-intl' import { expandAccountFeaturedTimeline, expandAccountTimeline } from '../actions/timelines' -import { fetchAccountIdentityProofs } from '../actions/identity_proofs' import StatusList from '../components/status_list' const messages = defineMessages({ @@ -46,8 +45,6 @@ class AccountTimeline extends ImmutablePureComponent { const { accountId, commentsOnly } = this.props if (accountId && accountId !== -1) { - this.props.dispatch(fetchAccountIdentityProofs(accountId)) - if (!commentsOnly) { this.props.dispatch(expandAccountFeaturedTimeline(accountId)) } @@ -58,8 +55,6 @@ class AccountTimeline extends ImmutablePureComponent { componentWillReceiveProps(nextProps) { if (nextProps.accountId && nextProps.accountId !== -1 && (nextProps.accountId !== this.props.accountId && nextProps.accountId) || nextProps.commentsOnly !== this.props.commentsOnly) { - this.props.dispatch(fetchAccountIdentityProofs(nextProps.accountId)) - if (!nextProps.commentsOnly) { this.props.dispatch(expandAccountFeaturedTimeline(nextProps.accountId)) } diff --git a/app/javascript/gabsocial/reducers/identity_proofs.js b/app/javascript/gabsocial/reducers/identity_proofs.js deleted file mode 100644 index 58af0a5f..00000000 --- a/app/javascript/gabsocial/reducers/identity_proofs.js +++ /dev/null @@ -1,25 +0,0 @@ -import { Map as ImmutableMap, fromJS } from 'immutable'; -import { - IDENTITY_PROOFS_ACCOUNT_FETCH_REQUEST, - IDENTITY_PROOFS_ACCOUNT_FETCH_SUCCESS, - IDENTITY_PROOFS_ACCOUNT_FETCH_FAIL, -} from '../actions/identity_proofs'; - -const initialState = ImmutableMap(); - -export default function identityProofsReducer(state = initialState, action) { - switch(action.type) { - case IDENTITY_PROOFS_ACCOUNT_FETCH_REQUEST: - return state.set('isLoading', true); - case IDENTITY_PROOFS_ACCOUNT_FETCH_FAIL: - return state.set('isLoading', false); - case IDENTITY_PROOFS_ACCOUNT_FETCH_SUCCESS: - return state.update(identity_proofs => identity_proofs.withMutations(map => { - map.set('isLoading', false); - map.set('loaded', true); - map.set(action.accountId, fromJS(action.identity_proofs)); - })); - default: - return state; - } -}; diff --git a/app/javascript/gabsocial/reducers/index.js b/app/javascript/gabsocial/reducers/index.js index 86c6c4aa..607954a2 100644 --- a/app/javascript/gabsocial/reducers/index.js +++ b/app/javascript/gabsocial/reducers/index.js @@ -14,7 +14,6 @@ import group_lists from './group_lists' import group_relationships from './group_relationships' import hashtags from './hashtags' import height_cache from './height_cache' -import identity_proofs from './identity_proofs' import lists from './lists' import listAdder from './list_adder' import listEditor from './list_editor' @@ -54,7 +53,6 @@ const reducers = { group_relationships, hashtags, height_cache, - identity_proofs, lists, listAdder, listEditor, diff --git a/app/views/settings/profiles/show.html.haml b/app/views/settings/profiles/show.html.haml index 115d8474..b79b4c43 100644 --- a/app/views/settings/profiles/show.html.haml +++ b/app/views/settings/profiles/show.html.haml @@ -44,15 +44,6 @@ = fields_f.input :name, placeholder: t('simple_form.labels.account.fields.name'), input_html: { maxlength: 255 } = fields_f.input :value, placeholder: t('simple_form.labels.account.fields.value'), input_html: { maxlength: 255 } - .fields-row__column.fields-group.fields-row__column-6 - %h6= t('verification.verification') - %p.hint= t('verification.explanation_html') - - .input-copy - .input-copy__wrapper - %input{ type: :text, maxlength: '999', spellcheck: 'false', readonly: 'true', value: link_to('Gab Social', ActivityPub::TagManager.instance.url_for(@account), rel: 'me').to_str } - %button{ type: :button }= t('generic.copy') - .actions = f.button :button, t('generic.save_changes'), type: :submit diff --git a/config/routes.rb b/config/routes.rb index 5162d13a..258bd245 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -402,7 +402,6 @@ Rails.application.routes.draw do resources :followers, only: :index, controller: 'accounts/follower_accounts' resources :following, only: :index, controller: 'accounts/following_accounts' resources :lists, only: :index, controller: 'accounts/lists' - resources :identity_proofs, only: :index, controller: 'accounts/identity_proofs' member do post :follow