Improve pending/scheduled statuses styles

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
environments/review-scheduled-fy427d/deployments/4516
marcin mikołajczak 6 months ago
parent 2c3095f52c
commit 4a11d56832

@ -81,7 +81,7 @@ class EmojiNode extends DecoratorNode<JSX.Element> {
decorate(): JSX.Element {
const emoji = this.__emoji;
if (isNativeEmoji(emoji)) {
return <Component emoji={emoji.native} alt={emoji.colons} className='emojione h-4 w-4' />;
return <Component emoji={emoji.native} alt={emoji.colons} className='emojione h-4 w-4' />;
} else {
return <Component src={emoji.imageUrl} alt={emoji.colons} className='emojione h-4 w-4' />;
}

@ -1,11 +1,10 @@
import React from 'react';
import { defineMessages, useIntl } from 'react-intl';
import { FormattedMessage, defineMessages, useIntl } from 'react-intl';
import { openModal } from 'soapbox/actions/modals';
import { cancelScheduledStatus } from 'soapbox/actions/scheduled-statuses';
import { getSettings } from 'soapbox/actions/settings';
import IconButton from 'soapbox/components/icon-button';
import { HStack } from 'soapbox/components/ui';
import { Button, HStack } from 'soapbox/components/ui';
import { useAppDispatch } from 'soapbox/hooks';
import type { Status as StatusEntity } from 'soapbox/types/entities';
@ -46,12 +45,9 @@ const ScheduledStatusActionBar: React.FC<IScheduledStatusActionBar> = ({ status
return (
<HStack justifyContent='end'>
<IconButton
title={intl.formatMessage(messages.cancel)}
text={intl.formatMessage(messages.cancel)}
src={require('@tabler/icons/outline/x.svg')}
onClick={handleCancelClick}
/>
<Button theme='danger' size='sm' onClick={handleCancelClick}>
<FormattedMessage id='scheduled_status.cancel' defaultMessage='Cancel' />
</Button>
</HStack>
);
};

@ -5,7 +5,7 @@ import Account from 'soapbox/components/account';
import AttachmentThumbs from 'soapbox/components/attachment-thumbs';
import StatusContent from 'soapbox/components/status-content';
import StatusReplyMentions from 'soapbox/components/status-reply-mentions';
import { HStack } from 'soapbox/components/ui';
import { HStack, Stack } from 'soapbox/components/ui';
import PollPreview from 'soapbox/features/ui/components/poll-preview';
import { useAppSelector } from 'soapbox/hooks';
@ -40,28 +40,28 @@ const ScheduledStatus: React.FC<IScheduledStatus> = ({ statusId, ...other }) =>
account={account}
timestamp={status.created_at}
futureTimestamp
hideActions
action={<ScheduledStatusActionBar status={status} {...other} />}
/>
</HStack>
</div>
<StatusReplyMentions status={status} />
<StatusContent
status={status}
collapsable
/>
{status.media_attachments.size > 0 && (
<AttachmentThumbs
media={status.media_attachments}
sensitive={status.sensitive}
<Stack space={4}>
<StatusContent
status={status}
collapsable
/>
)}
{status.poll && <PollPreview pollId={status.poll as string} />}
{status.media_attachments.size > 0 && (
<AttachmentThumbs
media={status.media_attachments}
sensitive={status.sensitive}
/>
)}
<ScheduledStatusActionBar status={status} {...other} />
{status.poll && <PollPreview pollId={status.poll as string} />}
</Stack>
</div>
</div>
);

@ -39,6 +39,7 @@ const ScheduledStatuses = () => {
isLoading={typeof isLoading === 'boolean' ? isLoading : true}
onLoadMore={() => handleLoadMore(dispatch)}
emptyMessage={emptyMessage}
listClassName='divide-y divide-solid divide-gray-200 dark:divide-gray-800'
>
{statusIds.map((id: string) => <ScheduledStatus key={id} statusId={id} />)}
</ScrollableList>

@ -60,7 +60,10 @@ const PendingStatus: React.FC<IPendingStatus> = ({ idempotencyKey, className, mu
<div className={clsx('opacity-50', className)}>
<div className={clsx('status', { 'status-reply': !!status.in_reply_to_id, muted })} data-id={status.id}>
<Card
className={clsx('py-6 sm:p-5', `status-${status.visibility}`, { 'status-reply': !!status.in_reply_to_id })}
className={clsx(`status-${status.visibility}`, {
'py-6 sm:p-5': !thread,
'status-reply': !!status.in_reply_to_id,
})}
variant={thread ? 'default' : 'rounded'}
>
<div className='mb-4'>

Loading…
Cancel
Save