Explorar o código

[wip] test mip

B Thibault %!s(int64=8) %!d(string=hai) anos
pai
achega
2838f5edcf
Modificáronse 2 ficheiros con 5 adicións e 7 borrados
  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} */