@@ -41,9 +41,15 @@ import {getUsername, getMessageText, createMessage} from './utils.js';
4141const ChatMessage = ( { self, from, body, date} ) => h ( 'div' , {
4242 class : [ 'chat-message' , self ? 'chat-message-self' : 'chat-message-other' ] . join ( ' ' )
4343} , [
44- h ( 'div' , { class : 'chat-message-date' } , date ) ,
45- h ( 'div' , { class : 'chat-message-from' } , getUsername ( from ) ) ,
46- h ( 'div' , { class : 'chat-message-body' } , body )
44+ h ( 'div' , {
45+ class : 'chat-message__header'
46+ } , [
47+ h ( 'div' , { class : 'chat-message__header--date' } , `${ date } - ` ) ,
48+ h ( 'div' , { class : 'chat-message__header--username' } , `${ getUsername ( from ) } :` )
49+ ] ) ,
50+ h ( 'div' , {
51+ class : 'chat-message__body'
52+ } , body )
4753] ) ;
4854
4955export const createChatWindow = ( core , proc , parent , bus , options ) => {
@@ -60,7 +66,7 @@ export const createChatWindow = (core, proc, parent, bus, options) => {
6066
6167 const messages = ( state , actions ) => state . messages . map ( ( { date, msg} ) => {
6268 return h ( ChatMessage , {
63- date : format ( date , 'fullDate ' ) ,
69+ date : format ( date , 'longTime ' ) ,
6470 self : getUsername ( msg . getAttribute ( 'from' ) ) !== getUsername ( options . user ) ,
6571 to : msg . getAttribute ( 'to' ) ,
6672 from : msg . getAttribute ( 'from' ) ,
0 commit comments