webui: format time of chat messages

This commit is contained in:
electron128 2015-10-13 20:36:00 +02:00
parent 537c4925b7
commit a75cbcd7b3
2 changed files with 2 additions and 2 deletions

View File

@ -1467,7 +1467,7 @@ var ChatWidget = React.createClass({
<ChatInfoWidget id={this.props.id}/>
{
this.state.data.map(function(msg){
return <div key={msg.id}>{msg.send_time} {msg.author_name}: {markup(msg.msg, msg.links)}</div>;
return <div key={msg.id}>{new Date(msg.send_time*1000).toLocaleTimeString()} {msg.author_name}: {markup(msg.msg, msg.links)}</div>;
})
}
<input type="text" ref="input" onKeyDown={

View File

@ -1467,7 +1467,7 @@ var ChatWidget = React.createClass({
<ChatInfoWidget id={this.props.id}/>
{
this.state.data.map(function(msg){
return <div key={msg.id}>{msg.send_time} {msg.author_name}: {markup(msg.msg, msg.links)}</div>;
return <div key={msg.id}>{new Date(msg.send_time*1000).toLocaleTimeString()} {msg.author_name}: {markup(msg.msg, msg.links)}</div>;
})
}
<input type="text" ref="input" onKeyDown={