Remove isVerified() function
This commit is contained in:
parent
3095ee5db1
commit
d86eac4c1a
|
@ -4,7 +4,6 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
import HoverRefWrapper from 'soapbox/components/hover_ref_wrapper';
|
import HoverRefWrapper from 'soapbox/components/hover_ref_wrapper';
|
||||||
import { isVerified } from 'soapbox/utils/accounts';
|
|
||||||
import { displayFqn } from 'soapbox/utils/state';
|
import { displayFqn } from 'soapbox/utils/state';
|
||||||
|
|
||||||
import { getAcct } from '../utils/accounts';
|
import { getAcct } from '../utils/accounts';
|
||||||
|
@ -38,7 +37,7 @@ class DisplayName extends React.PureComponent {
|
||||||
const { account, displayFqn, others, children, withDate } = this.props;
|
const { account, displayFqn, others, children, withDate } = this.props;
|
||||||
|
|
||||||
let displayName, suffix;
|
let displayName, suffix;
|
||||||
const verified = isVerified(account);
|
const verified = account.get('verified');
|
||||||
|
|
||||||
const createdAt = account.get('created_at');
|
const createdAt = account.get('created_at');
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,6 @@ import {
|
||||||
isStaff,
|
isStaff,
|
||||||
isAdmin,
|
isAdmin,
|
||||||
isModerator,
|
isModerator,
|
||||||
isVerified,
|
|
||||||
isLocal,
|
isLocal,
|
||||||
isRemote,
|
isRemote,
|
||||||
getDomain,
|
getDomain,
|
||||||
|
@ -451,7 +450,7 @@ class Header extends ImmutablePureComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isVerified(account)) {
|
if (account.get('verified')) {
|
||||||
menu.push({
|
menu.push({
|
||||||
text: intl.formatMessage(messages.unverifyUser, { name: account.get('username') }),
|
text: intl.formatMessage(messages.unverifyUser, { name: account.get('username') }),
|
||||||
action: this.props.onUnverifyUser,
|
action: this.props.onUnverifyUser,
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
import StillImage from 'soapbox/components/still_image';
|
import StillImage from 'soapbox/components/still_image';
|
||||||
import VerificationBadge from 'soapbox/components/verification_badge';
|
import VerificationBadge from 'soapbox/components/verification_badge';
|
||||||
import { getAcct, isVerified } from 'soapbox/utils/accounts';
|
import { getAcct } from 'soapbox/utils/accounts';
|
||||||
import { displayFqn } from 'soapbox/utils/state';
|
import { displayFqn } from 'soapbox/utils/state';
|
||||||
|
|
||||||
const mapStateToProps = state => ({
|
const mapStateToProps = state => ({
|
||||||
|
@ -28,7 +28,7 @@ const ProfilePreview = ({ account, displayFqn }) => (
|
||||||
<bdi>
|
<bdi>
|
||||||
<strong className='emojify p-name'>
|
<strong className='emojify p-name'>
|
||||||
{account.get('display_name')}
|
{account.get('display_name')}
|
||||||
{isVerified(account) && <VerificationBadge />}
|
{account.get('verified') && <VerificationBadge />}
|
||||||
</strong>
|
</strong>
|
||||||
</bdi>
|
</bdi>
|
||||||
<span>@{getAcct(account, displayFqn)}</span>
|
<span>@{getAcct(account, displayFqn)}</span>
|
||||||
|
|
|
@ -25,7 +25,6 @@ import {
|
||||||
SimpleTextarea,
|
SimpleTextarea,
|
||||||
} from 'soapbox/features/forms';
|
} from 'soapbox/features/forms';
|
||||||
import { makeGetAccount } from 'soapbox/selectors';
|
import { makeGetAccount } from 'soapbox/selectors';
|
||||||
import { isVerified } from 'soapbox/utils/accounts';
|
|
||||||
import { getFeatures } from 'soapbox/utils/features';
|
import { getFeatures } from 'soapbox/utils/features';
|
||||||
import resizeImage from 'soapbox/utils/resize_image';
|
import resizeImage from 'soapbox/utils/resize_image';
|
||||||
|
|
||||||
|
@ -263,7 +262,7 @@ class EditProfile extends ImmutablePureComponent {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { intl, maxFields, account, verifiedCanEditName, supportsBirthdays, supportsEmailList } = this.props;
|
const { intl, maxFields, account, verifiedCanEditName, supportsBirthdays, supportsEmailList } = this.props;
|
||||||
const verified = isVerified(account);
|
const verified = account.get('verified');
|
||||||
const canEditName = verifiedCanEditName || !verified;
|
const canEditName = verifiedCanEditName || !verified;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -15,7 +15,7 @@ import Icon from 'soapbox/components/icon';
|
||||||
import VerificationBadge from 'soapbox/components/verification_badge';
|
import VerificationBadge from 'soapbox/components/verification_badge';
|
||||||
import BundleContainer from 'soapbox/features/ui/containers/bundle_container';
|
import BundleContainer from 'soapbox/features/ui/containers/bundle_container';
|
||||||
import { CryptoAddress } from 'soapbox/features/ui/util/async-components';
|
import { CryptoAddress } from 'soapbox/features/ui/util/async-components';
|
||||||
import { getAcct, isAdmin, isModerator, isLocal, isVerified } from 'soapbox/utils/accounts';
|
import { getAcct, isAdmin, isModerator, isLocal } from 'soapbox/utils/accounts';
|
||||||
import { displayFqn } from 'soapbox/utils/state';
|
import { displayFqn } from 'soapbox/utils/state';
|
||||||
|
|
||||||
import ProfileStats from './profile_stats';
|
import ProfileStats from './profile_stats';
|
||||||
|
@ -147,7 +147,7 @@ class ProfileInfoPanel extends ImmutablePureComponent {
|
||||||
const deactivated = !account.getIn(['pleroma', 'is_active'], true);
|
const deactivated = !account.getIn(['pleroma', 'is_active'], true);
|
||||||
const displayNameHtml = deactivated ? { __html: intl.formatMessage(messages.deactivated) } : { __html: account.get('display_name_html') };
|
const displayNameHtml = deactivated ? { __html: intl.formatMessage(messages.deactivated) } : { __html: account.get('display_name_html') };
|
||||||
const memberSinceDate = intl.formatDate(account.get('created_at'), { month: 'long', year: 'numeric' });
|
const memberSinceDate = intl.formatDate(account.get('created_at'), { month: 'long', year: 'numeric' });
|
||||||
const verified = isVerified(account);
|
const verified = account.get('verified');
|
||||||
const badges = this.getBadges();
|
const badges = this.getBadges();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { Link } from 'react-router-dom';
|
||||||
import Avatar from 'soapbox/components/avatar';
|
import Avatar from 'soapbox/components/avatar';
|
||||||
import StillImage from 'soapbox/components/still_image';
|
import StillImage from 'soapbox/components/still_image';
|
||||||
import VerificationBadge from 'soapbox/components/verification_badge';
|
import VerificationBadge from 'soapbox/components/verification_badge';
|
||||||
import { getAcct, isVerified } from 'soapbox/utils/accounts';
|
import { getAcct } from 'soapbox/utils/accounts';
|
||||||
import { shortNumberFormat } from 'soapbox/utils/numbers';
|
import { shortNumberFormat } from 'soapbox/utils/numbers';
|
||||||
import { displayFqn } from 'soapbox/utils/state';
|
import { displayFqn } from 'soapbox/utils/state';
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ class UserPanel extends ImmutablePureComponent {
|
||||||
<h1>
|
<h1>
|
||||||
<Link to={`/@${account.get('acct')}`}>
|
<Link to={`/@${account.get('acct')}`}>
|
||||||
<span className='user-panel__account__name' dangerouslySetInnerHTML={displayNameHtml} />
|
<span className='user-panel__account__name' dangerouslySetInnerHTML={displayNameHtml} />
|
||||||
{isVerified(account) && <VerificationBadge />}
|
{account.get('verified') && <VerificationBadge />}
|
||||||
<small className='user-panel__account__username'>@{getAcct(account, displayFqn)}</small>
|
<small className='user-panel__account__username'>@{getAcct(account, displayFqn)}</small>
|
||||||
</Link>
|
</Link>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
|
@ -64,8 +64,6 @@ export const isLocal = account => {
|
||||||
|
|
||||||
export const isRemote = account => !isLocal(account);
|
export const isRemote = account => !isLocal(account);
|
||||||
|
|
||||||
export const isVerified = account => account.get('verified') === true;
|
|
||||||
|
|
||||||
export const accountToMention = account => {
|
export const accountToMention = account => {
|
||||||
return ImmutableMap({
|
return ImmutableMap({
|
||||||
id: account.get('id'),
|
id: account.get('id'),
|
||||||
|
|
Loading…
Reference in New Issue