Formatted pretty time, kinda like Discord

This commit is contained in:
Jeremy Zhang 2017-06-04 06:31:06 +00:00
parent ae52804a08
commit 601612e436
2 changed files with 2 additions and 2 deletions

View File

@ -291,7 +291,6 @@ margin-right:4px
} }
#chatcontent > p { display: table; } #chatcontent > p { display: table; }
#chatcontent > p > span { display: table-row } #chatcontent > p > span { display: table-row }
#chatcontent > p > span:nth-child(1):before { content:"Today at " }
#chatcontent > p > span.chatusername { display: table-header-group } #chatcontent > p > span.chatusername { display: table-header-group }
#chatcontent > p > span.chatmessage { display: table-footer-group;display:inline-block!important;color:rgb(195,196,197) } #chatcontent > p > span.chatmessage { display: table-footer-group;display:inline-block!important;color:rgb(195,196,197) }
::-webkit-input-placeholder { color:rgb(99,99,99) } ::-webkit-input-placeholder { color:rgb(99,99,99) }

View File

@ -428,7 +428,8 @@
function parse_message_time(message) { function parse_message_time(message) {
var mome = moment(message.timestamp); var mome = moment(message.timestamp);
message.formatted_timestamp = mome.toDate().toString(); message.formatted_timestamp = mome.toDate().toString();
message.formatted_time = mome.format("h:mm A"); message.formatted_time = mome.calendar();
/*message.formatted_time = mome.format("h:mm A");*/
return message; return message;
} }