B Thibault преди 8 години
родител
ревизия
2838f5edcf
променени са 2 файла, в които са добавени 5 реда и са изтрити 7 реда
  1. 1 1
      srv/public/style.css
  2. 4 6
      srv/src/slackHistory.js

+ 1 - 1
srv/public/style.css

@@ -29,7 +29,7 @@ body {
 }
 
 .slack-chat-title { font-size: 1.75em; font-style: italic; }
-.slackmsg-item { margin-top: 15px; }
+.slackmsg-item { background: #eee; margin-top: 15px; }
 .slackmsg-author { display: inline-block; }
 .slackmsg-author-img { margin-right: 15px; }
 .slackmsg-author-name { position: absolute; max-height: 1em; overflow: hidden; font-style: italic; }

+ 4 - 6
srv/src/slackHistory.js

@@ -68,12 +68,10 @@ SlackHistory.prototype.toStatic = function(knownVersion) {
     return result;
 }
 
-SlackHistory.prototype.update = function(messages) {
-    // TODO
-};
-
-SlackHistory.prototype.getUpdates = function(knownVersion) {
-    // TODO
+SlackHistory.prototype.resort = function() {
+    this.messages.sort(function(a, b) {
+        return a.ts -b.ts;
+    });
 };
 
 /** @suppress {undefinedVars,checkTypes} */