mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-20 10:33:41 -05:00
web/timeline/reply: make it more compact on a single line
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
This commit is contained in:
parent
0b1d5cd354
commit
5acab4bdab
2 changed files with 41 additions and 37 deletions
|
@ -2,6 +2,8 @@ blockquote.reply-body {
|
||||||
margin: 0 0 .25rem;
|
margin: 0 0 .25rem;
|
||||||
border-left: 2px solid var(--blockquote-border-color);
|
border-left: 2px solid var(--blockquote-border-color);
|
||||||
padding: .25rem .5rem;
|
padding: .25rem .5rem;
|
||||||
|
display: flex;
|
||||||
|
gap: .5rem;
|
||||||
|
|
||||||
&.sender-color-0 { border-color: var(--sender-color-0); }
|
&.sender-color-0 { border-color: var(--sender-color-0); }
|
||||||
&.sender-color-1 { border-color: var(--sender-color-1); }
|
&.sender-color-1 { border-color: var(--sender-color-1); }
|
||||||
|
@ -34,9 +36,11 @@ blockquote.reply-body {
|
||||||
|
|
||||||
> div.message-text {
|
> div.message-text {
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
-webkit-line-clamp: 2;
|
-webkit-line-clamp: 1;
|
||||||
|
line-clamp: 1;
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
flex-grow: 1;
|
||||||
color: var(--semisecondary-text-color);
|
color: var(--semisecondary-text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,22 +65,22 @@ blockquote.reply-body {
|
||||||
height: 1rem;
|
height: 1rem;
|
||||||
margin-right: .25rem;
|
margin-right: .25rem;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
> div.buttons {
|
> div.buttons {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
|
display: flex;
|
||||||
|
gap: .25rem;
|
||||||
|
|
||||||
|
> button {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: .25rem;
|
align-items: center;
|
||||||
|
border-radius: .25rem;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
> button {
|
> svg {
|
||||||
display: flex;
|
height: 24px;
|
||||||
align-items: center;
|
width: 24px;
|
||||||
border-radius: .25rem;
|
|
||||||
padding: 0;
|
|
||||||
|
|
||||||
> svg {
|
|
||||||
height: 24px;
|
|
||||||
width: 24px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,32 +111,32 @@ export const ReplyBody = ({
|
||||||
<span className={`event-sender sender-color-${userColorIndex}`}>
|
<span className={`event-sender sender-color-${userColorIndex}`}>
|
||||||
{getDisplayname(event.sender, memberEvtContent)}
|
{getDisplayname(event.sender, memberEvtContent)}
|
||||||
</span>
|
</span>
|
||||||
{onClose && <div className="buttons">
|
|
||||||
{onSetSilent && (isExplicitInThread || !isThread) && <TooltipButton
|
|
||||||
tooltipText={isSilent
|
|
||||||
? "Click to enable pinging the original author"
|
|
||||||
: "Click to disable pinging the original author"}
|
|
||||||
tooltipDirection="left"
|
|
||||||
className="silent-reply"
|
|
||||||
onClick={onSetSilent}
|
|
||||||
>
|
|
||||||
{isSilent ? <NotificationsOffIcon /> : <NotificationsIcon />}
|
|
||||||
</TooltipButton>}
|
|
||||||
{isThread && onSetExplicitInThread && <TooltipButton
|
|
||||||
tooltipText={isExplicitInThread
|
|
||||||
? "Click to respond in thread without replying to a specific message"
|
|
||||||
: "Click to reply explicitly in thread"}
|
|
||||||
tooltipDirection="left"
|
|
||||||
className="thread-explicit-reply"
|
|
||||||
onClick={onSetExplicitInThread}
|
|
||||||
>
|
|
||||||
{isExplicitInThread ? <ReplyIcon /> : <ThreadIcon />}
|
|
||||||
</TooltipButton>}
|
|
||||||
{onClose && <button className="close-reply" onClick={onClose}><CloseIcon/></button>}
|
|
||||||
</div>}
|
|
||||||
</div>
|
</div>
|
||||||
<ContentErrorBoundary>
|
<ContentErrorBoundary>
|
||||||
<BodyType room={room} event={event} sender={memberEvt}/>
|
<BodyType room={room} event={event} sender={memberEvt}/>
|
||||||
</ContentErrorBoundary>
|
</ContentErrorBoundary>
|
||||||
|
{onClose && <div className="buttons">
|
||||||
|
{onSetSilent && (isExplicitInThread || !isThread) && <TooltipButton
|
||||||
|
tooltipText={isSilent
|
||||||
|
? "Click to enable pinging the original author"
|
||||||
|
: "Click to disable pinging the original author"}
|
||||||
|
tooltipDirection="left"
|
||||||
|
className="silent-reply"
|
||||||
|
onClick={onSetSilent}
|
||||||
|
>
|
||||||
|
{isSilent ? <NotificationsOffIcon /> : <NotificationsIcon />}
|
||||||
|
</TooltipButton>}
|
||||||
|
{isThread && onSetExplicitInThread && <TooltipButton
|
||||||
|
tooltipText={isExplicitInThread
|
||||||
|
? "Click to respond in thread without replying to a specific message"
|
||||||
|
: "Click to reply explicitly in thread"}
|
||||||
|
tooltipDirection="left"
|
||||||
|
className="thread-explicit-reply"
|
||||||
|
onClick={onSetExplicitInThread}
|
||||||
|
>
|
||||||
|
{isExplicitInThread ? <ReplyIcon /> : <ThreadIcon />}
|
||||||
|
</TooltipButton>}
|
||||||
|
{onClose && <button className="close-reply" onClick={onClose}><CloseIcon/></button>}
|
||||||
|
</div>}
|
||||||
</blockquote>
|
</blockquote>
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue