From 30b41f82d6d112fb1b84fc6f97aed5fd3ac51974 Mon Sep 17 00:00:00 2001 From: Pat O'Brien <3484775+poblabs@users.noreply.github.com> Date: Thu, 3 Oct 2019 09:49:26 -0400 Subject: [PATCH 1/5] Update config port option name Using "PORT" failed for me. Using "MAILPORT" which matches the config.ini worked. --- python/mailserver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/mailserver.py b/python/mailserver.py index 4fad814..0d62489 100644 --- a/python/mailserver.py +++ b/python/mailserver.py @@ -124,7 +124,7 @@ if __name__ == '__main__': else : Config = ConfigParser.ConfigParser() Config.read("../config.ini") - port = int(Config.get("MAILSERVER","PORT")) + port = int(Config.get("MAILSERVER","MAILPORT")) From 53e6c8dba27250cd936a123dce07a6c786160971 Mon Sep 17 00:00:00 2001 From: Pat O'Brien <3484775+poblabs@users.noreply.github.com> Date: Thu, 3 Oct 2019 09:51:54 -0400 Subject: [PATCH 2/5] Reverse sort the list so new items are on top --- web/api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/api.php b/web/api.php index d37e95b..bfbb9f2 100644 --- a/web/api.php +++ b/web/api.php @@ -74,7 +74,7 @@ switch($action) } } if(is_array($emaillist)) - ksort($emaillist); + krsort($emaillist); $data = (count($emaillist)?$emaillist:array()); } From 8e362bec245ecb2c8007d59b1843a0c43a6f862f Mon Sep 17 00:00:00 2001 From: Pat O'Brien <3484775+poblabs@users.noreply.github.com> Date: Thu, 3 Oct 2019 09:54:16 -0400 Subject: [PATCH 3/5] Do not add duplicate headers, and clear table for append Instead of appending the API results non-stop, we clear the table first so that it's fresh data loaded into the table. In addition, I added a class to the "To" `tr` and jQuery will look for this class. If it doesn't exist then it'll add that `tr`. Otherwise it won't continue to stack it. Fixes https://github.com/HaschekSolutions/opentrashmail/issues/2 --- web/js/opentrashmail.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/js/opentrashmail.js b/web/js/opentrashmail.js index 4694fdc..542009b 100644 --- a/web/js/opentrashmail.js +++ b/web/js/opentrashmail.js @@ -91,9 +91,14 @@ function updateEmailTable() { clearInterval(timer); admin = true; - $('#tableheader').children(':eq(1)').after('