From 84b5b8f57a4f5f66f5d7bd89de68d732e195008c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20Hn=C3=A1t?= Date: Wed, 2 Nov 2022 13:55:06 +0100 Subject: [PATCH 1/3] Fixed profile picture non existent --- dashboard_static/js/code.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashboard_static/js/code.js b/dashboard_static/js/code.js index f98c27e..6f79741 100644 --- a/dashboard_static/js/code.js +++ b/dashboard_static/js/code.js @@ -50,7 +50,7 @@ function tweetCell(tweet) { var cell = document.createElement("div"); cell.innerHTML = `
- +
${tweet.user.name} From 3f8c1a47a69c3aaa8bb4ba8b8b3044790975befb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20Hn=C3=A1t?= Date: Wed, 2 Nov 2022 14:03:13 +0100 Subject: [PATCH 2/3] fixup! Redirecting to Twitter and stylizing --- dashboard_static/index.html | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/dashboard_static/index.html b/dashboard_static/index.html index a931c54..cc8211b 100644 --- a/dashboard_static/index.html +++ b/dashboard_static/index.html @@ -104,19 +104,6 @@
- --> -
-
-

LATEST CLUCCS

-
-
-

FILTERED CLUCCS

-
- -
-

SPORTS POPULARITY CHART

-
-
From f4c201f04ec91a1ddbd2253392d7f739199cf9f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20Hn=C3=A1t?= Date: Wed, 2 Nov 2022 14:21:18 +0100 Subject: [PATCH 3/3] Added sort by time --- dashboard_static/js/code.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/dashboard_static/js/code.js b/dashboard_static/js/code.js index f98c27e..7c78603 100644 --- a/dashboard_static/js/code.js +++ b/dashboard_static/js/code.js @@ -154,22 +154,27 @@ function filterReplies(repliesTop, repliesBottom, tweets){ return tweets } -function sortTweets(tweets, likesDes=null, retweets=null, replies=null){ +function sortTweets(tweets, likesDes=null, retweetsDes=null, repliesDes=null, dateDes=null){ if(likesDes && likesDes!=null){ tweets.sort(function(a,b){return b.favorite_count-a.favorite_count}) } else if (!likesDes && likesDes!=null){ tweets.sort(function(a,b){return a.favorite_count-b.favorite_count}) } - if(retweets && retweets!=null){ + if(retweetsDes && retweetsDes!=null){ tweets.sort(function(a,b){return b.retweet_count-a.retweet_count}) - } else if (!retweets && retweets!=null){ + } else if (!retweetsDes && retweetsDes!=null){ tweets.sort(function(a,b){return a.retweet_count-b.retweet_count}) } - if(replies && replies!=null){ + if(repliesDes && repliesDes!=null){ tweets.sort(function(a,b){return b.reply_count-a.reply_count}) - } else if (!replies && replies!=null){ + } else if (!repliesDes && repliesDes!=null){ tweets.sort(function(a,b){return a.reply_count-b.reply_count}) } + if(dateDes && dateDes!=null){ + tweets.sort(function(a,b){return Date(b.created_at)-Date(a.reply_count)}) + } else if (!dateDes && dateDes!=null){ + tweets.sort(function(a,b){return Date(a.created_at)-Date(b.reply_count)}) + } return tweets }