v3: allow users to edit dump thumbnail, fixed some linter errors in the frontend
All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 40s
All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 40s
This commit is contained in:
17
src/App.css
17
src/App.css
@@ -3753,6 +3753,23 @@ body.has-player .fab-new {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.comment-cancel-btn {
|
||||
background: transparent;
|
||||
border: 1.5px solid var(--color-border-subtle);
|
||||
border-radius: 6px;
|
||||
padding: 0.4rem 1rem;
|
||||
font-family: inherit;
|
||||
font-size: 0.82rem;
|
||||
color: var(--color-text);
|
||||
opacity: 0.6;
|
||||
cursor: pointer;
|
||||
transition: opacity 0.15s;
|
||||
}
|
||||
|
||||
.comment-cancel-btn:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.comment-node-inner--deleted {
|
||||
opacity: 0.35;
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ function CommentNode({
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="comment-action-btn"
|
||||
className="comment-cancel-btn"
|
||||
onClick={() => {
|
||||
setEditOpen(false);
|
||||
setEditBody("");
|
||||
@@ -290,14 +290,16 @@ function CommentNode({
|
||||
)
|
||||
: <Markdown className="comment-body">{comment.body}</Markdown>}
|
||||
<div className="comment-actions">
|
||||
<LikeButton
|
||||
commentId={comment.id}
|
||||
count={likeCounts[comment.id] ?? comment.likeCount}
|
||||
liked={myLikes.has(comment.id)}
|
||||
disabled={!currentUser}
|
||||
onLike={castCommentLike}
|
||||
onUnlike={removeCommentLike}
|
||||
/>
|
||||
{!editOpen && (
|
||||
<LikeButton
|
||||
commentId={comment.id}
|
||||
count={likeCounts[comment.id] ?? comment.likeCount}
|
||||
liked={myLikes.has(comment.id)}
|
||||
disabled={!currentUser}
|
||||
onLike={castCommentLike}
|
||||
onUnlike={removeCommentLike}
|
||||
/>
|
||||
)}
|
||||
{currentUser && !editOpen && (
|
||||
<button
|
||||
type="button"
|
||||
@@ -376,7 +378,7 @@ function CommentNode({
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="comment-action-btn"
|
||||
className="comment-cancel-btn"
|
||||
onClick={() => {
|
||||
setReplyOpen(false);
|
||||
setReplyBody("");
|
||||
@@ -514,7 +516,7 @@ export function CommentThread({
|
||||
{topLevelBody.trim() && (
|
||||
<button
|
||||
type="button"
|
||||
className="comment-action-btn"
|
||||
className="comment-cancel-btn"
|
||||
onClick={() => {
|
||||
setTopLevelBody("");
|
||||
setTopLevelError(null);
|
||||
|
||||
Reference in New Issue
Block a user