Browse Source

fix issue https://github.com/tracim/tracim/issues/630

AlexiCauvin 5 years ago
parent
commit
66d4b29b77

+ 11 - 4
frontend_lib/src/component/Timeline/Comment.jsx View File

@@ -26,14 +26,21 @@ const Comment = props => {
26 26
         </div>
27 27
       </div>
28 28
       <div
29
-        className={classnames(`${props.customClass}__messagelist__item__createhour`, 'timeline__body__messagelist__item__createhour')}>
30
-        {props.createdAt}
29
+        className={classnames(`${props.customClass}__messagelist__item__authorandhour`, 'timeline__body__messagelist__item__authorandhour')}>
30
+          <div className='mr-5'>
31
+            {props.createdAt}
32
+          </div>
33
+          {props.author}
31 34
       </div>
32 35
       <div
33 36
         className={classnames(`${props.customClass}__messagelist__item__content`, 'timeline__body__messagelist__item__content')}
34 37
         style={props.fromMe ? styleSent : styleReceived}
35
-        dangerouslySetInnerHTML={{__html: props.text}}
36
-      />
38
+
39
+      >
40
+        <div className='timeline__body__messagelist__item__content__text'>
41
+          {props.text}
42
+        </div>
43
+      </div>
37 44
     </li>
38 45
   )
39 46
 }

+ 1 - 0
frontend_lib/src/component/Timeline/Timeline.jsx View File

@@ -54,6 +54,7 @@ class Timeline extends React.Component {
54 54
                   return <Comment
55 55
                     customClass={props.customClass}
56 56
                     customColor={props.customColor}
57
+                    author={content.author.public_name}
57 58
                     avatar={content.author.avatar_url}
58 59
                     createdAt={content.created}
59 60
                     text={content.raw_content}

+ 5 - 2
frontend_lib/src/component/Timeline/Timeline.styl View File

@@ -45,8 +45,11 @@
45 45
             width 45px
46 46
             height 45px
47 47
             border-radius 25px
48
-        &__createhour
49
-          margin-left 35px
48
+        &__authorandhour
49
+          display flex
50
+          align-items center
51
+          justify-content flex-end
52
+          margin-right 35px
50 53
           opacity 0.7
51 54
           font-size 14px
52 55
         &__content