Skip to content

Commit 913bd87

Browse files
committed
feat: add background color to comment area #575
1 parent d736547 commit 913bd87

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

i18n/de_DE.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -722,9 +722,9 @@ ui:
722722
btn_save_edits: Änderungen speichern
723723
btn_cancel: Stornieren
724724
dates:
725-
long_date: MMM D
726-
long_date_with_year: "MMM D, JJJJ"
727-
long_date_with_time: "MMM T, JJJJ [at] HH:mm"
725+
long_date: DD. MMM
726+
long_date_with_year: "DD. MMM YYYY"
727+
long_date_with_time: "DD. MMM YYYY [at] HH:mm"
728728
now: jetzt
729729
x_seconds_ago: "vor {{count}}s"
730730
x_minutes_ago: "vor {{count}}m"

ui/src/components/Comment/index.tsx

+12-8
Original file line numberDiff line numberDiff line change
@@ -328,16 +328,17 @@ const Comment = ({ objectId, mode, commentId }) => {
328328
);
329329
};
330330
return (
331-
<div className="comments-wrap">
332-
{comments.map((item, index) => {
331+
<div
332+
className={classNames(
333+
'comments-wrap',
334+
comments.length > 0 && 'bg-light px-3 py-2 rounded',
335+
)}>
336+
{comments.map((item) => {
333337
return (
334338
<div
335339
key={item.comment_id}
336340
id={item.comment_id}
337-
className={classNames(
338-
'border-bottom py-2 comment-item',
339-
index === 0 && 'border-top',
340-
)}>
341+
className="border-bottom py-2 comment-item">
341342
{item.showEdit ? (
342343
<Form
343344
className="mt-2"
@@ -397,7 +398,7 @@ const Comment = ({ objectId, mode, commentId }) => {
397398
);
398399
})}
399400

400-
<div className="mt-2">
401+
<div className={classNames(comments.length > 0 && 'py-2')}>
401402
<Button
402403
variant="link"
403404
className="p-0 btn-no-border"
@@ -425,7 +426,10 @@ const Comment = ({ objectId, mode, commentId }) => {
425426
{visibleComment && (
426427
<Form
427428
mode={mode}
428-
className="mt-2"
429+
className={classNames(
430+
'mt-2',
431+
comments.length <= 0 && 'bg-light p-3 rounded',
432+
)}
429433
onSendReply={(value) => handleSendReply({ value, type: 'comment' })}
430434
onCancel={() => setVisibleComment(!visibleComment)}
431435
/>

0 commit comments

Comments
 (0)