diff --git a/webui/src/main/js/trustLists.js b/webui/src/main/js/trustLists.js index 400b361e..1faf5022 100644 --- a/webui/src/main/js/trustLists.js +++ b/webui/src/main/js/trustLists.js @@ -144,6 +144,18 @@ function unsubscribe(user) { xmlhttp.send("action=unsubscribe&persona=" + user) } +function forceUpdate(user) { + var xmlhttp = new XMLHttpRequest() + xmlhttp.onreadystatechange = function() { + if (this.readyState == 4 && this.status == 200) { + refreshLists() + } + } + xmlhttp.open("POST","/MuWire/Trust", true) + xmlhttp.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); + xmlhttp.send("action=subscribe&persona=" + user) +} + function updateDiv(name, list) { var html = "" @@ -208,7 +220,7 @@ function refreshLists() { } - var html = "
UserReasonYour TrustActions
" + var html = "
NameTrustedDistrustedStatusLast UpdatedUnsubscribe
" for (var [user, list] of lists) { html += "" html += "" @@ -216,7 +228,9 @@ function refreshLists() { html += "" html += "" html += "" - html += "" + html += "" html += "" } html += "
NameTrustedDistrustedStatusLast UpdatedActions
" + "" + list.user + "" + list.distrusted +"" + list.status + "" + list.timestamp + "" + "Unsubscribe" + "Unsubscribe" + + " Refresh" + + "
"