Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3300216
D3309.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D3309.diff
View Options
diff --git a/web/chat/message-action-buttons.css b/web/chat/message-action-buttons.css
--- a/web/chat/message-action-buttons.css
+++ b/web/chat/message-action-buttons.css
@@ -1,8 +1,13 @@
-div.messageActionButtonsContainer {
+div.messageActionButtons {
display: flex;
- flex-direction: row;
font-size: 16px;
}
+div.messageActionButtonsViewer {
+ flex-direction: row;
+}
+div.messageActionButtonsNonViewer {
+ flex-direction: row-reverse;
+}
div.messageActionLinkIcon {
margin: 0 3px;
position: relative;
diff --git a/web/chat/message-action-buttons.js b/web/chat/message-action-buttons.js
--- a/web/chat/message-action-buttons.js
+++ b/web/chat/message-action-buttons.js
@@ -172,8 +172,14 @@
);
}
+ const { isViewer } = messageInfo.creator;
+ const messageActionButtonsContainer = classNames({
+ [css.messageActionButtons]: true,
+ [css.messageActionButtonsViewer]: isViewer,
+ [css.messageActionButtonsNonViewer]: !isViewer,
+ });
return (
- <div className={css.messageActionButtonsContainer}>
+ <div className={messageActionButtonsContainer}>
{sidebarButton}
{replyButton}
</div>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 6:50 PM (19 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2535463
Default Alt Text
D3309.diff (1 KB)
Attached To
Mode
D3309: [web] Conditionally lay out `MessageActionButtons` based on `isViewer`
Attached
Detach File
Event Timeline
Log In to Comment