diff --git a/assets/main.css b/assets/main.css index 0350186..930312f 100644 --- a/assets/main.css +++ b/assets/main.css @@ -158,7 +158,7 @@ ul#server_selection_list { background-image: linear-gradient(to bottom, rgba(0, 0, 255, 0), rgba(0, 0, 255, 0.1)); } #channel_contents_wrapper.not-at-bottom { - transition-duration: 1s; + transition-duration: 0.5s; background-position-y: 100%; border-bottom-color: rgba(170, 170, 170, 0.5); } diff --git a/js/controller.js b/js/controller.js index 626bbad..8103d7c 100644 --- a/js/controller.js +++ b/js/controller.js @@ -128,6 +128,7 @@ function switchToChannel(client, team, channel) { client.channelPosts(channel.id) .then(response => { console.info(`Got channel contents of ${channel.id} (${channel.name})`); + response.order.reverse(); populateChannelContents(client, response); }) .catch(error => { diff --git a/js/view/view.js b/js/view/view.js index 73635c9..4df7255 100644 --- a/js/view/view.js +++ b/js/view/view.js @@ -80,13 +80,14 @@ function populateChannelContents(client, contents) { let createAtText = ""; if (sim < DATE_SIMILARITY.date) createAtText += formatDdddMmYy(createAt); if (sim < DATE_SIMILARITY.minutes) createAtText += " " + formatHhMm(createAt); + createAtDiv.title = createAt.toString(); createAtDiv.innerText = createAtText; createAtDiv.dateTime = createAt.toISOString(); const authorName = users[post.user_id] ? users[post.user_id].username : post.user_id; const authorDiv = document.createElement("div"); authorDiv.className = "author"; - authorDiv.innerText = `@${authorName}`; + authorDiv.innerText = authorName; const postDiv = document.createElement("div"); postDiv.className = "post"; @@ -124,7 +125,7 @@ function populateChannelContents(client, contents) { postDiv.appendChild(attachmentsUl); } - nodes.unshift(postDiv); + nodes.push(postDiv); } byId("channel_contents").append(...nodes);