Skip to content

Commit

Permalink
feat: add background color to comment area #575
Browse files Browse the repository at this point in the history
  • Loading branch information
shuashuai committed Nov 14, 2023
1 parent d736547 commit 913bd87
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
6 changes: 3 additions & 3 deletions i18n/de_DE.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -722,9 +722,9 @@ ui:
btn_save_edits: Änderungen speichern
btn_cancel: Stornieren
dates:
long_date: MMM D
long_date_with_year: "MMM D, JJJJ"
long_date_with_time: "MMM T, JJJJ [at] HH:mm"
long_date: DD. MMM
long_date_with_year: "DD. MMM YYYY"
long_date_with_time: "DD. MMM YYYY [at] HH:mm"
now: jetzt
x_seconds_ago: "vor {{count}}s"
x_minutes_ago: "vor {{count}}m"
Expand Down
20 changes: 12 additions & 8 deletions ui/src/components/Comment/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -328,16 +328,17 @@ const Comment = ({ objectId, mode, commentId }) => {
);
};
return (
<div className="comments-wrap">
{comments.map((item, index) => {
<div
className={classNames(
'comments-wrap',
comments.length > 0 && 'bg-light px-3 py-2 rounded',
)}>
{comments.map((item) => {
return (
<div
key={item.comment_id}
id={item.comment_id}
className={classNames(
'border-bottom py-2 comment-item',
index === 0 && 'border-top',
)}>
className="border-bottom py-2 comment-item">
{item.showEdit ? (
<Form
className="mt-2"
Expand Down Expand Up @@ -397,7 +398,7 @@ const Comment = ({ objectId, mode, commentId }) => {
);
})}

<div className="mt-2">
<div className={classNames(comments.length > 0 && 'py-2')}>
<Button
variant="link"
className="p-0 btn-no-border"
Expand Down Expand Up @@ -425,7 +426,10 @@ const Comment = ({ objectId, mode, commentId }) => {
{visibleComment && (
<Form
mode={mode}
className="mt-2"
className={classNames(
'mt-2',
comments.length <= 0 && 'bg-light p-3 rounded',
)}
onSendReply={(value) => handleSendReply({ value, type: 'comment' })}
onCancel={() => setVisibleComment(!visibleComment)}
/>
Expand Down

0 comments on commit 913bd87

Please sign in to comment.