Various improvements (#359)

* Fix markdown paragraphs in comments
* Remove autofocus on user registration form
* Show (new) edit button for Post only to power users
* Add email address under name in Likes box
This commit is contained in:
Riccardo Graziosi
2024-06-03 19:27:32 +02:00
committed by GitHub
parent 69c26317d0
commit 2f3ebf88a5
5 changed files with 30 additions and 10 deletions

View File

@@ -102,7 +102,8 @@
.commentBody { .commentBody {
@extend .my-2; @extend .my-2;
p { @extend .m-0; } p { @extend .my-2; }
p:nth-child(1) { @extend .m-0; }
} }
.commentFooter { .commentFooter {

View File

@@ -63,14 +63,29 @@
max-height: 170px; max-height: 170px;
overflow-y: scroll; overflow-y: scroll;
overflow-x: hidden;
.likeListItem { .likeListItem {
@extend @extend
.d-flex,
.p-2, .p-2,
.my-1; .my-1;
.likeListItemName { .gravatar {
@extend .ml-2; @extend .align-self-center;
}
.likeListItemUserInfo {
@extend
.d-flex,
.flex-column,
.ml-3;
}
.likeListItemEmail {
@extend .mutedText;
font-size: 13px;
} }
} }
} }

View File

@@ -26,8 +26,11 @@ const LikeList = ({ likes, areLoading, error}: Props) => (
{ {
likes.map((like, i) => ( likes.map((like, i) => (
<div className="likeListItem" key={i}> <div className="likeListItem" key={i}>
<Gravatar email={like.email} size={28} className="gravatar" /> <Gravatar email={like.email} size={32} className="gravatar" />
<span className="likeListItemName">{like.fullName}</span> <div className="likeListItemUserInfo">
<span className="likeListItemName" title={like.fullName}>{like.fullName}</span>
<span className="likeListItemEmail" title={like.email}>{like.email}</span>
</div>
</div> </div>
)) ))
} }

View File

@@ -243,9 +243,11 @@ class PostP extends React.Component<Props> {
<PostStatusLabel <PostStatusLabel
{...postStatuses.find(postStatus => postStatus.id === post.postStatusId)} {...postStatuses.find(postStatus => postStatus.id === post.postStatusId)}
/> />
<ActionLink onClick={toggleEditMode} icon={<EditIcon />} customClass='editAction'> { isPowerUser &&
{I18n.t('common.buttons.edit')} <ActionLink onClick={toggleEditMode} icon={<EditIcon />} customClass='editAction'>
</ActionLink> {I18n.t('common.buttons.edit')}
</ActionLink>
}
</div> </div>
<ReactMarkdown <ReactMarkdown

View File

@@ -7,7 +7,6 @@
<div class="form-group"> <div class="form-group">
<%= f.label :full_name, class: "sr-only" %> <%= f.label :full_name, class: "sr-only" %>
<%= f.text_field :full_name, <%= f.text_field :full_name,
autofocus: true,
placeholder: t('common.forms.auth.full_name'), placeholder: t('common.forms.auth.full_name'),
required: true, required: true,
class: "form-control" %> class: "form-control" %>