diff --git a/WebKit/css/default.css b/WebKit/css/default.css index bbd4ae5..5398084 100644 --- a/WebKit/css/default.css +++ b/WebKit/css/default.css @@ -39,7 +39,7 @@ ol li, .error, header.profile { } body > ol > li { - -webkit-transition: background-color 1000ms linear; + } body > ol > li:first-child { @@ -63,6 +63,11 @@ body > ol > li.highlighteffect { -webkit-transition: background-color 200ms linear; } +body > ol > li.highlighteffect-after { + -webkit-transition: background-color 1000ms linear; +} + + body > ol > li:after, header.profile:after { content: "."; display: block; diff --git a/WebKit/scripts/controller/Profile.js b/WebKit/scripts/controller/Profile.js index bb7b401..2f5e99a 100644 --- a/WebKit/scripts/controller/Profile.js +++ b/WebKit/scripts/controller/Profile.js @@ -53,6 +53,7 @@ function(HostApp, Core, Paths, URI) { name: document.createElement("h1"), entity: document.createElement("a"), bio: document.createElement("p"), + following_you: document.createElement("td"), posts: document.createElement("a"), following: document.createElement("a"), followed: document.createElement("a"), @@ -114,6 +115,8 @@ function(HostApp, Core, Paths, URI) { td.appendChild(this.profile_template.url); mkLi("Homepage", td); + mkLi("Following you", this.profile_template.following_you); + td = document.createElement("td"); td.appendChild(this.profile_template.posts); this.profile_template.posts.href = "#"; @@ -156,6 +159,7 @@ function(HostApp, Core, Paths, URI) { this.profile_template.name.innerText = ""; this.profile_template.entity.innerText = ""; this.profile_template.bio.innerText = ""; + this.profile_template.following_you.innerText = ""; this.profile_template.posts.innerText = ""; this.profile_template.following.innerText = ""; this.profile_template.followed.innerText = ""; @@ -292,6 +296,14 @@ function(HostApp, Core, Paths, URI) { _this.populate(_this.profile_template.followed, resp.responseText); }, null, false); + Paths.getURL(URI(root_url + "/followers/" + encodeURIComponent(HostApp.stringForKey("entity"))).toString(), "GET", function(resp) { + if (resp.status == 200) { + _this.populate(_this.profile_template.following_you, "Yes"); + } else { + _this.populate(_this.profile_template.following_you, "No"); + } + }, null, false); + var url = URI(root_url + "/posts/count"); var post_types = [ "https://tent.io/types/post/repost/v0.1.0", diff --git a/WebKit/scripts/helper/Core.js b/WebKit/scripts/helper/Core.js index b583072..3ca43b5 100644 --- a/WebKit/scripts/helper/Core.js +++ b/WebKit/scripts/helper/Core.js @@ -829,6 +829,10 @@ function(jQuery, Paths, URI, HostApp, Cache) { $("#post-" + id).addClass("highlighteffect"); setTimeout(function() { $("#post-" + id).removeClass("highlighteffect"); + $("#post-" + id).addClass("highlighteffect-after"); + setTimeout(function() { + $("#post-" + id).removeClass("highlighteffect-after"); + }, 1000); }, 4000); }