mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-09-13 14:22:25 +03:00
improve thread reply layout
This commit is contained in:
parent
ccf10fc20c
commit
a7f2d1684f
3 changed files with 12 additions and 11 deletions
|
@ -7,7 +7,6 @@ export const ReplyBend = style({
|
||||||
|
|
||||||
export const ThreadIndicator = style({
|
export const ThreadIndicator = style({
|
||||||
opacity: config.opacity.P300,
|
opacity: config.opacity.P300,
|
||||||
gap: toRem(2),
|
|
||||||
|
|
||||||
selectors: {
|
selectors: {
|
||||||
'button&': {
|
'button&': {
|
||||||
|
@ -19,11 +18,6 @@ export const ThreadIndicator = style({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const ThreadIndicatorIcon = style({
|
|
||||||
width: toRem(14),
|
|
||||||
height: toRem(14),
|
|
||||||
});
|
|
||||||
|
|
||||||
export const Reply = style({
|
export const Reply = style({
|
||||||
marginBottom: toRem(1),
|
marginBottom: toRem(1),
|
||||||
minWidth: 0,
|
minWidth: 0,
|
||||||
|
|
|
@ -38,9 +38,16 @@ export const ReplyLayout = as<'div', ReplyLayoutProps>(
|
||||||
);
|
);
|
||||||
|
|
||||||
export const ThreadIndicator = as<'div'>(({ ...props }, ref) => (
|
export const ThreadIndicator = as<'div'>(({ ...props }, ref) => (
|
||||||
<Box className={css.ThreadIndicator} alignItems="Center" {...props} ref={ref}>
|
<Box
|
||||||
<Icon className={css.ThreadIndicatorIcon} src={Icons.Message} />
|
shrink="No"
|
||||||
<Text size="T200">Threaded reply</Text>
|
className={css.ThreadIndicator}
|
||||||
|
alignItems="Center"
|
||||||
|
gap="100"
|
||||||
|
{...props}
|
||||||
|
ref={ref}
|
||||||
|
>
|
||||||
|
<Icon size="50" src={Icons.Thread} />
|
||||||
|
<Text size="L400">Thread</Text>
|
||||||
</Box>
|
</Box>
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -97,7 +104,7 @@ export const Reply = as<'div', ReplyProps>(
|
||||||
const bodyJSX = body ? scaleSystemEmoji(trimReplyFromBody(body)) : fallbackBody;
|
const bodyJSX = body ? scaleSystemEmoji(trimReplyFromBody(body)) : fallbackBody;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box direction="Column" alignItems="Start" {...props} ref={ref}>
|
<Box direction="Row" gap="200" alignItems="Center" {...props} ref={ref}>
|
||||||
{threadRootId && (
|
{threadRootId && (
|
||||||
<ThreadIndicator as="button" data-event-id={threadRootId} onClick={onClick} />
|
<ThreadIndicator as="button" data-event-id={threadRootId} onClick={onClick} />
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -543,7 +543,7 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
|
||||||
>
|
>
|
||||||
<Icon src={Icons.Cross} size="50" />
|
<Icon src={Icons.Cross} size="50" />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
<Box direction="Column">
|
<Box direction="Row" gap="200" alignItems="Center">
|
||||||
{replyDraft.relation?.rel_type === RelationType.Thread && <ThreadIndicator />}
|
{replyDraft.relation?.rel_type === RelationType.Thread && <ThreadIndicator />}
|
||||||
<ReplyLayout
|
<ReplyLayout
|
||||||
userColor={replyUsernameColor}
|
userColor={replyUsernameColor}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue