Change design of edit media modal in web UI (#33516)
This commit is contained in:
parent
4ebdfed8ea
commit
11786f1114
42 changed files with 919 additions and 900 deletions
|
@ -2,6 +2,8 @@ import { useCallback, useEffect } from 'react';
|
|||
|
||||
import { useIntl, defineMessages } from 'react-intl';
|
||||
|
||||
import classNames from 'classnames';
|
||||
|
||||
import { useIdentity } from '@/mastodon/identity_context';
|
||||
import { fetchRelationships, followAccount } from 'mastodon/actions/accounts';
|
||||
import { openModal } from 'mastodon/actions/modal';
|
||||
|
@ -20,7 +22,8 @@ const messages = defineMessages({
|
|||
|
||||
export const FollowButton: React.FC<{
|
||||
accountId?: string;
|
||||
}> = ({ accountId }) => {
|
||||
compact?: boolean;
|
||||
}> = ({ accountId, compact }) => {
|
||||
const intl = useIntl();
|
||||
const dispatch = useAppDispatch();
|
||||
const { signedIn } = useIdentity();
|
||||
|
@ -89,7 +92,9 @@ export const FollowButton: React.FC<{
|
|||
href='/settings/profile'
|
||||
target='_blank'
|
||||
rel='noopener'
|
||||
className='button button-secondary'
|
||||
className={classNames('button button-secondary', {
|
||||
'button--compact': compact,
|
||||
})}
|
||||
>
|
||||
{label}
|
||||
</a>
|
||||
|
@ -106,6 +111,7 @@ export const FollowButton: React.FC<{
|
|||
(account?.suspended || !!account?.moved))
|
||||
}
|
||||
secondary={following}
|
||||
compact={compact}
|
||||
className={following ? 'button--destructive' : undefined}
|
||||
>
|
||||
{label}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue