Merge remote-tracking branch 'soapbox/develop' into cleanup
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
@ -156,6 +156,7 @@ const ActionButton: React.FC<IActionButton> = ({ account, actionType, small }) =
|
||||
onClick={handleRemoteFollow}
|
||||
icon={require('@tabler/icons/plus.svg')}
|
||||
text={intl.formatMessage(messages.follow)}
|
||||
size='sm'
|
||||
/>
|
||||
);
|
||||
// Pleroma's classic remote follow form.
|
||||
@ -164,7 +165,11 @@ const ActionButton: React.FC<IActionButton> = ({ account, actionType, small }) =
|
||||
<form method='POST' action='/main/ostatus'>
|
||||
<input type='hidden' name='nickname' value={account.acct} />
|
||||
<input type='hidden' name='profile' value='' />
|
||||
<Button text={intl.formatMessage(messages.remote_follow)} type='submit' />
|
||||
<Button
|
||||
text={intl.formatMessage(messages.remote_follow)}
|
||||
type='submit'
|
||||
size='sm'
|
||||
/>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
|
||||
@ -0,0 +1,39 @@
|
||||
import React from 'react';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import { openModal } from 'soapbox/actions/modals';
|
||||
import { Button, Stack, Text } from 'soapbox/components/ui';
|
||||
import { useAppDispatch } from 'soapbox/hooks';
|
||||
|
||||
const NewEventPanel = () => {
|
||||
const dispatch = useAppDispatch();
|
||||
|
||||
const createEvent = () => {
|
||||
dispatch(openModal('COMPOSE_EVENT'));
|
||||
};
|
||||
|
||||
return (
|
||||
<Stack space={2}>
|
||||
<Stack>
|
||||
<Text size='lg' weight='bold'>
|
||||
<FormattedMessage id='new_event_panel.title' defaultMessage='Create New Event' />
|
||||
</Text>
|
||||
|
||||
<Text theme='muted' size='sm'>
|
||||
<FormattedMessage id='new_event_panel.subtitle' defaultMessage="Can't find what you're looking for? Schedule your own event." />
|
||||
</Text>
|
||||
</Stack>
|
||||
|
||||
<Button
|
||||
icon={require('@tabler/icons/calendar-event.svg')}
|
||||
onClick={createEvent}
|
||||
theme='secondary'
|
||||
block
|
||||
>
|
||||
<FormattedMessage id='new_event_panel.action' defaultMessage='Create event' />
|
||||
</Button>
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
|
||||
export default NewEventPanel;
|
||||
@ -32,12 +32,12 @@ const SubscriptionButton = ({ account }: ISubscriptionButton) => {
|
||||
|
||||
const isFollowing = account.relationship?.following;
|
||||
const isRequested = account.relationship?.requested;
|
||||
const isSubscribed = features.accountNotifies ?
|
||||
account.relationship?.notifying :
|
||||
account.relationship?.subscribing;
|
||||
const title = isSubscribed ?
|
||||
intl.formatMessage(messages.unsubscribe, { name: account.get('username') }) :
|
||||
intl.formatMessage(messages.subscribe, { name: account.get('username') });
|
||||
const isSubscribed = features.accountNotifies
|
||||
? account.relationship?.notifying
|
||||
: account.relationship?.subscribing;
|
||||
const title = isSubscribed
|
||||
? intl.formatMessage(messages.unsubscribe, { name: account.get('username') })
|
||||
: intl.formatMessage(messages.subscribe, { name: account.get('username') });
|
||||
|
||||
const onSubscribeSuccess = () =>
|
||||
toast.success(intl.formatMessage(messages.subscribeSuccess));
|
||||
|
||||
Reference in New Issue
Block a user