Skip to content

Commit

Permalink
Console: Fix sidebar not showing results of manual update check
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzi2p committed Dec 1, 2023
1 parent 63d7079 commit 1c4d425
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
8 changes: 8 additions & 0 deletions apps/routerconsole/jsp/configupdate.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
<%@include file="css.jsi" %>
<%=intl.title("config update")%>
<%@include file="summaryajax.jsi" %>
<%
if ("POST".equals(request.getMethod())) {
// refresh the sidebar after page loads
%>
<script src="/js/configupdate.js?<%=net.i2p.CoreVersion.VERSION%>" type="text/javascript"></script>
<%
}
%>
</head><body>
<%@include file="summary.jsi" %>
<h1><%=intl._t("Configuration")%></h1>
Expand Down
19 changes: 19 additions & 0 deletions apps/routerconsole/jsp/js/configupdate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* @license http://creativecommons.org/publicdomain/zero/1.0/legalcode CC0-1.0 */

// This component is dedicated to the public domain. It uses the CC0
// as a formal dedication to the public domain and in circumstances where
// a public domain is not usable.

// reload the sidebar after a POST, because the form handling happens
// while the page is rendering

function reloadSidebarOnce()
{
ajax("/xhr1.jsp?requestURI=/configupdate", "xhr", 0);
}

document.addEventListener("DOMContentLoaded", function() {
reloadSidebarOnce();
}, true);

/* @license-end */

0 comments on commit 1c4d425

Please sign in to comment.