Minor Ui improvements (#6515)
* PLT-6645 - Improving copy pasting behaviour * PLT-6149 - Fixing edited indicator in search
Этот коммит содержится в:
коммит произвёл
Corey Hulen
родитель
860e5d483c
Коммит
b2453735b2
@@ -53,7 +53,7 @@ export default class PostHeader extends React.Component {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
botIndicator = <li className='bot-indicator'>{Constants.BOT_NAME}</li>;
|
botIndicator = <div className='bot-indicator'>{Constants.BOT_NAME}</div>;
|
||||||
} else if (isSystemMessage) {
|
} else if (isSystemMessage) {
|
||||||
userProfile = (
|
userProfile = (
|
||||||
<UserProfile
|
<UserProfile
|
||||||
@@ -75,10 +75,10 @@ export default class PostHeader extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ul className='post__header'>
|
<div className='post__header'>
|
||||||
<li className='col col__name'>{userProfile}{colon}</li>
|
<div className='col col__name'>{userProfile}{colon}</div>
|
||||||
{botIndicator}
|
{botIndicator}
|
||||||
<li className='col'>
|
<div className='col'>
|
||||||
<PostInfo
|
<PostInfo
|
||||||
post={post}
|
post={post}
|
||||||
lastPostCount={this.props.lastPostCount}
|
lastPostCount={this.props.lastPostCount}
|
||||||
@@ -92,8 +92,8 @@ export default class PostHeader extends React.Component {
|
|||||||
useMilitaryTime={this.props.useMilitaryTime}
|
useMilitaryTime={this.props.useMilitaryTime}
|
||||||
isFlagged={this.props.isFlagged}
|
isFlagged={this.props.isFlagged}
|
||||||
/>
|
/>
|
||||||
</li>
|
</div>
|
||||||
</ul>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -388,16 +388,16 @@ export default class PostInfo extends React.Component {
|
|||||||
let options;
|
let options;
|
||||||
if (isEphemeral) {
|
if (isEphemeral) {
|
||||||
options = (
|
options = (
|
||||||
<li className='col col__remove'>
|
<div className='col col__remove'>
|
||||||
{this.createRemovePostButton()}
|
{this.createRemovePostButton()}
|
||||||
</li>
|
</div>
|
||||||
);
|
);
|
||||||
} else if (!isPending) {
|
} else if (!isPending) {
|
||||||
const dropdown = this.createDropdown(isSystemMessage);
|
const dropdown = this.createDropdown(isSystemMessage);
|
||||||
|
|
||||||
if (dropdown) {
|
if (dropdown) {
|
||||||
options = (
|
options = (
|
||||||
<li className='col col__reply'>
|
<div className='col col__reply'>
|
||||||
<div
|
<div
|
||||||
className='dropdown'
|
className='dropdown'
|
||||||
ref='dotMenu'
|
ref='dotMenu'
|
||||||
@@ -406,7 +406,7 @@ export default class PostInfo extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
{react}
|
{react}
|
||||||
{comments}
|
{comments}
|
||||||
</li>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -424,8 +424,8 @@ export default class PostInfo extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ul className='post__header--info'>
|
<div className='post__header--info'>
|
||||||
<li className='col'>
|
<div className='col'>
|
||||||
<PostTime
|
<PostTime
|
||||||
eventTime={post.create_at}
|
eventTime={post.create_at}
|
||||||
sameUser={this.props.sameUser}
|
sameUser={this.props.sameUser}
|
||||||
@@ -442,9 +442,9 @@ export default class PostInfo extends React.Component {
|
|||||||
isFlagged={this.props.isFlagged}
|
isFlagged={this.props.isFlagged}
|
||||||
isEphemeral={isEphemeral}
|
isEphemeral={isEphemeral}
|
||||||
/>
|
/>
|
||||||
</li>
|
</div>
|
||||||
{options}
|
{options}
|
||||||
</ul>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -436,7 +436,7 @@ export default class RhsComment extends React.Component {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
botIndicator = <li className='col col__name bot-indicator'>{'BOT'}</li>;
|
botIndicator = <div className='col col__name bot-indicator'>{'BOT'}</div>;
|
||||||
} else if (isSystemMessage) {
|
} else if (isSystemMessage) {
|
||||||
userProfile = (
|
userProfile = (
|
||||||
<UserProfile
|
<UserProfile
|
||||||
@@ -573,17 +573,17 @@ export default class RhsComment extends React.Component {
|
|||||||
let options;
|
let options;
|
||||||
if (isEphemeral) {
|
if (isEphemeral) {
|
||||||
options = (
|
options = (
|
||||||
<li className='col col__remove'>
|
<div className='col col__remove'>
|
||||||
{this.createRemovePostButton()}
|
{this.createRemovePostButton()}
|
||||||
</li>
|
</div>
|
||||||
);
|
);
|
||||||
} else if (!isSystemMessage) {
|
} else if (!isSystemMessage) {
|
||||||
options = (
|
options = (
|
||||||
<li className='col col__reply'>
|
<div className='col col__reply'>
|
||||||
{reactOverlay}
|
{reactOverlay}
|
||||||
{this.createDropdown(isSystemMessage)}
|
{this.createDropdown(isSystemMessage)}
|
||||||
{react}
|
{react}
|
||||||
</li>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -613,12 +613,12 @@ export default class RhsComment extends React.Component {
|
|||||||
<div className='post__content'>
|
<div className='post__content'>
|
||||||
{profilePicContainer}
|
{profilePicContainer}
|
||||||
<div>
|
<div>
|
||||||
<ul className='post__header'>
|
<div className='post__header'>
|
||||||
<li className='col col__name'>
|
<div className='col col__name'>
|
||||||
<strong>{userProfile}</strong>
|
<strong>{userProfile}</strong>
|
||||||
</li>
|
</div>
|
||||||
{botIndicator}
|
{botIndicator}
|
||||||
<li className='col'>
|
<div className='col'>
|
||||||
{this.renderTimeTag(post, timeOptions)}
|
{this.renderTimeTag(post, timeOptions)}
|
||||||
{pinnedBadge}
|
{pinnedBadge}
|
||||||
<PostFlagIcon
|
<PostFlagIcon
|
||||||
@@ -628,9 +628,9 @@ export default class RhsComment extends React.Component {
|
|||||||
isFlagged={this.props.isFlagged}
|
isFlagged={this.props.isFlagged}
|
||||||
isEphemeral={isEphemeral}
|
isEphemeral={isEphemeral}
|
||||||
/>
|
/>
|
||||||
</li>
|
</div>
|
||||||
{options}
|
{options}
|
||||||
</ul>
|
</div>
|
||||||
<div className='post__body' >
|
<div className='post__body' >
|
||||||
<div className={postClass}>
|
<div className={postClass}>
|
||||||
{loading}
|
{loading}
|
||||||
|
|||||||
@@ -454,7 +454,7 @@ export default class RhsRootPost extends React.Component {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
botIndicator = <li className='col col__name bot-indicator'>{'BOT'}</li>;
|
botIndicator = <div className='col col__name bot-indicator'>{'BOT'}</div>;
|
||||||
} else if (isSystemMessage) {
|
} else if (isSystemMessage) {
|
||||||
userProfile = (
|
userProfile = (
|
||||||
<UserProfile
|
<UserProfile
|
||||||
@@ -559,10 +559,10 @@ export default class RhsRootPost extends React.Component {
|
|||||||
<div className='post__content'>
|
<div className='post__content'>
|
||||||
{profilePicContainer}
|
{profilePicContainer}
|
||||||
<div>
|
<div>
|
||||||
<ul className='post__header'>
|
<div className='post__header'>
|
||||||
<li className='col__name'>{userProfile}</li>
|
<div className='col__name'>{userProfile}</div>
|
||||||
{botIndicator}
|
{botIndicator}
|
||||||
<li className='col'>
|
<div className='col'>
|
||||||
{this.renderTimeTag(post, timeOptions)}
|
{this.renderTimeTag(post, timeOptions)}
|
||||||
{pinnedBadge}
|
{pinnedBadge}
|
||||||
<PostFlagIcon
|
<PostFlagIcon
|
||||||
@@ -570,13 +570,13 @@ export default class RhsRootPost extends React.Component {
|
|||||||
postId={post.id}
|
postId={post.id}
|
||||||
isFlagged={this.props.isFlagged}
|
isFlagged={this.props.isFlagged}
|
||||||
/>
|
/>
|
||||||
</li>
|
</div>
|
||||||
<li className='col col__reply'>
|
<div className='col col__reply'>
|
||||||
{reactOverlay}
|
{reactOverlay}
|
||||||
{rootOptions}
|
{rootOptions}
|
||||||
{react}
|
{react}
|
||||||
</li>
|
</div>
|
||||||
</ul>
|
</div>
|
||||||
<div className='post__body'>
|
<div className='post__body'>
|
||||||
<div className={postClass}>
|
<div className={postClass}>
|
||||||
<PostBodyAdditionalContent
|
<PostBodyAdditionalContent
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ export default class SearchResultsItem extends React.Component {
|
|||||||
|
|
||||||
let botIndicator;
|
let botIndicator;
|
||||||
if (post.props && post.props.from_webhook) {
|
if (post.props && post.props.from_webhook) {
|
||||||
botIndicator = <li className='bot-indicator'>{Constants.BOT_NAME}</li>;
|
botIndicator = <div className='bot-indicator'>{Constants.BOT_NAME}</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
const profilePic = (
|
const profilePic = (
|
||||||
@@ -169,6 +169,11 @@ export default class SearchResultsItem extends React.Component {
|
|||||||
compactClass = ' post--compact';
|
compactClass = ' post--compact';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let postClass = '';
|
||||||
|
if (PostUtils.isEdited(this.props.post)) {
|
||||||
|
postClass += ' post--edited';
|
||||||
|
}
|
||||||
|
|
||||||
let fileAttachment = null;
|
let fileAttachment = null;
|
||||||
if (post.file_ids && post.file_ids.length > 0) {
|
if (post.file_ids && post.file_ids.length > 0) {
|
||||||
fileAttachment = (
|
fileAttachment = (
|
||||||
@@ -202,7 +207,7 @@ export default class SearchResultsItem extends React.Component {
|
|||||||
);
|
);
|
||||||
|
|
||||||
rhsControls = (
|
rhsControls = (
|
||||||
<li className='col__controls'>
|
<div className='col__controls'>
|
||||||
<CommentIcon
|
<CommentIcon
|
||||||
idPrefix={'searchCommentIcon'}
|
idPrefix={'searchCommentIcon'}
|
||||||
idCount={idCount}
|
idCount={idCount}
|
||||||
@@ -243,7 +248,7 @@ export default class SearchResultsItem extends React.Component {
|
|||||||
defaultMessage='Jump'
|
defaultMessage='Jump'
|
||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
message = (
|
message = (
|
||||||
@@ -289,8 +294,8 @@ export default class SearchResultsItem extends React.Component {
|
|||||||
<div className='post__content'>
|
<div className='post__content'>
|
||||||
{profilePicContainer}
|
{profilePicContainer}
|
||||||
<div>
|
<div>
|
||||||
<ul className='post__header'>
|
<div className='post__header'>
|
||||||
<li className='col col__name'><strong>
|
<div className='col col__name'><strong>
|
||||||
<UserProfile
|
<UserProfile
|
||||||
user={user}
|
user={user}
|
||||||
overwriteName={overrideUsername}
|
overwriteName={overrideUsername}
|
||||||
@@ -298,18 +303,20 @@ export default class SearchResultsItem extends React.Component {
|
|||||||
status={this.props.status}
|
status={this.props.status}
|
||||||
isBusy={this.props.isBusy}
|
isBusy={this.props.isBusy}
|
||||||
/>
|
/>
|
||||||
</strong></li>
|
</strong></div>
|
||||||
{botIndicator}
|
{botIndicator}
|
||||||
<li className='col'>
|
<div className='col'>
|
||||||
{this.renderTimeTag(post)}
|
{this.renderTimeTag(post)}
|
||||||
{pinnedBadge}
|
{pinnedBadge}
|
||||||
{flagContent}
|
{flagContent}
|
||||||
</li>
|
</div>
|
||||||
{rhsControls}
|
{rhsControls}
|
||||||
</ul>
|
</div>
|
||||||
<div className='search-item-snippet post__body'>
|
<div className='search-item-snippet post__body'>
|
||||||
{message}
|
<div className={postClass}>
|
||||||
{fileAttachment}
|
{message}
|
||||||
|
{fileAttachment}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1028,11 +1028,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.post__header {
|
.post__header {
|
||||||
list-style: none;
|
|
||||||
margin-bottom: 2px;
|
margin-bottom: 2px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
li {
|
> div {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user